anova.gnm {glmtoolbox} | R Documentation |
Comparison of nested models in Generalized Nonlinear Models.
Description
Allows to use the likelihood-ratio test to compare nested models in generalized nonlinear models.
Usage
## S3 method for class 'gnm'
anova(object, ..., verbose = TRUE)
Arguments
object |
an object of the class gnm. |
... |
another objects of the class gnm. |
verbose |
an (optional) logical indicating if should the report of results be printed. As default, |
Value
A matrix with the following three columns:
Chi | The value of the statistic of the test, |
Df | The number of degrees of freedom, |
Pr(>Chi) | The p-value of the test -type test computed using the Chi-square distribution. |
Examples
###### Example: The effects of fertilizers on coastal Bermuda grass
data(Grass)
fit1 <- gnm(Yield ~ b0 + b1/(Nitrogen + a1) + b2/(Phosphorus + a2) + b3/(Potassium + a3),
family=gaussian(inverse), start=c(b0=0.1,b1=13,b2=1,b3=1,a1=45,a2=15,a3=30), data=Grass)
fit2 <- update(fit1,Yield ~ I(b0 + b2/(Phosphorus + a2) + b3/(Potassium + a3)),
start=c(b0=0.1,b2=1,b3=1,a2=15,a3=30))
anova(fit2,fit1)
[Package glmtoolbox version 0.1.12 Index]