invMillsRatio: Inverse Mill's Ratio of probit models

Description Usage Arguments Details Value Author(s) References Examples

View source: R/invMillsRatio.R

Description

Calculates the 'Inverse Mill's Ratios' of univariate and bivariate probit models.

Usage

1

Arguments

x

probit model estimated by probit, glm or vglm.

all

a logical value indicating whether the inverse Mill's Ratios should be calculated for all observations.

Details

The formula to calculate the inverse Mill's ratios for univariate probit models is taken from Greene (2003, p. 785), whereas the formulas for bivariate probit models are derived in Henning and Henningsen (2005).

Value

A data frame that contains the Inverse Mill's Ratios (IMR) and the delta values (see Greene, 2003, p. 784).

If a univariate probit estimation is provided, the variables IMR1 and IMR0 are the Inverse Mill's Ratios to correct for a sample selection bias of y = 1 and y = 0, respectively. Accordingly, 'delta1' and 'delta0' are the corresponding delta values.

If a bivariate probit estimation is provided, the variables IMRa1, IMRa0, IMRb1, and IMRb0 are the Inverse Mills Ratios to correct for a sample selection bias of y = 1 and y = 0 in equations 'a' and 'b', respectively. Accordingly, 'deltaa1', 'deltaa0', 'deltab1' and 'deltab0' are the corresponding delta values.

Author(s)

Arne Henningsen

References

Greene, W. H. (2003) Econometric Analysis, Fifth Edition, Prentice Hall.

Henning, C.H.C.A and A. Henningsen (2005) Modeling Price Response of Farm Households in Imperfect Labor Markets in Poland: Incorporating Transaction Costs and Heterogeneity into a Farm Household Approach. Unpublished, University of Kiel, Germany.

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
## Wooldridge( 2003 ): example 17.5, page 590
data(Mroz87)
myProbit <- glm( lfp ~ nwifeinc + educ + exper + I( exper^2 ) + age +
   kids5 + kids618, family = binomial( link = "probit" ), data=Mroz87 )
Mroz87$IMR <- invMillsRatio( myProbit )$IMR1
myHeckit <- lm( log( wage ) ~ educ + exper + I( exper^2 ) + IMR,
   data = Mroz87[ Mroz87$lfp == 1, ] )

# using NO labor force participation as endogenous variable
Mroz87$nolfp <- 1 - Mroz87$lfp
myProbit2 <- glm( nolfp ~ nwifeinc + educ + exper + I( exper^2 ) + age +
   kids5 + kids618, family = binomial( link = "probit" ), data=Mroz87 )
all.equal( invMillsRatio( myProbit )$IMR1, invMillsRatio( myProbit2 )$IMR0 )
   # should be true

# example for bivariate probit
library( "mvtnorm" )
library( "VGAM" )

nObs <- 1000

# error terms (trivariate normal)
sigma <- symMatrix( c( 2, 0.7, 1.2, 1, 0.5, 1 ) )
myData <- as.data.frame( rmvnorm( nObs, c( 0, 0, 0 ), sigma ) )
names( myData ) <- c( "e0", "e1", "e2" )

# exogenous variables (indepently normal)
myData$x0 <- rnorm( nObs )
myData$x1 <- rnorm( nObs )
myData$x2 <- rnorm( nObs )

# endogenous variables
myData$y0 <-   -1.5 + 0.8 * myData$x1 + myData$e0
myData$y1 <- (  0.3 + 0.4 * myData$x1 + 0.3 * myData$x2 + myData$e1 ) > 0
myData$y2 <- ( -0.1 + 0.6 * myData$x1 + 0.7 * myData$x2 + myData$e2 ) > 0

# bivariate probit (using rhobit transformation)
bProbit <- vglm( cbind( y1, y2 ) ~ x1 + x2, family = binom2.rho,
   data = myData )
summary( bProbit )

# bivariate probit (NOT using rhobit transformation)
bProbit2 <- vglm( cbind( y1, y2 ) ~ x1 + x2, family = binom2.rho(
   lrho = "identitylink" ), data = myData )
summary( bProbit2 )

