fitted.fmlogit: Extract fitted values, residuals, and predictions

View source: R/predictions.R

fitted.fmlogitR Documentation

Extract fitted values, residuals, and predictions

Description

Extract fitted values, residuals, and predictions

Usage

## S3 method for class 'fmlogit'
fitted(object)

## S3 method for class 'fmlogit'
residuals(object)

## S3 method for class 'fmlogit'
predict(object, newdata = NULL, newbeta = NULL)

Arguments

object

A "fmlogit" object.

newdata

A new X matrix to perform model prediction. If Null, default to the original dataset. X can be a vector with length k, or a matrix with k columns, where k is the number of explanatory variables in the original model.

newbeta

A new augmented matrix of coefficients that can be used to predict outcome variables. Feeds into object$coefficient, which contains the baseline coefficient. Useful for constructing confidence intervals via simulation or bootstrapping.

Examples

#results1 = fmlogit(y,X)
fitted(results1)
residuals(results1)
predict(results1)
# predict using the first observation from the original dataset.
predict(results1,X[1,])

f1kidd/fmlogit documentation built on June 26, 2022, 4:33 p.m.