0
votes

I was trying to fit a regression modell with several independent variables. When checking the summary() of that model I saw that one variable's estimator didnt show up. So, I tried to fit a model with just that independent variable that didn't show up, which you can see in the sample code below. I changed the variable names for an easier understanding. But basically what happened is that for this variable somehow no estimator is being calculated and it just shows the intercept. In other regressions the variable worked fine and showed an estimator. So I don't know why this happens here. I have a panel dataset, in case this matters and variable Y value changes from datapoint to datapoint. So it's not just a constant.

Does anyone have an idea why this happens?

Sample code:

> TestFit = plm(Y ~ X, data = dataset, model = "between", index = c("Index", "DatesNum"))
> TestFit

Model Formula: Y ~ X

Coefficients:
(Intercept) 
 0.00014546 
1
But if X is constant, it would be aliased, and only the Intercept would be displayed.IRTFM

1 Answers

0
votes

You'd better show your dataset (e.g. de-identified if necessary) so people can better answer your question.

If you define Y and X outside plm(), you probably don't need plm.

When you have data = dataset, Y and X should be the column name of your model. Does changing plm to lm work?