Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

marginal

Marginal effects Summary


Description

It produces the summary table of marginal effects for GLM estimation with GEL. Only implemented for ATEgel.

Usage

## S3 method for class 'ategel'
marginal(object, ...)

Arguments

object

An object of class ategel returned by the function ATEgel

...

Other arguments for other methods

Value

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.

References

Owen, A.B. (2001), Empirical Likelihood. Monographs on Statistics and Applied Probability 92, Chapman and Hall/CRC

Examples

## 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)

marginal(res)

gmm

Generalized Method of Moments and Generalized Empirical Likelihood

v1.6-6
GPL (>= 2)
Authors
Pierre Chausse <pchausse@uwaterloo.ca>
Initial release
2021-02-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.