micEcon / micEconAids

R Package micEconAids
0 stars 1 forks source link

Inequality restrictions on the coefficients #4

Open fedemolina opened 2 years ago

fedemolina commented 2 years ago

The sistemfit package that it's used to estimate the aids model allow equality restrictions over coefficients (beta = 0).

Is it possible to add restrictions of inequality over coefficients (beta > 0)?

For example, glmnet package allow that by regularization but I guess that could bias the estimated coefficients and because of that standards errors could have no sense. Another example is used in the quantreg package via fnc method (Rb ≥qr)

arne-henningsen commented 2 years ago

As soon as one has inequality restrictions, there is no longer a closed form solution for the estimated parameters. One could transform the parameter (e.g., replace beta_i by phi_i^2, estimate phi_i, and after the estimation calculate beta_i = \hat{phi}_i^2, which is always non-negative) and use nlsystemfit() for the estimation but nlsystemfit() is in an early development stage and frequently does not work well. Everyone is invited to contribute to the development of nlsystemfit().