r - Problems with within and random models in plm package -


I am working with the plm package and I have problems within random and models, which are giving errors The "empty model" However, the model is not empty. In the source code of Plm.fit, where the error occurs, something says something like (write over my head ...)

  X   

But if I use this behavior I try to repeat the commands with input in the original function, it gives NOCL (x) 17 or something like that.

My code is (data has been deleted ...):

  Library (sample library) (Library Library Library (Foreign) Library (CCREGE) Library (PLM) Library (Micron) Library (Ggplot2) data & lt; - read.dta ('kpfull1.dta') Summary (data) attached data (data) $ profit_share & lt; - p91 / Tnsvp data $ debt_assets & lt; - d91 / naba data $ naba3 & Lt; - naba ^ 3 data $ difprofit & lt; - p91-p90 data $ agriculture & lt; - (mind == 1) * 1 data $ hi & lt; - (mind == 2) * 1 data $ li & Lt; - (Mind == 3) * 1 data $ constr & lt; - (Mind == 4) * 1 data $ trans & lt; - (Mind == 5) * 1 data $ trade R & lt; - (Mind == 6) * 1 Data $ rd <- (Mind == 7) * 1 Data $ ser & lt; - (Mind == 8) * 1 Data $ fin & lt; - (Mind = = 9) * 1 data $ for1 & lt; - data [, 7] d etac data data 1 & lt; - data panel & lt; - pdata.frame (data, c ("num" , "Rnd")) testovaci & lt; - plm (tb ~ profit_share + debt_assets + nab + nab3 + for1 + dom + diffit + agri + high + li + const + trans + trade + rd + sar + fin, data = panel , Model = "in") summary (testosterone) model. Metrics (TB ~ Profit_share + datasets + naba + nab3 + 1 + model + meta + share + dataset + nab + nab 3 + 1 + dome + difefight + agri + high + le + + + + + + + + + + + + + + Constr + trans + trade + rd + ser + wing, panel) Thanks   

Thanks, Tomáš KÅ ?? EhlÃik

Dear Tomas, Dear list,

A follow-up journal, in the form of the above, Data received by communication problems, as I suspect, the data is hidden in some time variability. In fact, the OLS works fine:

%

FM is formula, data is a dataset, panel is dataset < Code> pdata.frame

has been converted to summary (LM (FM, data))

% (output OK

Summary (PLM (FM, panel, model = "pooling"))

Onway ( Individual) Impact pooling model

% (Output OK, omitted)

But EF failed:

Summary (PLM (FM, panel, m) Dul) = "within"))

in plm.fit (formula, data, model, effect, random method, inst.method) Variation:

Summary (PLM (FM, Panel, Model = "Random")):

Array in plm.fit (formula, data, model = "inside", effect = effect): empty model

. ..and if you look at the error message, then it is clear that it is the inner / ef part of the problem which has problems (RE methods are based on EE to estimate the error composite nents). In fact, trying to make the panel-difference, any right-handed variable results in all the zeros (nan variers are for stock, which is 0/0) First one:

Summary (difference $ $ profit_share)

Total amount of squares: 0 id time nan Nan

But this is really similar to everyone, so the model (actually within the conversion) is actually empty, because the original error message is called now I do not have the time to look at the data in depth , But the RAS variable looks all the time continuously ...

The people carrying the panel in the list, therefore, the main reason is: Day TA is a bad index for error, another is bad data variability; The first step to find out is LM () and then PLM (..., model = "pooling") is running . LM () Fails => Bad data, bad formula; PLM (..., "pooling") unsuccessful => Basically wrong with some index; Other panel methods fail => Most likely the data variability problems

Best, Giovanni

PS I tried to circumvent this issue through the ML assessment of the RE model but there is no way, I got a singular matrix error: so the data actually Sick is conditioned

library (nlme) remod & lt; -lme (tb ~ profit_share + debt_assets + naba + nab3 + for1 + dom + difprofit + agri + hi + li + constr + trans + business + rd + ser + wing, random = ~ 1 | number, data = data) in solution Error. Default (estimate [imp. [1] - (P: 1), IME [2] - (P: 1) Drop = FALSE]: IL Systema: Numerical singing: Valor de conjunction di receiproceita = 3. 9 3401-25 < / Code>

Comments