Hi!
I am using Stata/MP from a Mac.
I am trying to use database A to predict the cost of healthcare in database B. Database B has the same demographic / health status characteristics as database A, but it doesn't have the "cost" variable.
Also:
In database A, the years available are 1996-2011.
In database B, the years available are 2008-2011.
In database A, I use the following regression:
quietly tab year, gen (d_year)
areg cost age sex race disease [aweight= perwt], absorb (duid) robust cluster (duid) Then in database B, I use the comand:
predict cost, xb
I get the error message "d_year1 d_year2 ect" not found. This makes sense since I do not have the same years in database A and B.
Do you know any way around this?
Thanks in advance!
I am using Stata/MP from a Mac.
I am trying to use database A to predict the cost of healthcare in database B. Database B has the same demographic / health status characteristics as database A, but it doesn't have the "cost" variable.
Also:
In database A, the years available are 1996-2011.
In database B, the years available are 2008-2011.
In database A, I use the following regression:
quietly tab year, gen (d_year)
areg cost age sex race disease [aweight= perwt], absorb (duid) robust cluster (duid) Then in database B, I use the comand:
predict cost, xb
I get the error message "d_year1 d_year2 ect" not found. This makes sense since I do not have the same years in database A and B.
Do you know any way around this?
Thanks in advance!
Comment