STATA traj插件应用

  use https://www.andrew.cmu.edu/user/bjones/traj/data/panss.dta, clear

    gen oos = 0

    replace oos = rbinomial(1,.2)

    traj, var(p1-p6) indep(t1-t6) model(cnorm) min(-999) max(999) order(3 3 1) risk(risper) dropout(1 1 1) dcov(risper risper risper risper risper risper) sigmabygroup outofsample(oos)
// gsort -oos
  //  list _traj_* if oos == 1
        list _traj_* if oos == 1, ab(12)

 

posted @ 2023-05-11 11:14  myrj  阅读(423)  评论(0编辑  收藏  举报