Hello,
I'm working through the examples on the traj plug in. I can get the ones posted to work just fine, but I'm having trouble understanding how the data needs to be coded so I can apply it to my own work. The general form of traj is
traj [ if exp ] , var( varlist ) indep( varlist ) model( string ) order( numlist )
So I'm trying to calculate trajectories for people buying something over time. So my var in varlist is the amount they bought at each time point {continuous, so buy1 is the amount purchased at timepoint1}, and my indep is this list of time points (years, coded as 1, 2, 3, so on). so my code looks like
traj, var( buy1 buy2 buy3 buy4) indep(year1 year2 year 3 year4) model( cnorm) order( 2 3 2) min(0) max (500)
what happens is that the program seems to be forcing the exact same number of people into each group (33% for each group) and can't calculate standard errors.
My data is in wide format, with a persons id being each observation.
If anyone has any insight into where my issue is I'd greatly appreciate it!
Elyse
I'm working through the examples on the traj plug in. I can get the ones posted to work just fine, but I'm having trouble understanding how the data needs to be coded so I can apply it to my own work. The general form of traj is
traj [ if exp ] , var( varlist ) indep( varlist ) model( string ) order( numlist )
So I'm trying to calculate trajectories for people buying something over time. So my var in varlist is the amount they bought at each time point {continuous, so buy1 is the amount purchased at timepoint1}, and my indep is this list of time points (years, coded as 1, 2, 3, so on). so my code looks like
traj, var( buy1 buy2 buy3 buy4) indep(year1 year2 year 3 year4) model( cnorm) order( 2 3 2) min(0) max (500)
what happens is that the program seems to be forcing the exact same number of people into each group (33% for each group) and can't calculate standard errors.
My data is in wide format, with a persons id being each observation.
If anyone has any insight into where my issue is I'd greatly appreciate it!
Elyse
Comment