Predict method for fitted probit models
Calculate predicted values for fitted probit
models.
## S3 method for class 'probit' predict( object, newdata = NULL, type = "link", ... )
object |
a fitted object of class |
newdata |
optionally, a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors or the fitted response values are returned. |
type |
the type of prediction.
If this argument is |
... |
further arguments (currently ignored). |
A numeric vector of the predicted values.
Arne Henningsen and the R Core Team (the code of predict.probit
is partly based on the code of predict.lm
and predict.glm
).
## female labour force participation probability data( "Mroz87" ) m <- probit( lfp ~ kids5 + kids618 + educ + hushrs + huseduc + huswage + mtr + motheduc, data=Mroz87 ) predict( m ) # equal to linearPredictors(m) predict( m, type = "response" ) # equal to fitted(m) predict( m, newdata = Mroz87[ 3:9, ] ) # equal to linearPredictors(m)[3:9] predict( m, newdata = Mroz87[ 3:9, ], type = "response" ) # equal to fitted(m)[3:9]
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.