[R-sig-ME] corGaus specification

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Wed Jun 9 14:09:44 CEST 2010


Dear Jennifer,

Have you tried to specify some staring values for the correlation. I
noticed that lme uses a fraction of the smallest distance between two
points as starting value for the range. Changing that value to a more
sensible one based a variogram yielded more realistic parameters for
range and nugget.

HTH,

Thierry

------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium

tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey
  

> -----Oorspronkelijk bericht-----
> Van: r-sig-mixed-models-bounces at r-project.org 
> [mailto:r-sig-mixed-models-bounces at r-project.org] Namens jjclark
> Verzonden: dinsdag 8 juni 2010 21:22
> Aan: r-sig-mixed-models at r-project.org
> Onderwerp: [R-sig-ME] corGaus specification
> 
> 
> I'm trying to run a linear mixed model with a spatial 
> gaussian correlation using the lme function.  I have a y, a 
> linear term, x, and 5 additional variables (z1,z2,z3,z4,z5) 
> for each observation and am trying to build a model with a 
> random effect for each observation with the z variables used 
> in the gaussian correlation.  In SAS the following code 
> builds this model:
> proc mixed data=dat; 
> class obs; 	
> model y=x / ddfm=bw;	
> random obs/type=sp(gau)(z1 z2 z3 z4 z5); run;
> 
> I am still fairly new to using R and have tried using the 
> following code to build this same model with no success:
> 
> cobs=factor(obs)
> lme(y ~ x, dat, random = ~ 1|cobs, correlation = corGaus(form = ~
> z1+z2+z3+z4+z5|cobs))
> 
> The code runs when I take out the correlation specification, 
> but with it I get the following error:
> Error in corFactor.corSpatial(object) : NA/NaN/Inf in foreign 
> function call (arg 1) In addition: Warning messages:
> 1: no non-missing arguments to min; returning Inf in:
> min(unlist(attr(object, "covariate")))
> 2: no non-missing arguments to min; returning Inf in:
> min(unlist(attr(object, "covariate")))
> 
> All the z's are between 0 and 1 and are non-missing.  Can 
> anyone give me some pointers as to how to specify the 
> Gaussian spatial correlation for mixed models either here or 
> perhaps in another R function?  Thank You!
> 
> Jennifer
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 

Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.




More information about the R-sig-mixed-models mailing list