summary.scam: Summary for a SCAM fit

summary.scamR Documentation

Summary for a SCAM fit

Description

Takes a fitted scam object produced by scam() and produces various useful summaries from it. The same code as in summary.gam of the mgcv package is used here with slight modifications to accept the exponentiated parameters of the shape constrained smooth terms and the corresponding covariance matrix.

Usage

## S3 method for class 'scam'
summary(object, dispersion=NULL, freq=FALSE, ...)

## S3 method for class 'summary.scam'
print(x,digits = max(3, getOption("digits") - 3), 
                  signif.stars = getOption("show.signif.stars"),...)

Arguments

object

a fitted scam object as produced by scam().

x

a summary.scam object produced by summary.scam().

dispersion

A known dispersion parameter. NULL to use estimate or default (e.g. 1 for Poisson).

freq

By default p-values for individual terms are calculated using the Bayesian estimated covariance matrix of the parameter estimators. If this is set to TRUE then the frequentist covariance matrix of the parameters is used instead.

digits

controls number of digits printed in output.

signif.stars

Should significance stars be printed alongside output.

...

other arguments.

Value

summary.scam produces the same list of summary information for a fitted scam object as in the unconstrained case summary.gam except for the last element BFGS termination condition.

p.coeff

is an array of estimates of the strictly parametric model coefficients.

p.t

is an array of the p.coeff's divided by their standard errors.

p.pv

is an array of p-values for the null hypothesis that the corresponding parameter is zero. Calculated with reference to the t distribution with the estimated residual degrees of freedom for the model fit if the dispersion parameter has been estimated, and the standard normal if not.

m

The number of smooth terms in the model.

chi.sq

An array of test statistics for assessing the significance of model smooth terms. See details.

s.pv

An array of approximate p-values for the null hypotheses that each smooth term is zero. Be warned, these are only approximate.

se

array of standard error estimates for all parameter estimates.

r.sq

The adjusted r-squared for the model. Defined as the proportion of variance explained, where original variance and residual variance are both estimated using unbiased estimators. This quantity can be negative if your model is worse than a one parameter constant model, and can be higher for the smaller of two nested models! Note that proportion null deviance explained is probably more appropriate for non-normal errors.

dev.expl

The proportion of the null deviance explained by the model.

edf

array of estimated degrees of freedom for the model terms.

residual.df

estimated residual degrees of freedom.

n

number of data.

gcv

minimized GCV score for the model, if GCV used.

ubre

minimized UBRE score for the model, if UBRE used.

scale

estimated (or given) scale parameter.

family

the family used.

formula

the original scam formula.

dispersion

the scale parameter.

pTerms.df

the degrees of freedom associated with each parameteric term (excluding the constant).

pTerms.chi.sq

a Wald statistic for testing the null hypothesis that the each parametric term is zero.

pTerms.pv

p-values associated with the tests that each term is zero. For penalized fits these are approximate. The reference distribution is an appropriate chi-squared when the scale parameter is known, and is based on an F when it is not.

cov.unscaled

The estimated covariance matrix of the parameters (or estimators if freq=TRUE), divided by scale parameter.

cov.scaled

The estimated covariance matrix of the parameters (estimators if freq=TRUE).

p.table

significance table for parameters

s.table

significance table for smooths

pTerms.table

significance table for parametric model terms

BFGS termination condition

the value of the maximum component of the scaled GCV/UBRE gradient used as stopping condition. This value is printed if the termination code of the BFGS optimization process is not ‘1’ (not full convergence) (see bfgs_gcv.ubrefor details)

WARNING

The p-values are approximate.

Author(s)

Natalya Pya <nat.pya@gmail.com> based on mgcv by Simon Wood

References

Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.

Pya, N. and Wood, S.N. (2015) Shape constrained additive models. Statistics and Computing, 25(3), 543-559

Pya, N. (2010) Additive models with shape constraints. PhD thesis. University of Bath. Department of Mathematical Sciences

See Also

scam

Examples

 ## Not run: 
## simulating data...
require(scam)
n <- 200
set.seed(1)
x1 <- runif(n)*6-3
f1 <- 3*exp(-x1^2) # unconstrained smooth term
x2 <- runif(n)*4-1;
f2 <- exp(4*x2)/(1+exp(4*x2)) # monotone increasing smooth
x3 <- runif(n)*5;
f3 <- -log(x3)/5  # monotone decreasing smooth
f <- f1+f2+f3
y <- f + rnorm(n)*.3
dat <- data.frame(x1=x1,x2=x2,x3=x3,y=y)
## fit model ...
b <- scam(y~s(x1,k=15,bs="cr",m=2)+s(x2,k=30,bs="mpi",m=2)+s(x3,k=30,bs="mpd",m=2),
     data=dat)

summary(b)
plot(b,pages=1,shade=TRUE)  
 
## End(Not run)  

scam documentation built on June 22, 2024, 10:43 a.m.