# inverse Mills Ratios
imr  <- invMillsRatio( bProbit )
imr2 <- invMillsRatio( bProbit2 )
all.equal( imr, imr2, tolerance = .Machine$double.eps ^ 0.25)

# tests
# E[ e0 | y1* > 0 & y2* > 0 ]
mean( myData$e0[ myData$y1 & myData$y2 ] )
mean( sigma[1,2] * imr$IMR11a + sigma[1,3] * imr$IMR11b, na.rm = TRUE )
# E[ e0 | y1* > 0 & y2* <= 0 ]
mean( myData$e0[ myData$y1 & !myData$y2 ] )
mean( sigma[1,2] * imr$IMR10a + sigma[1,3] * imr$IMR10b, na.rm = TRUE )
# E[ e0 | y1* <= 0 & y2* > 0 ]
mean( myData$e0[ !myData$y1 & myData$y2 ] )
mean( sigma[1,2] * imr$IMR01a + sigma[1,3] * imr$IMR01b, na.rm = TRUE )
# E[ e0 | y1* <= 0 & y2* <= 0 ]
mean( myData$e0[ !myData$y1 & !myData$y2 ] )
mean( sigma[1,2] * imr$IMR00a + sigma[1,3] * imr$IMR00b, na.rm = TRUE )
# E[ e0 | y1* > 0 ]
mean( myData$e0[ myData$y1 ] )
mean( sigma[1,2] * imr$IMR1X, na.rm = TRUE )
# E[ e0 | y1* <= 0 ]
mean( myData$e0[ !myData$y1 ] )
mean( sigma[1,2] * imr$IMR0X, na.rm = TRUE )
# E[ e0 | y2* > 0 ]
mean( myData$e0[ myData$y2 ] )
mean( sigma[1,3] * imr$IMRX1, na.rm = TRUE )
# E[ e0 | y2* <= 0 ]
mean( myData$e0[ !myData$y2 ] )
mean( sigma[1,3] * imr$IMRX0, na.rm = TRUE )

# estimation for y1* > 0 and y2* > 0
selection <- myData$y1 & myData$y2
# OLS estimation
ols11 <- lm( y0 ~ x1, data = myData, subset = selection )
summary( ols11 )
# heckman type estimation
heckit11 <- lm( y0 ~ x1 + IMR11a + IMR11b, data = cbind( myData, imr ),
   subset = selection )
summary( heckit11 )

# estimation for y1* > 0 and y2* <= 0
selection <- myData$y1 & !myData$y2
# OLS estimation
ols10 <- lm( y0 ~ x1, data = myData, subset = selection )
summary( ols10 )
# heckman type estimation
heckit10 <- lm( y0 ~ x1 + IMR10a + IMR10b, data = cbind( myData, imr ),
   subset = selection )
summary( heckit10 )

# estimation for y1* <= 0 and y2* > 0
selection <- !myData$y1 & myData$y2
# OLS estimation
ols01 <- lm( y0 ~ x1, data = myData, subset = selection )
summary( ols01 )
# heckman type estimation
heckit01 <- lm( y0 ~ x1 + IMR01a + IMR01b, data = cbind( myData, imr ),
   subset = selection )
summary( heckit01 )

# estimation for y1* <= 0 and y2* <= 0
selection <- !myData$y1 & !myData$y2
# OLS estimation
ols00 <- lm( y0 ~ x1, data = myData, subset = selection )
summary( ols00 )
# heckman type estimation
heckit00 <- lm( y0 ~ x1 + IMR00a + IMR00b, data = cbind( myData, imr ),
   subset = selection )
summary( heckit00 )

# estimation for y1* > 0
selection <- myData$y1
# OLS estimation
ols1X <- lm( y0 ~ x1, data = myData, subset = selection )
summary( ols1X )
# heckman type estimation
heckit1X <- lm( y0 ~ x1 + IMR1X, data = cbind( myData, imr ),
   subset = selection )
summary( heckit1X )

# estimation for y1* <= 0
selection <- !myData$y1
# OLS estimation
ols0X <- lm( y0 ~ x1, data = myData, subset = selection )
summary( ols0X )
# heckman type estimation
heckit0X <- lm( y0 ~ x1 + IMR0X, data = cbind( myData, imr ),
   subset = selection )
