coef.selection: Extract Coefficients from Selection Models

Description Usage Arguments Value Author(s) See Also Examples

View source: R/coef.selection.R

Description

This function extracts coefficients from sample selection models

Usage

1
2
3
4
5
6
7
## S3 method for class 'selection'
coef(object, part = "full", ...)
## S3 method for class 'summary.selection'
coef(object, part = "full", ...)
## S3 method for class 'coef.selection'
print( x, prefix = TRUE,
      digits = max(3, getOption("digits") - 3), ... )

Arguments

object

object of class selection or summary.selection.

part

character string indicating which parts of the coefficients to extract: "full" for all parameters (selection estimates, outcome estimates, error variance and correlation, including parameters that were calculated based on estimated parameters), "outcome" for the outcome estimates only (including the coefficient of the inverse Mill's ratio in case of a two-step estimation), or "est" for all estimated parameters.

x

object returned by coef.selection.

prefix

logical. Add a prefix to the names of the coefficients that indicates to which equation the coefficient belongs.

digits

numeric, (suggested) number of significant digits.

...

currently not used.

Value

coef.selection returns a vector of the estimated coefficients.

coef.summary.selection returns a matrix of the estimated coefficients, their standard errors, t-values, and p-values.

Author(s)

Arne Henningsen, Ott Toomet (otoomet@ut.ee)

See Also

coef, selection, vcov.selection, and selection-methods.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Estimate a simple female wage model taking into account the labour
## force participation
   data(Mroz87)
   a <- heckit(lfp ~ huswage + kids5 + mtr + fatheduc + educ + city,
               log(wage) ~ educ + city, data=Mroz87)
## extract all coefficients of the model:
coef( a )

## now extract the coefficients of the outcome model only:
coef( a, part="outcome")

## extract all coefficients, standard errors, t-values
## and p-values of the model:
coef( summary( a ) )

## now extract the coefficients, standard errors, t-values
## and p-values of the outcome model only:
coef( summary( a ), part="outcome")

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/
S:(Intercept)      S:huswage        S:kids5          S:mtr     S:fatheduc  
     3.373544      -0.116721      -0.549777      -5.328565      -0.004907  
       S:educ         S:city  O:(Intercept)         O:educ         O:city  
     0.122318      -0.030770       0.641599       0.067209       0.100414  
invMillsRatio          sigma            rho  
    -0.604356       0.797073      -0.758219  
  (Intercept)           educ           city  invMillsRatio  
      0.64160        0.06721        0.10041       -0.60436  
                  Estimate Std. Error    t value     Pr(>|t|)
(Intercept)    3.373543841 0.86092920  3.9184916 9.734968e-05
huswage       -0.116721324 0.01917481 -6.0872223 1.842716e-09
kids5         -0.549777145 0.09872291 -5.5688913 3.587206e-08
mtr           -5.328564691 0.95382624 -5.5865151 3.254953e-08
fatheduc      -0.004906605 0.01535414 -0.3195623 7.493902e-01
educ           0.122317606 0.02596060  4.7116639 2.934354e-06
city          -0.030770029 0.10794727 -0.2850468 7.756879e-01
(Intercept)    0.641599227 0.28957702  2.2156428 2.701919e-02
educ           0.067208906 0.01857855  3.6175544 3.175815e-04
city           0.100413718 0.07586388  1.3236038 1.860429e-01
invMillsRatio -0.604355858 0.14833703 -4.0742077 5.115210e-05
sigma          0.797073254         NA         NA           NA
rho           -0.758218715         NA         NA           NA
                 Estimate Std. Error   t value     Pr(>|t|)
(Intercept)    0.64159923 0.28957702  2.215643 0.0270191870
educ           0.06720891 0.01857855  3.617554 0.0003175815
city           0.10041372 0.07586388  1.323604 0.1860428682
invMillsRatio -0.60435586 0.14833703 -4.074208 0.0000511521

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