On Wed, 5 Jul 2000, halvorsen wrote:
Hola!
I have the following simple function:
function(pow){
ob <- glm(Pound~CG+Age+Vage,data=car,weights=No,
subset=No>0,family=quasi(link=power(pow),var=mu^2))
deviance(ob)
}
But trying to run it gives:
Error in power(pow) : Object "pow" not found
'pow' isn't found because quasi() is looking for it in a strange place.
Normally you would expect this sort of syntax to work, but the family
functions do some tricky things to allow you to specify things with or
without quotes and without or without parentheses.
I suspect this might count as a bug.
In any case, you can fix it by doing
eval(substitute(glm(Pound~CG+Age+Vage,data=car,weights=No subset=No>0,
family=quasi(link=power(pow),var=mu^2))))