[R] ANCOVA with defined error terms

Richard M. Heiberger rmh at temple.edu
Sun Aug 23 07:25:37 CEST 2009


Your model formula cannot be correct.

The phrase
Error(block/plot, data = track)

is wrong.

It has to be something like this
Error(block/plot), data = track

The Error function requires a well-defined formula.
The "," character cannot be inside the Error function.



You misunderstood my use of sapply.
I am illustrating the number of levels for each of the factors.
That is information about the data.frame.
It is not part of a model specification.



I need reproducible code to do anything further.
I need exactly three complete statements of the form

    track <- structure(....)    ## from your earlier email
    mymodel <- aov(   formula + Error(errorformula), data=track)
    summary(mymodel)

Do not attach() anything.  I am wondering now if that use of the
attach() function in early email was part of your difficulty.

When you have those three statements ready, open a fresh copy
of R with the MSDOS command statement

    c:\progra~1\R\R-2.9.1\bin\Rgui --vanilla

Then paste the three statements in.  If that works, send the three
statements.




More information about the R-help mailing list