Summarising model fits from models fitted using the MRSea package.
Source:R/summary.R
summary.gamMRSea.Rd
(object, dispersion = NULL, varshortnames=NULL, ...)
Usage
# S3 method for gamMRSea
summary(object, dispersion = NULL, digits = 7, varshortnames = NULL, ...)
Arguments
- object
an object of class "gamMRSea", usually, a result of a call from the MRSea package.
- dispersion
the dispersion parameter for the family used. Either a single numerical value or NULL (the default), when it is inferred from object (see 'Details').
- digits
the number of significant digits to use when printing.
- varshortnames
vector stating the short versions of the covariate names if required.
- ...
further arguments passed to or from other methods.
Details
print.summary.gamMRSea
tries to be smart about formatting the coefficients, standard errors, etc. and additionally gives 'significance stars' if signif.stars is TRUE. The coefficients component of the result gives the estimated coefficients and their estimated standard errors (raw and robust), together with their ratio (from robust s.e.). The third column gives the robust standard errors calculated using the sandwich estimator. If no correlation is present, the second and third columns are the same as the sandwich estimator is not used when data points are independent. The fourth column is labelled Wald and gives the Wald test statistic, based on the robust standard errors. The fifth column gives the two-tailed p-value corresponding to the Wald test ().
Aliased coefficients are omitted in the returned object but restored by the print method.
Correlations are printed to two decimal places (or symbolically): to see the actual correlations print summary(object)$correlation directly.
summary.gamMRSea
returns an object of class "summary.gamMRSea", a list with components
call the component from object.
family the component from object.
deviance the component from object.
contrasts the component from object.
df.residual the component from object.
null.deviance the component from object.
df.null the component from object.
deviance.resid the deviance residuals: see residuals.glm.
coefficients the matrix of coefficients, standard errors, z-values and p-values. Aliased coefficients are omitted.
aliased named logical vector showing if the original coefficients are aliased.
dispersion either the supplied argument or the inferred/estimated dispersion if the latter is NULL.
df a 3-vector of the rank of the model and the number of residual degrees of freedom, plus number of coefficients (including aliased ones).
cov.unscaled the unscaled (dispersion = 1) estimated covariance matrix of the estimated coefficients.
cov.scaled ditto, scaled by dispersion.
correlation (only if correlation is true.) The estimated correlations of the estimated coefficients.
symbolic.cor (only if correlation is true.) The value of the argument symbolic.cor.
Examples
# load data
data(ns.data.re)
ns.data.re$foldid<-getCVids(ns.data.re, folds=5)
model<-gamMRSea(birds ~ observationhour + as.factor(floodebb) + as.factor(impact),
family='poisson', data=ns.data.re)
summary(model)
#>
#> Call:
#> gamMRSea(formula = birds ~ observationhour + as.factor(floodebb) +
#> as.factor(impact), family = "poisson", data = ns.data.re)
#>
#> Deviance Residuals:
#> Min 1Q Median 3Q Max
#> -2.587 -1.810 -1.573 -1.293 35.514
#>
#> Coefficients:
#> Estimate Std. Error Robust S.E. z value Pr(>|z|)
#> (Intercept) 1.444206 0.020505 0.020505 70.432 < 2e-16 ***
#> observationhour -0.095957 0.001573 0.001573 -61.016 < 2e-16 ***
#> as.factor(floodebb)FLOOD -0.037545 0.012366 0.012366 -3.036 0.0024 **
#> as.factor(floodebb)SLACK 0.243291 0.012140 0.012140 20.040 < 2e-16 ***
#> as.factor(impact)1 -0.042971 0.009884 0.009884 -4.348 1.38e-05 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> (Dispersion parameter for poisson family taken to be 1)
#>
#> Null deviance: 186644 on 27797 degrees of freedom
#> Residual deviance: 182142 on 27793 degrees of freedom
#> AIC: 200064
#>
#> Max Panel Size = 1 (independence assumed); Number of panels = 27798
#> Number of Fisher Scoring iterations: 7
#>