Dear all,
I am using a plug-in called traj. It is a subset of finite mixture modeling and it uses an Expectation-Maximization algorithm to calculate likelihood, BIC, AIC. It it used to get trajectories of similar developments of a variable over time. A way of longitudinal clustering.
I've read (https://www.andrew.cmu.edu/user/bjones/example.htm) that traj in Stata and SPSS uses the following to provide start values: "...TRAJ procedure provides default start values by calculating group intercepts spaced based on the range or standard deviation of the dependent variables. Starting group sizes are assumed to be equal be default. Due to model complexity and possible data oddities, some trajectory models are difficult to fit. There is no guarantee that the procedure will be able to fit a model successfully beginning at the default starting point that the procedure provides. The procedure may fail to find a solution or find only a local maximum instead of the required global maximum...".
I have fitted a model with 5 trajectories. I now want to supply different start values to my model in order to be more certain that I have found the global, and not the local, maxima in my model. Then I want to run the model with different start values, for let say 200 times, and then plot and compare the BICs and AICs. Depending on how they differ I can then draw the conclusion if I have the local or global maxima.
Anyone knows how to randomly assign different start values to my model? Using "set seed" does not work since traj calculates default start values every time so it ends up giving the same start values regardless of seed settings.
The user can supply start values to the traj command by supplying a matrix with start values.
Silly example below for a model with 3 variables measured on 10 time points:
traj, multgroups(3) var1(variable_1st_1-variable_1st_10) indep1(time_1-time_10) model1(cnorm) max1(4) order1(1 2 3) var2(variable_2nd_1-variable_2nd_10) indep2(time_1-time_14) model2(cnorm) max2(4) order2(1 2 3) var3(variable_3rd_1-variable_3rd_10) indep3(time_1-time_10) model3(cnorm) max3(4) order3(1 2 3) start(provided_startvalue_matrix)
I am thinking of if I can randomly assign start values to provided_startvalue_matrix and use those start values in the model, and then change the start value matrix and rerun the model, and do this for a large number of times.
But I cannot understand how I should do that. Any ideas how? Any other ideas how to randomly assign start values to the model?
All the best,
Jesper Eriksson
(also posted at https://www.researchgate.net/post/How_to_get_models_BIC_values_for_different_number_ of_groups_in_group-based_trajectory_modeling_with_stata )
Related Posts with Providing start values for E-M algorithm (traj plug-in)
GMM Panel Data on StataHi, I have a dynamic model where the dependent variable is lagged. Therefore I am using system-GMM a…
Abbreviate all String Observations in a ColumnHi all, I have a column variable containing only 3- or 4-digit string observations. I just converte…
Interpret coefficients measured in percent on binary dependent variable in panelHello Statalist members, reading in the forum has helped me at lot in the last weeks, but I cannot …
F-Test or T-TestHi guys, I have a question that is not regarding to Stata particually but to statistics in general.…
Selecting the last few letters, when substr(.) is not appropriateHello all, I have data that resembles the following: ----------------------- copy starting from …
Subscribe to:
Post Comments (Atom)
0 Response to Providing start values for E-M algorithm (traj plug-in)
Post a Comment