fitted.fmlogit | R Documentation |
Extract fitted values, residuals, and predictions
## 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)
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. |
#results1 = fmlogit(y,X) fitted(results1) residuals(results1) predict(results1) # predict using the first observation from the original dataset. predict(results1,X[1,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.