summary( heckit0X )

# estimation for y2* > 0
selection <- myData$y2
# OLS estimation
olsX1 <- lm( y0 ~ x1, data = myData, subset = selection )
summary( olsX1 )
# heckman type estimation
heckitX1 <- lm( y0 ~ x1 + IMRX1, data = cbind( myData, imr ),
   subset = selection )
summary( heckitX1 )

# estimation for y2* <= 0
selection <- !myData$y2
# OLS estimation
olsX0 <- lm( y0 ~ x1, data = myData, subset = selection )
summary( olsX0 )
# heckman type estimation
heckitX0 <- lm( y0 ~ x1 + IMRX0, data = cbind( myData, imr ),
   subset = selection )
summary( heckitX0 )

Example output

Loading required package: maxLik
Loading required package: miscTools

Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.

If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
https://r-forge.r-project.org/projects/maxlik/
[1] TRUE
Loading required package: stats4
Loading required package: splines

Attaching package: 'VGAM'

The following object is masked from 'package:sampleSelection':

    probit


Call:
vglm(formula = cbind(y1, y2) ~ x1 + x2, family = binom2.rho, 
    data = myData)

Pearson residuals:
                   Min      1Q  Median     3Q   Max
probitlink(mu1) -3.099 -0.9009  0.4622 0.7685 2.346
probitlink(mu2) -3.168 -0.6602 -0.1993 0.6541 5.677
rhobitlink(rho) -7.651 -0.6032  0.2478 0.5139 4.140

Coefficients: 
              Estimate Std. Error z value Pr(>|z|)    
(Intercept):1  0.28134    0.04178   6.734 1.66e-11 ***
(Intercept):2 -0.09840    0.04446  -2.213   0.0269 *  
(Intercept):3  1.15844    0.12659   9.151  < 2e-16 ***
x1:1           0.35687    0.04369   8.168 3.13e-16 ***
x1:2           0.59222    0.04918  12.043  < 2e-16 ***
x2:1           0.29754    0.04298   6.923 4.43e-12 ***
x2:2           0.67683    0.05130  13.195  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Names of linear predictors: probitlink(mu1), probitlink(mu2), rhobitlink(rho)

Log-likelihood: -1095.843 on 2993 degrees of freedom

Number of Fisher scoring iterations: 3 

No Hauck-Donner effect found in any of the estimates


Call:
vglm(formula = cbind(y1, y2) ~ x1 + x2, family = binom2.rho(lrho = "identitylink"), 
    data = myData)

Pearson residuals:
                   Min      1Q  Median     3Q   Max
probitlink(mu1) -3.086 -0.9034  0.4595 0.7653 2.346
probitlink(mu2) -3.273 -0.6617 -0.1966 0.6585 5.436
rho             -7.826 -0.5830  0.2583 0.5153 4.036

Coefficients: 
              Estimate Std. Error z value Pr(>|z|)    
(Intercept):1  0.28134    0.04178   6.734 1.66e-11 ***
(Intercept):2 -0.09840    0.04446  -2.213   0.0269 *  
(Intercept):3  0.52210    0.04604  11.339  < 2e-16 ***
x1:1           0.35687    0.04369   8.168 3.13e-16 ***
x1:2           0.59222    0.04918  12.043  < 2e-16 ***
x2:1           0.29754    0.04298   6.923 4.43e-12 ***
x2:2           0.67683    0.05130  13.195  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Names of linear predictors: probitlink(mu1), probitlink(mu2), rho

Log-likelihood: -1095.843 on 2993 degrees of freedom

Number of Fisher scoring iterations: 3 

No Hauck-Donner effect found in any of the estimates

[1] TRUE
[1] 0.7880256
[1] 0.8411649
[1] -0.2699706
[1] -0.3589691
[1] 0.468903
[1] 0.4019226
[1] -0.7789105
[1] -0.8908078
[1] 0.4066549
[1] 0.4080471
[1] -0.5155529
[1] -0.618372
[1] 0.7308693
[1] 0.7616975
[1] -0.5709256
[1] -0.6736764

