linearPredictors: Calculates linear predictors for different models

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/linearPredictors.R

Description

Calculates the (unobservable) linear predictors for probability models.

Usage

1
2
3
4
linearPredictors(x, ...)

## S3 method for class 'probit'
linearPredictors( x, ... )

Arguments

x

model of an appropriate class

...

other arguments depending on the method

Details

It is a generic function with a method for 'probit'.

Value

A matrix with nrow equal to the number of observations and one column: the linear predictors for observations

Author(s)

Ott Toomet otoomet@ut.ee, Arne Henningsen

See Also

probit and probit-methods.

Examples

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

sampleSelection documentation built on Jan. 13, 2021, 7:49 p.m.