s-news
[Top] [All Lists]

anova problem

To: "S-Plus newsgroup" <s-news@lists.biostat.wustl.edu>
Subject: anova problem
From: "James Dartnall" <J.E.Dartnall@maths.soton.ac.uk>
Date: Thu, 20 Mar 2003 16:52:04 -0000
Dear All,
I am simply baffled by a problem I have been having recently with the anova
command. If I have the following command in a function it will not evaluate
it and comes up with an error message.

model1 <- function()
{
     i <- 247    #any number
    anova(glm(AccTotal[97:264,i] ~ TT$amv[1:168] ,family = poisson))
}

The above code seems to work fine with any other function like "coef" or
"summary" but will not work for anova, which is very frustrating in a
situation involving loops.

the error message I get is the following:

    Problem in eval(oc, list()): Object "i" not found
    Use traceback() to see the call stack


advance thanks for help
James


<Prev in Thread] Current Thread [Next in Thread>
  • anova problem, James Dartnall <=