Displaying 2 results from an estimated 2 matches for "nmeffects".
2010 Feb 27
1
Newbie help with ANOVA and lm.
...time reconciling what the text books have as a brute force regression and the formula algorithm in 'R'. Specifically I see:
p <- object$rank
if (p > 0L) {
p1 <- 1L:p
comp <- object$effects[p1]
asgn <- object$assign[object$qr$pivot][p1]
nmeffects <- c("(Intercept)", attr(object$terms, "term.labels"))
tlabels <- nmeffects[1 + unique(asgn)]
ss <- c(unlist(lapply(split(comp^2, asgn), sum)), ssr)
df <- c(unlist(lapply(split(asgn, asgn), length)), dfr)
}
else {
ss <- ssr...
2006 Aug 12
0
anova.mlm for single model (one-way repeated measured anova)
...g(length.out) : Non-numeric argument to mathematical function
>
> this error occurs in anova.mlm
>
> if (rk > 0) {
> p1 <- 1:rk
> comp <- object$effects[p1, ]
> asgn <- object$assign[object$qr$pivot][p1]
> nmeffects <- c("(Intercept)", attr(object$terms,
> "term.labels"))
> tlabels <- nmeffects[1 + unique(asgn)]
> ix <- split(seq(length = nrow(comp)), asgn) #HERE
> ss <- lapply(ix, function(i) crossprod(comp[i, ,...