predict.repolr: Predict Method for Fitted repolr Model

Description Usage Arguments Details Value Examples

Description

Calculates predictions and standard errors of predictions for a fitted repolr model object.

Usage

1
2
3
## S3 method for class 'repolr'
predict(object, newdata = NULL, se.fit = FALSE,
           robust.var = TRUE, type = c("link", "response", "terms"), ...)

Arguments

object

is a model fitted using repolr.

newdata

optionally, a data frame in which to find variables with which to predict; if missing the model fitted values are reported.

se.fit

Logical indicating if standard errors are required.

robust.var

logical; if TRUE, standard errors are based on the robust variance matrix.

type

is the type of prediction required. The default “link” is to use the scale of the linear predictors; i.e. the log-odds of cumulative probabilities. The alternative is to report the predicted cumulative probabilities; “response”. The “terms” option returns the matrix of fitted values for each model term on the scale of the linear predictor.

...

further arguments passed to or from other methods.

Details

If newdata is missing predictions are based on the data used to fit the repolr model. If newdata are supplied then the format of these data must conform to the same format required for model fitting using repolr. See repolr for details.

Value

fit

Predictions.

se.fit

Estimated standard errors.

Examples

1
2
3
4
5
6
data(HHSpain)
mod.0 <- repolr(HHSpain~Sex*Time, data=HHSpain, categories=4, subjects="Patient",
            times=c(1,2,5), corr.mod="uniform", alpha=0.5)
predict(mod.0, newdata = data.frame(Patient = rep(100, 3), Time = c(1, 2, 5),
       Sex = factor(rep(1, 3), levels=1:2, labels=c("F", "M"))), 
       type="link", se.fit = TRUE)


Search within the repolr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.