[R] Glm poisson
Francisco J. Zagmutt
gerifalte28 at hotmail.com
Mon Mar 27 20:14:43 CEST 2006
Why are you trying to extract the values by calling a function with the name
of the value? glm objects are stored as a list i.e.
str(pAmeir_1)
Hence, you can extract what you need by selecting the values on the list
i.e.
pAmeir_1$df.null
pAmeir_1$null.deviance
Cheers
Francisco
>From: "Guenther, Cameron" <Cameron.Guenther at MyFWC.com>
>To: <R-help at r-project.org>, <r-help at stat.math.ethz.ch>
>Subject: [R] Glm poisson
>Date: Mon, 27 Mar 2006 12:07:04 -0500
>
>Hello,
>I am using the glm model with a poisson distribution. The model runs
>just fine but when I try to get the null deviance for the model of the
>null degrees of freedom I get the following errors:
>
> > null.deviance(pAmeir_1)
>Error: couldn't find function "null.deviance"
>
> > df.null(pAmeir_1)
>Error: couldn't find function "df.null"
>
>When I do:
>
> > names(pAmeir_1)
> [1] "coefficients" "residuals" "fitted.values"
> [4] "effects" "R" "rank"
> [7] "qr" "family" "linear.predictors"
>[10] "deviance" "aic" "null.deviance"
>[13] "iter" "weights" "prior.weights"
>[16] "df.residual" "df.null" "y"
>[19] "converged" "boundary" "model"
>[22] "call" "formula" "terms"
>[25] "data" "offset" "control"
>[28] "method" "contrasts" "xlevels"
>
>It tells me that the values are there but I can not access them.
>
>Any comments would be greatly appreciated.
>
>Thank you
>
>Cameron Guenther, Ph.D.
>Associate Research Scientist
>FWC/FWRI, Marine Fisheries Research
>100 8th Avenue S.E.
>St. Petersburg, FL 33701
>(727)896-8626 Ext. 4305
>cameron.guenther at myfwc.com
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
>http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list