predict.probit: Predict method for fitted probit models

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculate predicted values for fitted probit models.

Usage

1
2
   ## S3 method for class 'probit'
predict( object, newdata = NULL, type = "link", ... )

Arguments

object

a fitted object of class probit.

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 "link" (the default), the predicted linear predictors are returned. If this argument is "response", the predicted probabilities are returned.

...

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

1
2
3
4
5
6
7
8
## 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]

sampleSelection2 documentation built on May 2, 2019, 6:08 p.m.