Call:
lm(formula = y0 ~ x1, data = myData, subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.1136 -0.7843 -0.0275  0.7821  3.4793 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.56270    0.06376  -8.825  < 2e-16 ***
x1           0.46942    0.05975   7.856 4.04e-14 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.134 on 383 degrees of freedom
Multiple R-squared:  0.1388,	Adjusted R-squared:  0.1365 
F-statistic: 61.72 on 1 and 383 DF,  p-value: 4.04e-14


Call:
lm(formula = y0 ~ x1 + IMR11a + IMR11b, data = cbind(myData, 
    imr), subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.8721 -0.7544 -0.0240  0.6067  3.5395 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.9969     0.6878  -2.903  0.00391 ** 
x1            0.8282     0.1296   6.389 4.88e-10 ***
IMR11a        2.1404     2.2446   0.954  0.34090    
IMR11b        1.0673     0.3525   3.028  0.00263 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.065 on 381 degrees of freedom
Multiple R-squared:  0.2434,	Adjusted R-squared:  0.2374 
F-statistic: 40.85 on 3 and 381 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1, data = myData, subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.5027 -0.6912  0.0488  0.7793  2.8668 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.83487    0.07539 -24.340  < 2e-16 ***
x1           0.37272    0.07992   4.663 5.46e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.096 on 215 degrees of freedom
Multiple R-squared:  0.09186,	Adjusted R-squared:  0.08763 
F-statistic: 21.75 on 1 and 215 DF,  p-value: 5.461e-06


Call:
lm(formula = y0 ~ x1 + IMR10a + IMR10b, data = cbind(myData, 
    imr), subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.5825 -0.7011  0.0936  0.7392  2.2169 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -3.2661     1.8446  -1.771 0.078053 .  
x1            0.8804     0.1663   5.293 2.99e-07 ***
IMR10a        2.4208     1.6469   1.470 0.143057    
IMR10b        1.0472     0.2947   3.554 0.000467 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.9822 on 213 degrees of freedom
Multiple R-squared:  0.2774,	Adjusted R-squared:  0.2673 
F-statistic: 27.26 on 3 and 213 DF,  p-value: 5.822e-15


Call:
lm(formula = y0 ~ x1, data = myData, subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.4618 -0.6188  0.0633  0.7342  2.9974 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -0.9861     0.1247  -7.906 1.07e-11 ***
x1            0.4616     0.1526   3.025  0.00332 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.128 on 82 degrees of freedom
Multiple R-squared:  0.1004,	Adjusted R-squared:  0.0894 
F-statistic: 9.148 on 1 and 82 DF,  p-value: 0.003323


Call:
lm(formula = y0 ~ x1 + IMR01a + IMR01b, data = cbind(myData, 
    imr), subset = selection)

Residuals:
     Min       1Q   Median       3Q      Max 
-2.21368 -0.61448  0.02581  0.66745  2.18196 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept)   1.1408     5.7557   0.198  0.84339   
x1            1.0279     0.4067   2.527  0.01346 * 
IMR01a        2.1160     3.5098   0.603  0.54829   
IMR01b        0.9031     0.3126   2.889  0.00497 **
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.019 on 80 degrees of freedom
Multiple R-squared:  0.2832,	Adjusted R-squared:  0.2563 
F-statistic: 10.54 on 3 and 80 DF,  p-value: 6.489e-06


Call:
lm(formula = y0 ~ x1, data = myData, subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.3059 -0.7136 -0.0389  0.7179  3.2808 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -2.38799    0.06894 -34.639  < 2e-16 ***
x1           0.50504    0.07066   7.148 6.28e-12 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.13 on 312 degrees of freedom
Multiple R-squared:  0.1407,	Adjusted R-squared:  0.138 
F-statistic: 51.09 on 1 and 312 DF,  p-value: 6.28e-12


Call:
lm(formula = y0 ~ x1 + IMR00a + IMR00b, data = cbind(myData, 
    imr), subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.5236 -0.7402 -0.0121  0.7445  3.0029 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.6417     0.7507  -2.187 0.029509 *  
x1            0.7906     0.1267   6.240 1.44e-09 ***
IMR00a        0.1775     1.1859   0.150 0.881131    
IMR00b        1.5404     0.4502   3.421 0.000707 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.072 on 310 degrees of freedom
Multiple R-squared:  0.2317,	Adjusted R-squared:  0.2243 
F-statistic: 31.17 on 3 and 310 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1, data = myData, subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.5384 -0.8422  0.0159  0.8606  3.8369 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.05005    0.05292  -19.84   <2e-16 ***
x1           0.61499    0.05168   11.90   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.264 on 600 degrees of freedom
Multiple R-squared:  0.191,	Adjusted R-squared:  0.1896 
F-statistic: 141.6 on 1 and 600 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1 + IMR1X, data = cbind(myData, imr), subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.5180 -0.8633  0.0390  0.8578  3.8874 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.62505    0.20925  -7.766 3.53e-14 ***
x1           0.77235    0.07558  10.220  < 2e-16 ***
IMR1X        0.92323    0.32519   2.839  0.00468 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.257 on 599 degrees of freedom
Multiple R-squared:  0.2017,	Adjusted R-squared:  0.199 
F-statistic: 75.68 on 2 and 599 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1, data = myData, subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.5320 -0.8754 -0.0490  0.8899  4.1030 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -2.05778    0.06565 -31.344   <2e-16 ***
x1           0.63987    0.06951   9.205   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.258 on 396 degrees of freedom
Multiple R-squared:  0.1763,	Adjusted R-squared:  0.1742 
F-statistic: 84.74 on 1 and 396 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1 + IMR0X, data = cbind(myData, imr), subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.6358 -0.8835 -0.0711  0.9058  3.8633 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.2215     0.3177  -3.844 0.000141 ***
x1            0.8415     0.1019   8.260 2.22e-15 ***
IMR0X         0.8865     0.3296   2.689 0.007463 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.248 on 395 degrees of freedom
Multiple R-squared:  0.1911,	Adjusted R-squared:  0.187 
F-statistic: 46.65 on 2 and 395 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1, data = myData, subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.8057 -0.7642 -0.0296  0.7640  3.5448 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.64705    0.05710 -11.332   <2e-16 ***
x1           0.49052    0.05561   8.821   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.142 on 467 degrees of freedom
Multiple R-squared:  0.1428,	Adjusted R-squared:  0.141 
F-statistic: 77.82 on 1 and 467 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1 + IMRX1, data = cbind(myData, imr), subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.0754 -0.7093 -0.0606  0.6356  3.6354 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.50842    0.11934 -12.640  < 2e-16 ***
x1           0.76903    0.06251  12.303  < 2e-16 ***
IMRX1        1.18395    0.14660   8.076 5.76e-15 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.07 on 466 degrees of freedom
Multiple R-squared:  0.2481,	Adjusted R-squared:  0.2448 
F-statistic: 76.87 on 2 and 466 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1, data = myData, subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.5498 -0.7580 -0.0424  0.8063  3.1909 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -2.15926    0.05227 -41.307   <2e-16 ***
x1           0.48537    0.05431   8.938   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.152 on 529 degrees of freedom
Multiple R-squared:  0.1312,	Adjusted R-squared:  0.1295 
F-statistic: 79.88 on 1 and 529 DF,  p-value: < 2.2e-16


Call:
lm(formula = y0 ~ x1 + IMRX0, data = cbind(myData, imr), subset = selection)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.8148 -0.7703  0.0468  0.7909  2.7010 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.34764    0.11035 -12.212  < 2e-16 ***
x1           0.78002    0.06249  12.483  < 2e-16 ***
IMRX0        1.29836    0.15796   8.219 1.59e-15 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.086 on 528 degrees of freedom
Multiple R-squared:  0.2297,	Adjusted R-squared:  0.2268 
F-statistic: 78.74 on 2 and 528 DF,  p-value: < 2.2e-16

sampleSelection documentation built on Dec. 15, 2020, 3:01 a.m.