Hello statalisters,
I have a question about stata's traj pluggin for group-based trajectory models (installed from here: https://www.andrew.cmu.edu/user/bjones/).
Consider the following code:
The trajplot command runs a graph saying that traj 1 is 30.8%, traj 2 46.1% and traj 3 23.0%.
Now if you run:
It gives 29.99% for traj 1, 47.25% for traj 2 and 22.76% for traj 3, which is different from above. Not a lot but it is disturbing (and even worse in my own dataset).
Manually calculating the percentages using the numbers given by the tab command obviously gave me the same percentages as the tab command.
Do you get different percentages too? Does somebody know why? Are calculations on the plot not using the same numbers or formula? What did I miss here?
Thank you in advance for your help.
Maud
PS I use Stata/SE 14.2 for Mac.
I have a question about stata's traj pluggin for group-based trajectory models (installed from here: https://www.andrew.cmu.edu/user/bjones/).
Consider the following code:
Code:
use http://www.andrew.cmu.edu/user/bjones/traj/data/montreal_sim.dta, clear traj, model(cnorm) var(qcp*op) indep(age*) order(1 3 2) min(0) max(10) trajplot, xtitle("Age") ytitle("Opposition")
Now if you run:
Code:
tab _traj_Group
Manually calculating the percentages using the numbers given by the tab command obviously gave me the same percentages as the tab command.
Do you get different percentages too? Does somebody know why? Are calculations on the plot not using the same numbers or formula? What did I miss here?
Thank you in advance for your help.
Maud
PS I use Stata/SE 14.2 for Mac.
Comment