"I first run the trajectory model using logit and then rename the variables produced by the first trajectory model. However, when I run the second trajectory model using ZIP, it overrides the _traj_Group_redlining variable from the first model. How can I preserve the _traj_Group_redlining variable after running the second trajectory model?"
traj, model(logit) var(redlining_11-redlining_43) indep(zage_11-zage_43) order(0,1,0) weight(gsw1345)
mat P = e(plot1)
svmat P, names(col)
replace trajT = ((trajT+1)*(43-11)/2)+11
*trajplot, xtitle(Age) ytitle("Redlining") plotvars(trajT-U953)
foreach var of varlist _traj_Group-U953{
rename `var' `var'_redlining
}
traj, model(zip) var(vict_11-vict_43) indep(zage_11-zage_43) order(0,1,0) weight(gsw1345)
traj, model(logit) var(redlining_11-redlining_43) indep(zage_11-zage_43) order(0,1,0) weight(gsw1345)
mat P = e(plot1)
svmat P, names(col)
replace trajT = ((trajT+1)*(43-11)/2)+11
*trajplot, xtitle(Age) ytitle("Redlining") plotvars(trajT-U953)
foreach var of varlist _traj_Group-U953{
rename `var' `var'_redlining
}
traj, model(zip) var(vict_11-vict_43) indep(zage_11-zage_43) order(0,1,0) weight(gsw1345)
Comment