1

I am very new to R and trying to tackle some homework that is giving me trouble. I think I have just about everything worked out, except last glitch.

When I create the following First differences models (using my two panel datasets):

out00 <- plm(logmrate ~ 0 + lawchange + logbeertaxa + y70 + y71 + y72 + y73 + y74 + y75 + y76 + y77 + y78 + y79 + y80 + y81 + y82 + y83 + y84 + y85 + y86 + y87 + y88 + y89 + y90 + y91 + y92 + y93 + y94 + y95 + y96, data = pdt.deaths,  model = 'fd')
out01 <- plm(logmrate ~ 0 + lawchange + logbeertaxa + y70 + y71 + y72 + y73 + y74 + y75 + y76 + y77 + y78 + y79 + y80 + y81 + y82 + y83 + y84 + y85 + y86 + y87 + y88 + y89 + y90 + y91 + y92 + y93 + y94 + y95 + y96, data = pdt.deaths1, model = 'fd')
stargazer(out00, type="text")
stargazer(out01, type="text")

I get this error term returned for both models:

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

The variable "lawchange" is a 1 or 0 variable, and each of the year variables ("y70"..."y96") are year indicator variables to account for time

  • Maybe this can help you: http://stackoverflow.com/questions/16718616/fixed-effects-regression-with-interaction-term-causes-error – alfakini May 13 '15 at 13:42
  • It would... Except that I have a really basic understanding of all of this and quickly get lost in that post. Thanks for the suggestion though! – Marc Anthony Makens May 13 '15 at 13:59
  • 1
    Is this public data? Could you give more context about the code and share the data you're using? This can help as I could investigate the error in my machine. – alfakini May 13 '15 at 14:05
  • Yes, this is public data, it is on mortality rate over time for age groups 15-17, 18-20, and 21-24 in the U.S. during the time that there were ongoing changes to the minimum drinking age law (70-96). Right now I am trying to determine the effect of the change in law on mortality rate for these age groups. I could send you the data and code work I have done, however am not sure how to over this site. – Marc Anthony Makens May 13 '15 at 14:11
  • Try to edit your post and drag & drop the files in the post. – alfakini May 13 '15 at 15:23

0 Answers0