estim_slope_cmle_maxn: Estimates the slope parameter on the data in a FE logit...

View source: R/estim_slope_cmle_maxn.R

estim_slope_cmle_maxnR Documentation

Estimates the slope parameter on the data in a FE logit model, using CMLE maximisation, along with its variance and the values of the influence function at each point.

Description

Estimates the slope parameter on the data in a FE logit model, using CMLE maximisation, along with its variance and the values of the influence function at each point.

Usage

estim_slope_cmle_maxn(data, beta_init = NULL)

Arguments

data

is an environment variable containing the relevant data: - data$Y a matrix of size n x Tmax containing the values of the dependent variable Y. - data$X an array of size n x Tmax x dimX containing the values of the covariates X. - data$clusterIndexes a vector of size n containing the index of the cluster each observation belongs to. The computed asymptotic variance is clustered.

beta_init

(default NULL) starting value for beta in the estimation algorithm. If null, we take it to be the slope in a linear probability model, divided by 4.

Value

a list containing: - beta_hat: a vector of length dimX, the estimated value for the slope parameter. - phi_b: a matrix of size n x dimX containing the value of the influence function at each observation (rows) w.r.t. each dimension of the covariates (columns). - var_b: the estimated asymptotic covariance matrix, of size dimX x dimX, for the estimator beta_hat.


cgaillac/MarginalFElogit documentation built on Dec. 24, 2024, 3:23 p.m.