0

I am working on a panel study project (in R) and encountered the following error(s) when creating a within fixed effect:

within5 <- plm(Y~X1*X3+X8+X9, data=pdata2, model = "within")
summary(within5)

Here X8 and X9 are control variables (but they contain missing values) The error I receive is:

crossprod(t(X), beta) :non-conformable arguments

Any advice?

When working with dummy fixed effects, I receive the following error:

dummy5 <- plm(Y ~ X1*X3+X8+X9+(factor(country)-1), data=pdata2,
              model = "pooling")

Error: Error in xj[i, , drop = FALSE] : (subscript) bolesh Index too long

lmo
  • 37,904
  • 9
  • 56
  • 69
Dennis
  • 9
  • 3
  • Thanks for any help! – Dennis May 07 '16 at 14:42
  • What programming language or software are you using? – Andreas Rejbrand May 07 '16 at 14:45
  • The software I am using is R – Dennis May 07 '16 at 14:52
  • Chances are, your variables are linear dependent (maybe after dropping of NA values and/or the within transformation). There is a convenient function called `detect_lin_dep` in the `plm` package (only in the development version, see https://r-forge.r-project.org/R/?group_id=406) to check for linear dependent variables; the help for that function is quite extensive. – Helix123 May 08 '16 at 09:33

0 Answers0