[R] equivalent of stata command in R
Joris Meys
jorismeys at gmail.com
Wed Jun 9 17:40:03 CEST 2010
If you don't know how to proceed, you should look for a good book on
statistics. I checked the .nlcom, and what it does is give estimates
and tests on a (nonlinear) combination of estimated parameters. That's
doable, but a bit tedious to program. It is basically using the rules
on the adding and multiplication of random variables and standard
errors. but the interpretation is also not that straightforward.
In the generalized mixed model world, the appropriate way of
estimating the marginal effects you're looking for (I guess...) is
centering your data around the mean before fitting the model. That
way, the parameter of the main effect represent exactly the marginal
effect at the sample mean for the other variables, simply because the
mean is 0 for all of them and the equation you use simplifies to
_b[eco]. Yet, the test statistic only gives you an idea about whether
or not this coefficient differs from zero, assuming it is normally
distributed with se as calculated. That is not the same as testing
whether there is a significant marginal effect.
Marginal effects are in my opinion better tested using likelihood
ratio methods. These are not provided in plm, as that one is based on
generalized least squares and hence does not return a likelihood
value. To use LR tests, you'll have to go to nlme or lme4.
Following is an obligatory read if you're going to use plm methods :
http://cran.r-project.org/web/packages/plm/vignettes/plm.pdf
Maybe you better contact the maintainer of the package
yves.croissant at let.ish-lyon.cnrs.fr directly to ask for the correct
testing procedure for your hypothesis, because I'm still not sure that
you're doing the fitting correctly in R. Just like you specify fe
i(stno) in Stata, you should specify index=stno in the R command.
Cheers
Joris
On Wed, Jun 9, 2010 at 1:27 PM, mike mick <saint-filth at hotmail.com> wrote:
>
> Thanx for your response,
> yeah, i know i didnst specified the indexes
> when i wrote the 2nd mail, in fact in the 1st mail i wrote already that
> i dont have problem with the estimation of the model... thats the
> reason why i didnt write in fact since the issue is not to estimate the
> model but to get the marginal effect,
> anyway, i figured out that predict(), doesnt work for panel data...
> and
> well, my problem is that contrary to your guess, i couldnt figure out
> the rest of the calculations... since i am not that experienced in R.
> one last help of yours would be quite helpful to get rid of this silly problem!
> Thanx again...
>
--
Joris Meys
Statistical consultant
Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control
tel : +32 9 264 59 87
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
More information about the R-help
mailing list