obd: obd

Description Usage Arguments Value Examples

View source: R/funs.R

Description

do Oaxaca-Blinder decomposition

Usage

1
obd(formula, ref = "g1", data1, data2)

Arguments

formula

a formula: y ~ x1+x2

ref

reference group. ref=g1 or g2.

data1

data for group 1

data2

data for group 2

Value

aggregate and detailed decomposition components

Examples

1
2
3
4
5
6
7
8
data(five)
na=five[,1:6]
eu=five[,7:12]
colnames=c("Mkt.RF","SMB","HML","RMW", "CMA","SMALL.LoBM")
colnames(na)=colnames
colnames(eu)=colnames
formula=SMALL.LoBM~Mkt.RF+SMB+HML+RMW+CMA
res=obd(formula,ref="g1",data1=na,data2=eu)

WeigeHuangEcon/dec documentation built on May 7, 2019, 2:27 p.m.