s-news
[Top] [All Lists]

print(summary) used in a function

To: s-news@lists.biostat.wustl.edu
Subject: print(summary) used in a function
From: yiwu ye <yiwu21111958@yahoo.com>
Date: Mon, 16 Jan 2006 15:02:52 -0800 (PST)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1ewq27+iCpSYsTUfM5pEm4BWuuwoAgb3o8LiT7aR5rHfkwMV461oZnM2zBh0igXENj2rlXXnlYi0OvEoxEiCTfLA5LUgDCJo805NULag5wSWIuNHSnULhJWbxbc9oyXkUosGEsCP44r5rCJDQGoND9PGVlqHQPdkOSKvlPeVTiU= ;
 Dear list,

I wrote a function to fit a GLM model for a series of data. In order to know the analysis of deviance table, I used print(summary(GLM-model)) in the function.

glm.fit<-function(data="" a=a,b=b)
{  
     data1<-cbind(data, a^b) # some function creates a new data frame
    fit_glm(...., data="">     print(anova(fit,test="Chi"))
}

when execute the above funciton, I got the following error message:

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

It is probably a scoping problem. Could any one help with this?

Thanks very much

Yiwu


Yahoo! Photos
Got holiday prints? See all the ways to get quality prints in your hands ASAP.
<Prev in Thread] Current Thread [Next in Thread>