summary.pblm | R Documentation |
Summarizing methods anf functions for objects of class pblm
.
## 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"))
object , obj |
An object of class |
digits |
Integer controlling the number of digits printed in the output. |
x |
An object produced by |
k |
Numeric; the penalty per parameter to be used. By default |
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 |
... |
Further arguments passed to or from other methods. |
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.
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 |
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 |
smoother |
Logical. |
pnl.type |
Penalty type as specified in the fitted |
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 |
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.
Marco Enea
pblm
, pb
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.