marginal.RdIt produces the summary table of marginal effects for GLM estimation with GEL. Only implemented for ATEgel.
# S3 method for class 'ategel'
marginal(object, ...)An object of class ategel returned by the function
ATEgel
Other arguments for other methods
It returns a matrix with the marginal effects, the standard errors based on the Delta method when the link is nonlinear, the t-ratios, and the pvalues.
Owen, A.B. (2001), Empirical Likelihood. Monographs on Statistics and Applied Probability 92, Chapman and Hall/CRC
## We create some artificial data with unbalanced groups and binary outcome
genDat <- function(n)
{
eta=c(-1, .5, -.25, -.1)
Z <- matrix(rnorm(n*4),ncol=4)
b <- c(27.4, 13.7, 13.7, 13.7)
bZ <- c(Z%*%b)
Y1 <- as.numeric(rnorm(n, mean=210+bZ)>220)
Y0 <- as.numeric(rnorm(n, mean=200-.5*bZ)>220)
etaZ <- c(Z%*%eta)
pZ <- exp(etaZ)/(1+exp(etaZ))
T <- rbinom(n, 1, pZ)
Y <- T*Y1+(1-T)*Y0
X1 <- exp(Z[,1]/2)
X2 <- Z[,2]/(1+exp(Z[,1]))
X3 <- (Z[,1]*Z[,3]/25+0.6)^3
X4 <- (Z[,2]+Z[,4]+20)^2
data.frame(Y=Y, cbind(X1,X2,X3,X4), T=T)
}
dat <- genDat(200)
res <- ATEgel(Y~T, ~X1+X2+X3+X4, data=dat, type="ET", family="logit")
summary(res)
#>
#> Call:
#> ATEgel(g = Y ~ T, balm = ~X1 + X2 + X3 + X4, family = "logit",
#> type = "ET", data = dat)
#>
#> Type of GEL: ATE with unrestricted balancing
#> Method: ET, Family: Binomial with logit link
#> (S.E. are robust to misspecification)
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) -2.11070 0.33398 -6.31979 0.00000
#> T 1.67118 0.43486 3.84307 0.00012
#> TreatProb1 0.44783 0.04411 10.15307 0.00000
#>
#> Lambdas:
#> Estimate Std. Error t value Pr(>|t|)
#> Lam((Intercept)) -0.00037 0.00004 -8.91556 0.00000
#> Lam(T) 0.00022 0.00005 4.53170 0.00001
#> Lam(TreatProb1) -0.56423 1.82494 -0.30918 0.75718
#> Lam(Treat1_X1) 1.74162 0.34789 5.00627 0.00000
#> Lam(Treat1_X2) -0.08364 0.40868 -0.20467 0.83783
#> Lam(Treat1_X3) 2.54159 3.96975 0.64024 0.52202
#> Lam(Treat1_X4) -0.00463 0.00430 -1.07743 0.28129
#>
#> Over-identifying restrictions tests: degrees of freedom is 7
#> statistics p-value
#> LR test 3.9582e+01 1.5135e-06
#> LM test 3.9202e+01 1.7884e-06
#> J test 5.0203e+01 1.3178e-08
#>
#>
#> Convergence code for the coefficients: 0
#>
#> Convergence code for the lambdas: 0
marginal(res)
#> Estimate Std. Error t value Pr(>|t|)
#> Control 0.1080609 0.03219052 3.356915 7.881728e-04
#> Treat1 versus Control 0.2837947 0.06589534 4.306748 1.656718e-05