predict.probit {sampleSelection} | R Documentation |
Predict method for fitted probit models
Description
Calculate predicted values for fitted probit
models.
Usage
## S3 method for class 'probit'
predict( object, newdata = NULL, type = "link", ... )
Arguments
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). |
Value
A numeric vector of the predicted values.
Author(s)
Arne Henningsen and the R Core Team (the code of predict.probit
is partly based on the code of predict.lm
and predict.glm
).
See Also
probit
, predict
,
predict.glm
, residuals.probit
,
and probit-methods
.
Examples
## 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]
[Package sampleSelection version 1.2-12 Index]