Dear colleagues,
I was wondering if anyone can help me with this one.
I have two separate datasets, one with patient data ("patients.dta) and one with the intercept and slope for 100 linear models ("estimates.dta") derived from another (independent) dataset.
This is what the datasets look like:
patients.dta
estimates.dta
I would like to generate the predictions for each variable in the patients dataset using the values from the estimates dataset:
Any suggestions?
Thanks a lot!
J
I was wondering if anyone can help me with this one.
I have two separate datasets, one with patient data ("patients.dta) and one with the intercept and slope for 100 linear models ("estimates.dta") derived from another (independent) dataset.
This is what the datasets look like:
patients.dta
| id | x | y | z | etc. (n=100) |
| aa | 12 | 14 | 15 | |
| bb | 14 | 15 | 15 | |
| cc | 11 | 13 | 14 | |
| etc. |
| variable | intercept | slope |
| x | 1 | 2 |
| y | 1 | 1.5 |
| z | 2 | 2 |
| etc. (n=100) |
| id | x | y | z | etc. | prediction_x | prediction_y | prediction_z | prediction_etc | |
| aa | 12 | 14 | 15 | ||||||
| bb | 14 | 15 | 15 | ||||||
| cc | 11 | 13 | 14 | ||||||
| etc. | |||||||||
Thanks a lot!
J

Comment