1

I have train data file in Gretl and then I append test data file in which the SalePrice data is missing so I want to predict the SalePrice for these rows but annoyingly if I add log for one of the variables (exists in both files without missing values, only a few 0s) then forecast doesnt predict any values for the second file. If I try the that log variable , then is no problem. Do you have any idea why that? I tried also from command line using fcast command to new variable but didnt help out.

enter image description here

enter image description here

Upload the requested commands: enter image description here enter image description here

Georgi
  • 107
  • 1
  • 6

1 Answers1

0

It would be better if we can see your dataset to get a better understanding of the matter. But there's some possibilities that I can think now:

  1. Missing values on your regressors;
  2. You are using lagged SalePrice and applying the log in the subsample and because of that the future values are not available.

Could you run that code and share the output?

eval lastobs(YearRemodAdd)
eval lastobs(KitchenAbvGr)
eval lastobs(GarageCars)
eval lastobs(Fireplaces)
eval lastobs(l_GrLivArea)
eval lastobs(YearBuiltSQ2)
eval lastobs(l_TotalBsmtSF)

smpl full

eval lastobs(YearRemodAdd)
eval lastobs(KitchenAbvGr)
eval lastobs(GarageCars)
eval lastobs(Fireplaces)
eval lastobs(l_GrLivArea)
eval lastobs(YearBuiltSQ2)
eval lastobs(l_TotalBsmtSF)

fcast phat1
  • Just uploaded screen. Still unable to forecast for the test file. As you can see, both train and test file's last column is SalePrice . So after I append the test file , I create a few new variables which as I can see , the data is created for both files . Let me know if it is unclear.so cant see issue. Phat1 and 2 are the var where I expect the frecast values. I use the console to forecast and normall it is working .. – Georgi Aug 01 '18 at 19:34
  • btw. If I only remove the l_TotalBsmtSF variable (exclude from the model but not delete the variable), then everyhting is ok so I really dont understand – Georgi Aug 01 '18 at 19:42
  • Thanks Henrique. I have just uploaded the screen of the requested commands. Btw, I found out there is 1 row of TotalBsmtSF with value of 'NA' but even I edit it to numerical it is same issue. I found temp solution to create in advance log of that column in excel but this is stupid and even the Adj R square dropped a bit. – Georgi Aug 02 '18 at 20:04