View source: R/linearPredictors.R
| linearPredictors | R Documentation |
Calculates the (unobservable) linear predictors for probability models.
linearPredictors(x, ...)
## S3 method for class 'probit'
linearPredictors( x, ... )
x |
model of an appropriate class |
... |
other arguments depending on the method |
It is a generic function with a method for 'probit'.
A matrix with nrow equal to the number of observations and one column: the linear predictors for observations
Ott Toomet otoomet@ut.ee, Arne Henningsen
probit and probit-methods.
data(Mroz87)
Mroz87$kids <- ( Mroz87$kids5 + Mroz87$kids618 > 0 )
a <- probit(lfp ~ kids + educ + hushrs + huseduc + huswage + mtr +
motheduc, data=Mroz87)
b <- linearPredictors(a)
cor(Mroz87$lfp, b) # should be positive and highly significant
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.