margins.oglmx: Calculate marginal effects for 'oglmx' objects.

Description Usage Arguments Value Author(s)

View source: R/marginsCalc.R

Description

This function constructs marginal effects and calculates standard errors for all models estimated by the oglmx function. Standard errors are obtained using the delta method.

Usage

1
2
3
4
5
margins.oglmx(object, atmeans = TRUE, AME = FALSE, location = NULL, outcomes = "All",
              ascontinuous = FALSE, Vars = NULL)

## S3 method for class 'margins.oglmx'
print(x, ... )

Arguments

object

object of class "oglmx".

Vars

vector specifying variables for which marginal effects are desired.

outcomes

either character string "All", the default option, or a numeric vector indicating the outcomes for which the marginal effect is desired.

atmeans

logical. If TRUE then the marginal effects are calculated at the means of the variables in the equations for the mean and variance of the latent variable.

AME

logical. If TRUE the marginal effects are averaged across observations.

ascontinuous

logical. If TRUE binary variables are treated as if continuous to calculate marginal effects.

location

NULL, a numeric vector, or a list containing two numeric vectors. Allows the user to specify the values of the explanatory variables at which the marginal effect is to be calculated. For a homoskedastic model the input should be a numeric vector of length equal to the number of variables in the model matrix. For a heterskedastic model the input should be a list, the first element should be a vector of length equal to the number of variables in the mean equation and the second is a vector of length equal to the number of variables in the variance equation.

...

additional arguments to print method. Currently ignored.

x

object of class margins.oglmx.

Value

an object of class margins.oglmx. The object consists of a list containing data matrices, each matrix corresponding to an outcome for which the marginal effect was desired. Columns of each matrix correspond to the estimated marginal effect, its standard error, t-statistics and two sided p-value.

Author(s)

Nathan Carroll, [email protected]


oglmx documentation built on May 5, 2018, 5:04 p.m.