![]() The traj command also wants you to input a time variable though to, which I do not have in this file. *Need to generate a set of time variables to pass to traj, just label 1 to 10 So I create a set of t_ variables to mimic the counts, going from 1 to 10. traj, var(count_*) indep(t_*) model(zip) order(2 2 2) iorder(0) Now we can estimate our group based models, and we get a pretty nice default plot. Now for absolute model fit statistics, there are the average posterior probabilities, the odds of correct classification, and the observed classification proportion versus the expected classification proportion. *updating code to drop missing assigned observations *I made a function to print out summary stats Here I made a program that I will surely be ashamed of later (I should not brutalize the data and do all the calculations in matrix), but it works and produces an ugly table to get us these stats. *the odds of correct classification (based on the max post prob group assignment), *the average posterior probability for each group, *the count per group (based on the max post prob), Replace TotProb = r(sum)/ _N if _traj_Group = c *now lets look at the average posterior probability #Geodist all bilateral pairs stata code List _traj_Group countG groupAPP occ occ_pp p TotProb if counter = 1 *and the observed probability of groups versus the probability *the odds of correct classification (based on the weighted post. This should work after any model as long as the naming conventions for the assigned groups are _traj_Group and the posterior probabilities are in the variables _traj_ProbG*. ![]() #Geodist all bilateral pairs stata code.#Geodist all bilateral pairs stata install.
0 Comments
Leave a Reply. |