[R-sig-ME] lme ->Error in getGroups.data.frame(dataMix, groups)

Boy Possen bpo@@en @ending from gm@il@com
Mon Dec 10 22:17:32 CET 2018

The basic idea is to create a linear model in R such that FinH is explained
by SoilNkh, dDDSP, dDDSP2, Provenance, Site, Genotype and Block, where
SoilNkh, dDDSP and dDDSP2 are continuous covariates, Provenance, Site,
Genotype and Block are factors, Site and Provenance are fixed and Genotype
and Block are random. Also, Genotype is nested within Provenance and Block
within Site.

Since the order the variables go in is of importance, it should be a Anova
type-I with the parameters in following order:

For the fixed part I am oké with either:

test31 <-lm(FinH~SoilNkh + Site + dDDSP + dDDSP2 + Provenance +
Site:Provenance ,data=d1)

test32 <-aov(FinH~SoilNkh + Site + dDDSP + dDDSP2 + Provenance +
Site:Provenance ,data=d1

When trying to specify the random-part, taking the above text as starting
point, trouble starts :)

I feel it should be of the form:

test64 <- lme(FinH~SoilNkh + Site + dDDSP + dDDSP2 + Provenance +
            random = ~1|Provenance/Genotype + ~1|Site/Block,data=d1)

but I can't avoid the error

"Error in getGroups.data.frame(dataMix, groups) : invalid formula for

I am lost for clues, really, so any advice would be great! If any data
should be supplied, I'd be happy to provide of course, but can't (yet)
figure out how...

Thanks in advance for your time.

B.J.H.M. Possen

	[[alternative HTML version deleted]]

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