View source: R/compute_average_AMTE.R
compute_average_AMTE | R Documentation |
Computes the average of the bounds on the AME or ATE over all periods in the whole dataset. The average is computed by first taking the average across all observed period for each individual, and then averaging the result over all individuals.
compute_average_AMTE(
output,
data,
estimators,
selectX,
alpha,
Option,
CIOption,
nbCores
)
output |
is a list of outputs from the compute_AME_t or compute_ATE_t functions. Each element of the list corresponds to the output for one period at which the effect is estimated (one value of TEstim), and the average is computed over all periods corresponding to elements of outputs. |
data |
is an environment variable containing the data. If not already formatted, it will be formatted by the format_data function (see its documentation for information about the stored variables). We only use data$clusterIndexes, a vector of size n x 1 that specifies the cluster each observation pertains to. |
estimators |
is an environment in which the results of the CMLE estimation and of the non-parametric estimation of the conditional distribution of S are stored. The only parameters of interest are in estimators$beta_hat, a list which contains the results from CMLE estimation: - estimators$beta_hat$beta_hat is a vector of length dimX, the estimated value for the slope parameter. - estimators$beta_hat$var_b the estimated asymptotic covariance matrix, of size dimX x dimX, for the estimator beta_hat. |
selectX |
a vector containing the indices of the covariates w.r.t. which the AME is being computed. If null, the AME w.r.t. all covariates is being computed. |
alpha |
(default 0.05) desired asymptotic level of the estimated confidence intervals. |
Option |
estimation method being used. If "quick" or "outer" (case-insensitive) the outer bounds are computed. Otherwise, the sharp bounds are computed. |
CIOption |
(default "CI2") When the outer bounds method is being used, specifies which confidence interval should be used. If "CI2", the CI2 confidence interval is being used (see DDL, section 4.2), otherwise the CI3 confidence interval will be used (see DDL, appendix C). |
nbCores |
(default 4) number of cores to be used for parallel computing, to speed up the estimation of the sharp bounds. |
a list containing, the same variables as for compute_AME_t, where NAs are used when the intended variable is not relevant: - Option: same as input - reducedSampleSize: the number of individuals used to estimate the AME. Here this is the same as the number of individuals in the whole dataset, after excluding individuals observed at only one or zero period. - computationTime NA - estimatedAMEbounds: a matrix of size |selectX| x 2 containing the averaged out estimated (sharp or outer, depending on Option) bounds on the AME, for each covariate in selectX. - CI: a matrix of size |selectX| x 2 containing in each row the estimated confidence interval for the average AME, for the corresponding covariate in selectX. - alt_CI: a matrix of size |selectX| x 2 containing in each row the estimated confidence interval for the average AME, for the corresponding covariate in selectX, using the confidence interval option NOT requested by the user, for the outer bounds. If the sharp bounds were being computed, this output is NA. - indl_estimates: NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.