? ? Set the panel definition ? SETPANEL ; Group = id ; Pds = ti $ ? ? Define the variables in the model ? NAMELIST ; XC = the variables in your model $ ? ? After estimation, compute partials ? PARTIALS ; If [ ti = 7 ] ; Effects: XC ; Summary $ ? ? Two part model ? We used X2=one,married,hhkids.) ? NAMELIST ; X2 = your variables $ (Choose 2 or 3, not including female) HISTOGRAM ; Rhs=DocVis $ (Just to see the problem) POISSON ; Lhs = DocVis ; Rhs = X ; Hurdle ; Rh2 = X2 ; Table=Hurdle$ CREATE ; lh = logl_obs $ POISSON ; Lhs = DocVis ; Rhs = X; Zip ; Rh2 = X2; Table=zip$ CREATE ; lz = logl_obs $ MAKETABLE ; hurdle,zip $ CALC ; Tsd ( lh,lz) $ ? ? Random parameters Model ? Latent Class ? CREATE ; docvis12 = docvis ~ 12 $ NAMELIST ; XP = ... the variables in your main equation $ NAMELIST ; XH = ... the variables in your hurdle equation $ POISSON ; Lhs = DocVis12 ; Rhs = XP $ POISSON ; Lhs = DocVis12 ; Rhs = XP ; LCM ; Pts = 2 ; Panel $ POISSON ; Lhs = DocVis12 ; Rhs = XP ; Rh2 = XH ; Hurdle $ CREATE ; pclass1 = classp_i (group,1) $ CREATE ; class1 = pclass1 > .5 $ DSTAT ; Rhs = Docvis12 ; Str = class1 $ CALC ; Tst(docvis12,class1) $ (Tests whether means are different in the two groups) ? ? Fixed effects NB Model ? POISSON ; Lhs = docvis12 ; Rhs = your XP list $ POISSON ; Lhs = docvis12 ; Rhs = your XP list ; Panel ; Fixed $ ? ? Random parameters ? ? Set the panel as usual if you have not done so already in this session. ? This step is necessary for the Count data and ordered choice models ? MODEL ; Lhs = ... ; Rhs = a set of variables $ (Fit the pooled model, no options.) MODEL ; Lhs = ... ; Rhs = a set of variables ; RPM ; Halton ; Pts = 50 ; Panel ; Parameters ; Maxit = 20 ; Fcn = variable (n), variable (n), ... $ MATRIX ; beta_fem = beta_i(1:7293,2:2) $ KERNEL ; Rhs = beta_fem ; Title=Distribution of E[beta_fem] Across Sample $