getResDiff.CFA: getResDiff.CFA

Description Usage Arguments Value Examples

View source: R/cfa.R

Description

Get the difference between two CFA objects

Usage

1
getResDiff.CFA(cfaobj1, cfaobj2, fun, se = T, ...)

Arguments

cfaobj1

the first CFA object

cfaobj2

the second CFA object

fun

a function to apply for every value of the treatment in the cfaobj

se

whether or not to compute standard errors

...

can pass additional arguments to fun using this argument

Value

CFASE object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
data(igm)
tvals <- seq(10,12,length.out=8)
yvals <- seq(quantile(igm$lcfincome, .05), quantile(igm$lcfincome, .95), length.out=50)

## obtain counterfactual results
out <- cfa2(lcfincome ~ lfincome, tvals, yvals, igm, method1="qr",
xformla2=~HEDUC, method2="qr", iters=10, tau1=seq(.05,.95,.05),
tau2=seq(.05,.95,.05))

## get the difference between the average that adjusts for covariates and
## the one that does not
getResDiff.CFA(out$cfa1, out$cfa2, E)

## End(Not run)

WeigeHuangEcon/cfa documentation built on Dec. 20, 2020, 4:39 p.m.