summary.plbpsm: Summary for a PLBPSM fit

Description Usage Arguments Value Examples

Description

Takes a fitted plbpsm object produced by plbpsm() and produces various useful summaries from it.

Usage

1
2
3
4
5
6
7
## S3 method for class 'plbpsm'
summary(object, h_opt = NULL, X0 = NULL,
  dispersion = NULL, ...)

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

Arguments

object

a fitted plbpsm object as produced by plbpsm().

h_opt

the bandwidth given for Spline-backfitting local estimator, default is NULL.

X0

the new predict matrix for obtaining simultaneous confidence band.

dispersion

a value for the dispersion parameter: not normally used.

...

other arguments.

x

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

digits

controls number of digits printed in output.

signif.stars

Should significance stars be printed alongside output.

Value

summary.plbpsm produces a list of summary information for a fitted plbpsm object.

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.

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! The proportion null deviance explained is probably more appropriate for non-normal errors. Note that r.sq does not include any offset in the one parameter model.

dev.expl

The proportion of the null deviance explained by the model. The null deviance is computed taking account of any offset, so dev.expl can be substantially lower than r.sq when an offset is present.

edf

array of estimated degrees of freedom for the model terms.

residual.df

estimated residual degrees of freedom.

n

number of data.

np

number of model coefficients (regression coefficients, not smoothing parameters or other parameters of likelihood).

criterion

The criterion to choose the penalty parameter lambda. "GCV" to use generalized cross validation method and "CV" for cross validation

family

The family object, specifying the distribution and link to use.

method

'ALASSO' or 'SCAD' to penalize the coefficients for parametric part.

formula

the original PLBPSM formula.

dispersion

the scale parameter.

pTerms.df

the degrees of freedom associated with each parametric 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.scaled

The estimated covariance matrix of the parameters.

p.table

significance table for parameters

p.Terms

significance table for parametric model terms

gcv_opt

The optimized gcv score.

cv_opt

The optimized cv score.

bands

A list of confidence bands for univaratie functions estimates.

mhat

The estimated values for each linear or nonlinear term.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 library(MASS)
 library(grpreg)
 library(BPST)
 data("eg1pop_dat")
 eg1_V2=eg1pop_dat[['V2']]
 eg1_T2=eg1pop_dat[['T2']]
eg1pop_rho03=eg1pop_dat[['rho03']]
sam=eg1pop_rho03[sample(1:dim(eg1pop_rho03)[1],100),]
lambda=10^(seq(-2,5,by=1))
data=sam
formula=Y~z1+z2+z3+z4+z5+z6+z7+z8+b(x1,x2,V=eg1_V2,Tr=eg1_T2,d=2,r=1,lambda=lambda)
# example 1
res=plbpsm(formula=formula,data=as.data.frame(data),VS=TRUE)
# example 12: ALASSO
res12=plbpsm(formula=formula,data=as.data.frame(data),VS=TRUE)
res10=plbpsm(formula=formula,data=as.data.frame(data),drop.intercept=TRUE)
# compare results under different settings
summary(res)
summary(res10)
summary(res12)

### GGAM-SMILE ###
data(eg1pop_poi2)
n=100
Npop=nrow(eg1pop_poi2)
ind.pop=(1:Npop)
sam.ind=sort(sample(ind.pop,n,replace=FALSE))
sam=eg1pop_poi2[sam.ind,]
data=sam
formula=Y~z1+u(z2)+u(z3)+b(x1,x2,V=eg1_V2,Tr=eg1_T2,d=2,r=1)
res_eg1_poi_add=plbpsm(formula=formula,data=as.data.frame(data),family='poisson')
summary(res_eg1_poi_add)
res_ggams=summary(res_eg1_poi_add)

# The following is the SBL estimator for u(z2)
res_ggams$bands[[1]]$est

funstatpackages/GgAM documentation built on Nov. 4, 2019, 12:59 p.m.