f*********y 发帖数: 376 | 1 若run 一个 logit on train data set, 然后用模型去分析 test set. 怎样能够直接
用从train set 的到的系数, 而不是先把结果保存,然后再自己输入. 我能想到的就是
把train set 和 test set 拼一起, 然后就可以直接用, 有没有更好的办法. | k***g 发帖数: 7244 | 2 predict
【在 f*********y 的大作中提到】 : 若run 一个 logit on train data set, 然后用模型去分析 test set. 怎样能够直接 : 用从train set 的到的系数, 而不是先把结果保存,然后再自己输入. 我能想到的就是 : 把train set 和 test set 拼一起, 然后就可以直接用, 有没有更好的办法.
| f*********y 发帖数: 376 | 3 I know this command.
The example in help predict is below:
. use ds1
(fit a model)
. use two /* another dataset */
. predict yhat, ... /* fill in the predictions */
my Question is how to save the fitted model information nwhe I try to use
another data set.
By my understanding, I still need to put two data sets together. Then I can
use predict to predict subsamples.
【在 k***g 的大作中提到】 : predict
| h****i 发帖数: 1674 | 4 return list or ereturn list to see what info after estimation is stored in
mem, then use matrix to store the info you need.
This is a stupid method I used sometime, there may be other built in routine
to do this.
hope help somehow | f*********y 发帖数: 376 | 5 thanks, I use predict to solve the prediction of logit model issue. I used
to think that predict command can not handle with out of sample prediction.
I also used your method for other models , which were built by myself. It
was not based on any existed models in STATA, thus predict command does not
work.
routine
【在 h****i 的大作中提到】 : return list or ereturn list to see what info after estimation is stored in : mem, then use matrix to store the info you need. : This is a stupid method I used sometime, there may be other built in routine : to do this. : hope help somehow
|
|