[R] plots of ACF

2008-11-21 Thread Sara Mouro
Hello.

I have one Model (M3) fitted using the lme package, and I have  
checked the correlation structure of within-group errors using

plot(ACF (M3,maxLag=10),alpha=0.05)

But now I am not sure how to interpret this plot for the empirical  
autocorrelation function.

The problem is that I am used to see/interpret diagrams in which all  
the autocorrelation Lags, except lag-1, are inside the confidence  
envelopes, or those plots where only Lags 1 and 2 are outside those  
envelopes.

But how should I interpret my ACF plot, where Lags 1, 7, 8 and 9, are  
those outside those envelopes?

Is there any correlation structure?
Which one might that be? AR1()?


Also, I have used the plot of the empirical ACF of the normalized  
residuals, but it gives exactly the same results.

Could you please help me?

Best regards
Sara Mouro


Sara Maltez Mouro

Centro de Ecologia Funcional
Departamento de Botânica
Universidade de Coimbra

[EMAIL PROTECTED]
www.uc.pt/ecology/saramaltezmouro


Sara Maltez Mouro

Centro de Ecologia Funcional
Departamento de Botânica
Universidade de Coimbra

[EMAIL PROTECTED]
www.uc.pt/ecology/saramaltezmouro


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] different ACF results

2008-11-20 Thread Sara Mouro
Dear all,

I have one Model (M3) fitted using the lme package, and I have  
checked the correlation structure of within-group errors using

plot(ACF (M3,maxLag=10),alpha=0.05)

But now I am not sure how to interpret this plot for the empirical  
autocorrelation function.

The problem is that I am used to see/interpret diagrams in which all  
the autocorrelation Lags, except lag-1, are inside the confidence  
envelopes, or those plots where only Lags 1 and 2 are outside those  
envelopes.

But how should I interpret my ACF plot, where Lags 1, 7, 8 and 9, are  
those outside those envelopes?

Is there any correlation structure?
Which one might that be? AR1()?


Also, I have used the plot of the empirical ACF of the normalized  
residuals, but it gives exactly the same results.

Could you please help me?

Best regards
Sara Mouro


Sara Maltez Mouro

Centro de Ecologia Funcional
Departamento de Botânica
Universidade de Coimbra

[EMAIL PROTECTED]
www.uc.pt/ecology/saramaltezmouro


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] how to join these two models?

2008-11-15 Thread Sara Mouro
Dear R users,

I have this 2 models that fit to my data:


M3varI - update (M3, weights=varIdent(form= ~ 1|SITE))

M3AR1-update(M3,correlation=corAR1())

The first one, updates my M3 so that I can account for the variance  
structure of random erros.
The second one, updates my M3 so that I can account for the  
correlation structure of random errors.


How can I put them toghether in one final model?

I have tryed it using gls but I could not do it.

Could you please help me o this?

Bets regards,

Sara Maltez Mouro

Centro de Ecologia Funcional
Departamento de Botânica
Universidade de Coimbra

[EMAIL PROTECTED]
www.uc.pt/ecology/saramaltezmouro


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] uninitialized pdMat object

2008-11-13 Thread Sara Mouro
Dear all,

I am using the nlme package and trying to modelate the variance- 
covariance matrix of random effects.
However, I do not understand why do I get this error message:


  M4CompSym - update(M4,random=A~pdCompSymm(~CED))
Error in pdMatrix.pdCompSymm(x) :
   Cannot extract the matrix from an uninitialized pdMat object

Can anyone please help me?

How do I update one Model using one of the pre-defined matrixes?


Regards,
Sara Mouro



Sara Maltez Mouro

Centro de Ecologia Funcional
Departamento de Botânica
Universidade de Coimbra

[EMAIL PROTECTED]
www.uc.pt/ecology/saramaltezmouro


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] random parameters in nlme

2008-11-12 Thread Sara Mouro
Dear all,

I am using the nlme package to find the best model using non-linear  
mixed effects model.

After the all the other things needed, I did

   M1- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list 
(A~SITE,B~1), random=B~1,start=list(fixed=c 
(1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc)

and it was ok.


However, the data showed to need random parameters at both the  
intercept and the slope.
And I can not understand why do I always get an error message like:

Error in parse(text = paste(~, paste(nVal, collapse = /))) :
   unexpected end of input in ~ 
or
Error in nlme.formula(NShrubs ~ A * exp(-B * CED), data = DataSg,  
fixed = list(A ~  :
   random formula must be a formula or list of formulae


Could you please tell me where/what am I doing wrong (in any of the  
following options I have uses)?


   M1- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list 
(A~SITE,B~1), random=list(B~1),start=list(fixed=c 
(1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc)

  M1- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list 
(A~SITE,B~1), random=list(B~1(SITE)),start=list(fixed=c 
(1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc)

  M1- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list 
(A~SITE,B~1), random=~CED,start=list(fixed=c 
(1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc)

  M1- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list 
(A~SITE,B~1), random=list(A~I,B~I),start=list(fixed=c 
(1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc)

  M1- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list 
(A~SITE,B~1), random=~1,start=list(fixed=c 
(1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc)

  M1- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list 
(A~SITE,B~1), random=~1|SITE,start=list(fixed=c 
(1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc)

  M1- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list 
(A~SITE,B~1), random=~1|SITE/T,start=list(fixed=c 
(1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc)


I would be really greatful if you can please help me on this.


Best regards,

Sara Maltez Mouro

Centro de Ecologia Funcional
Departamento de Botânica
Universidade de Coimbra

[EMAIL PROTECTED]
www.uc.pt/ecology/saramaltezmouro


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] memory problems (not me. my pc!)

2008-01-09 Thread Sara Mouro
Dear R users,

I have got an error message related with memory size, but I could not  
understand if and how to solve it.
Could you please help me?

I was using the source quickPCNM-761.R, for a space matrix with 12572  
rows (with X and Y (UTM) coordinates), and an Y matrix containing  
response data, with 10 variables (with lots of zero values).

When I run:
  resPCNM-quickPCNM(dados1,coordXY)

I got:
Error: cannot allocate vector of size 602.9 Mb
In addition: Warning messages:
1: In vector(double, length) :
   Reached total allocation of 254Mb: see help(memory.size)
2: In vector(double, length) :
   Reached total allocation of 254Mb: see help(memory.size)
3: In vector(double, length) :
   Reached total allocation of 254Mb: see help(memory.size)
4: In vector(double, length) :
   Reached total allocation of 254Mb: see help(memory.size)

Afterwards I have used memory.size as follows:

  memory.size()
[1] 14.10536
  memory.size(TRUE)
[1] 19.1875
  round(memory.limit(), 2)
[1] 254.98


How could I solve this problem?
With another (i.e. with more memory) PC?
How much memory do I nedd? 602.9?


Best regards,
Sara Mouro
PS- I have also used the option range=TRUE, and thus I think the  
memory problems have nothing to do with the (high) UTM values.
PS2- I hope the zero values in response variables are not a problem  
for PCNM analysis?!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to compile sources?

2007-10-17 Thread Sara Mouro
Dear all,


I have read the on-line explanations I have found about Building R  
from sources, and istalling Packages from sources...
Also, I have installed gcc4.0 and the gfrotran-4.2.1.dmg.

However, I still do not know how to use them to compile one Source  
(in particular packfor_0.0-7.tar.gz) so that I can use it in R (for  
MAC OS X).

Could someone please explain it to me in an easiest way (i.e. to  
someone who has already suffered enough to learn R for herself, and  
knows little about programming)?

Thank you in advance!

Best regards,
Sara Mouro

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.