summary.pblm: Summarizing methods for bivariate additive logistic...

View source: R/pblm_0.1-12.R

summary.pblmR Documentation

Summarizing methods for bivariate additive logistic regression

Description

Summarizing methods anf functions for objects of class pblm.

Usage

## S3 method for class 'pblm'
summary(object,...)
 
## S3 method for class 'pblm'
print(x,digits = max(3, getOption("digits") - 3),...)

## S3 method for class 'summary.pblm'
print(x,digits = max(3, getOption("digits") - 3),...) 
 
## S3 method for class 'pblm'
AIC(object,...,k=2) 

## S3 method for class 'pblm'
logLik(object, penalized=FALSE,...)

## S3 method for class 'pblm'
vcov(object,...)

## S3 method for class 'pblm'
coef(object, digits = max(3, getOption("digits") - 3), ...)

## S3 method for class 'pblm'
coefficients(object, digits = max(3, getOption("digits") - 3), ...)

## S3 method for class 'pblm'
residuals(object, type = c("working", "pearson"),...)

## S3 method for class 'pblm'
resid(object, type = c("working", "pearson"),...)

## S3 method for class 'pblm'
fitted(object,...)

## S3 method for class 'pblm'
predict(object, newdata, type=c("link","response","terms","count"), 
                  se.fit=FALSE, digits= max(6, getOption("digits") - 3),...)

## S3 method for class 'pblm'
deviance(object, penalized=FALSE,...)

edf.pblm(object, which.eq=1, which.var=1 )
chisq.test.pblm(obj)
se.smooth.pblm(object)
Rsq.pblm(object, type = c("McFadden", "Cox Snell", "Cragg Uhler", "all"))

Arguments

object, obj

An object of class pblm.

digits

Integer controlling the number of digits printed in the output.

x

An object produced by pblm or summary.pblm to be printed.

k

Numeric; the penalty per parameter to be used. By default k = 2, corresponding to the classical AIC.

penalized

Logical indicating whether the value of the penalized log-likelihood is required.

which.var

Index indicating the position of the smoother as it appears in the model formula.

which.eq

Equation index for the smoothers.

newdata

Optional data frame with new values of the model covariates.

type

The type of residuals, predictions, or pseudo R-squared desired.

se.fit

Logical. Should prediction standard errors be returned? Currently available only for type = "link" or type = "terms" when newdata is not specified, and only for type = "link" when newdata is specified.

...

Further arguments passed to or from other methods.

Details

fitted.pblm is equivalent to predict.pblm specifying type="response". chisq.test.pblm performs the \chi^2 and G^2 tests. Rsq.pblm calculates pseudo R-squared.

Value

print.pblm return an object of class "pblm". print.summary.pblm return an object of class "summary.pblm". summary.pblm returns a list with the following components:

results

A p \times 4 data frame with columns for the estimated coefficient, its standard error, z-statistic, and corresponding (two-sided) p-value.

convergence

Logical flag indicating whether the algorithm converged.

iter

Number of iterations performed in the model fitting.

logLik

Log-likelihood value at convergence.

logLikp

Penalized log-likelihood of the fitted model.

AIC

Akaike Information Criterion of the fitted model.

gAIC

Generalized AIC of the fitted model.

BIC

Bayesian Information Criterion of the fitted model.

gaic.m

Penalty coefficient used in the gAIC.

np1, np2

Number of parameters estimated in the first and second marginal, respectively.

deviance

Model deviance.

names

A character vector of length two containing the names of the response variables.

df.res

Residual degrees of freedom.

df.tot

Total degrees of freedom of the model.

df.fix

Degrees of freedom associated with the fixed part of the model.

df.smooth

Effective degrees of freedom of the smoothers in the model, if any.

res.smooth

A data frame reporting an approximate chi-squared test for the smooth terms. If the effective degrees of freedom are far from the fixed ones, consider re-fitting the model by reducing pgtol.df in pblm.control, via the control argument.

smoother

Logical. TRUE if smooth terms were used in the model.

pnl.type

Penalty type as specified in the fitted object.

PR

A matrix with residuals summarized by row, one per model equation.

which.term

A list. For internal use.

respStr

A matrix. For internal use.

label1, label2

Names of the two response variables, respectively.

call

Matched call from the fitted object.

coef.pblm, coefficients.pblm return a numeric vector of estimated coefficient.

edf.pblm returns a scalar with the effective degrees of freedom for a specified smooth term.

vcov.pblm returns the variance-covariance matrix.

If se.fit = FALSE, the method predict.pblm returns a data frame with predicted values according to the specified prediction type. If se.fit = TRUE, a list of length two is returned with the following components:

fit

Data frame of predicted values for each linear predictor, according to the specified prediction type.

se.fit

Associated data frame of standard errors.

resid.pblm, residuals.pblm return a data frame with the specified type of residuals.

se.smooth.pblm returns a list of length three, containing the standard errors and the lower and upper bounds of the 95% confidence intervals for the smooth terms.

chisq.test.pblm returns a list of length two containing the results of the \chi^2 and G^2 tests.

Rsq.pblm returns a scalar, or a list if type="both" is selected.

AIC.pblm returns a scalar with several attributes, with printed AIC and df. If more objects are passed as arguments, it returns a data frame.

logLik, deviance return a scalar.

Author(s)

Marco Enea

See Also

pblm, pb

Examples


#NOT RUN 
## Example 1
#The Dale's model 
data(ulcer)
m1 <- pblm(fo1=cbind(pain,medication)~1, fo12=~I(operation=="vh"), RC.fo=~Col,
           data=ulcer, weights=freq,  contrasts=list(Col="contr.SAS"))
summary(m1)
deviance(m1)
predict(m1,type="response")


#the same data but in another format
#compare with Dale (1986), Table 3
dat <- multicolumn(freq~medication+pain+operation,data=ulcer)
fo <- as.formula(paste(attributes(dat)$"resp","~1",sep=""))
m1bis <- pblm(fo1=fo, fo12=~I(operation=="vh"), RC.fo=~Col, verbose=TRUE,
              data=dat, ncat1=3, contrasts=list(Col="contr.SAS"))
deviance(m1bis)
chisq.test.pblm(m1bis)
Rsq.pblm(m1bis)

# Example 2. An artificial data set: 
set.seed(10)
da <- expand.grid("Y1"=1:3,"Y2"=1:3,"fat1"=0:4,"fat2"=0:1)
da$Freq <- sample(1:20,3*3*5*2,replace=TRUE)
da$x1 <- rnorm(90)

#the bivariate additive proportional-odds model
m2 <- pblm(fo1=cbind(Y1,Y2) ~ fat1 + pb(x1), data=da, weights=Freq)
summary(m2)




pblm documentation built on June 19, 2025, 5:08 p.m.