sentimental.gentleman at gmx.at
2008-Sep-10 13:55 UTC
[R] using function instead of formula in plm
Hi all, I am trying to use plm to estimate coefficients in a model consisting of a system of equations. So far I used mle2 from the package "bbmle", but now I need to test for autocorrelation and mle2 does not provide for the necessary tests. mle2 needs a function as input that might as well consist of many different equations. plm however requires an object of class formula that needs to be included in the plm-call. Does anyone know if there is a way to make R understand that it should do something like result <- plm(function,data = paneldata,...) and what the object "function" then has to look like? Thanks in advance, Erich --
Hi all, I am trying to use plm to estimate coefficients in a model consisting of a system of equations. So far I used mle2 from the package "bbmle", but now I need to test for autocorrelation and mle2 does not provide for the necessary tests. mle2 needs a 'function' as input that might as well consist of many different equations. plm however requires an object of class 'formula' that needs to be included in the plm-call. Does anyone know if there is a way to make R understand that it should do something like result <- plm(function,data = paneldata,...) and what the object 'function' then has to look like in order to do the same thing as an object of class 'formula' would do in the same place? Thanks in advance, Erich