title: How do I solve this error code in R data panel model
body: <p>Im trying to run this code but I have not been successful for a fixed-effect model in R.</p>
  
  <p>this are my variables</p>
  
  <pre><code>y &lt;- cbind(tfpch)
  x &lt;- cbind(EI, LP, INFA)
  </code></pre>
  
  <p>This is the code and the error</p>
  
  <blockquote>
    <p>fixed&lt;-plm(y~x,data = mydata,index = c("ID", "t"), model="within")
    Error in class(x) &lt;- setdiff(class(x), "pseries") : 
      invalid to set the class to matrix unless the dimension attribute is of length 2 (was 0)</p>
  </blockquote>
  
  <p>Im looking how to fix this issue but none of the solutions offered here the work so far.</p>