>
> Kway <- function(formula, family, data, ..., order=nt) {
>  models <- list()
>  mod <- glm(formula, family, data, ...)
>  terms <- terms(formula)
>  tl <- attr(terms, "term.labels")
>  nt <- length(tl)
>  models[[1]] <- mod      for(i in 2:order) {
>      models[[i]] <- update(mod, .~.^i)
>  }      # null model
>

debug shows the problem is here.  Examining that little section separately,
it seems that update() and the for loop are not working together properly,
but I am not certain how to fix it.


>  mod0 <- update(mod, .~1)
>  models <- c(mod0, models)      class(models) <- "glmlist"
>  models
> }
>
>



-- 
Joshua Wiley
Senior in Psychology
University of California, Riverside
http://www.joshuawiley.com/

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to