[R] spatial autcorrelation in glmmPQL

From: Dan Bebber <danbebber_at_forestecology.co.uk>
Date: Wed 01 Sep 2004 - 05:09:31 EST


I am unable to specify error spatial autocorrelation structure in glmmPQL:

DATA
x and y coordinates for sample points at which presence/absence of seedlings and canopy openness were recorded in different forest stands.

QUESTION
Does seedling density increase with canopy openness?

ANALYSIS
Initial analysis using glmmPQL with binomial errors and stand as random effect
> result <- glmmPQL(seedlings ~ canopy, random = ~1|stand, family=binomial,
data=regen)

Semivariogram of residuals from this fit using geoR showed spatial autocorrelation with range 34.9 m and relative nugget of 75%. Therefore I tried to create a corStruct object:
> corel <- corSpher(value = c(34.9,0.75), form = ~x+y, nugget=TRUE)
> corel <- Initialize(corel, data = regen)

And specify the structure in a new glmmPQL
> result2 <- glmmPQL(seedlings ~ canopy, random = ~|stand, family =
binomial, correlation = corel, data=regen)

PROBLEM
I get the error message:
iteration 1
Error in eval(expr, envir, enclos) : Object "x" not found

(Running R 1.9.1 on Windows ME)

I appear to be implementing corSpher and Initialize incorrectly- any help greatly appreciated.



Dr. Daniel P. Bebber
Department of Plant Sciences
University of Oxford
South Parks Road
Oxford
OX1 3RB
Tel. 01865 275060
---

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Sep 01 07:33:24 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:56:21 EST