![]() ![]() Multiple Imputation Similar to survey data, you do the imputation step, then use an mi estimate: prefix, in front of most of the same commands as with survey data, above. Similarly Stata’s equivalent of R’s : is #.Ģ. Note that the Stata equivalent of R’s * in a formula is #, and that depending on whether x1 and x2 are factors or continuous, the syntax would be slightly different from what I have here. This includes the main descriptive statistics, eight types of linear regression (including non-linear and constrained regression), SEMs (Structural Equation Models), survival-data regression, binary-response regression, discrete-response regresion, poisson regression, instrumental-variables regression, and a few other options.įor example, to (OLS) regress y on x1, x2, the interaction of x1 and x2, and x3, you’d type: regress y x1#x2 x3Īfter a svyset command, you could then do the same regression for your survey data with: svy: regress y x1#x2 x3 Survey data You use the svyset command to to describe the survey’s design, and then you can use many of Stata’s standard commands to process the survey data, accounting for the design. It also has a well-integrated multiple-imputation (MI) feature, flexible graphics, and a solid Structural Equation Models (SEM) capability that includes a visual editor. Stata supports many time series techniques, and has some unique date features. Stata has a large array of regression techniques, ranging from OLS to 2SLS, 3SLS, and SUR. For example, Stata is quite strong with panel data, and survey data. Stata has several areas where it is arguably more capable or more integrated than R. Part Two will give specific tips and warnings to R users who do decide to use Stata. Part one will describe why an R user might be interested in Stata - with various Stata examples. (Plus a whole lot of “R for (ex-) Stata users” articles.) I’m writing this post, as a long-term R user who recently bought Stata, because I believe that Stata is a good complement to R, and many R users should consider adding it to their toolbox. ![]() At best, there are a couple of equivalence guides that show you how to do certain tasks in both programs. Or, you could run it as a conditional logit with interactions with the choices, but I don't know whether the changes between 13 and 14 affect clogit as well.I did a quick Google search on “Stata for R users” (both as separate words and as a quoted phrase) and there really isn’t much out there. If you have only case specific variables, you can look in the manual for how to run it as a multinomial logit and you might have an easier time getting convergence there (the manual shows no back ups in that output in 14). Log likelihood = -250.7794 Prob > chi2 = 0.0072Īll the result are the same, but there is some change in maximization in Stata 14 (which is documented somewhere, I'm sure). Iteration 4: log likelihood = -1943.5528 (backed up)Īlternative-specific conditional logit Number of obs = 885Īlternative variable: car Alts per case: min = 3 Iteration 3: log likelihood = -2409.6142 (backed up) Iteration 1: log likelihood = -6274.8173 (not concave) Iteration 0: log likelihood = -19907.709 (not concave) asclogit choice dealer, case(id) alternatives(car) casevars(sex income) Please, let me know if I can provide any further clarifying details.Īsclogit choice dealer, case(id) alternatives(car) casevars(sex income) If I update stata 13.0 is this going to change the command asclogit to make it the way it is currently in stata 14.0? ![]() Was asclogit in stata 13.0 wrong? Was there a patch some time during STATA 13.0 regarding asclogit that was important? Or how could a user of Stata 14 call the previous version of asclogit, or what would be an equivalent command in Stata 14 for what we were doing in Stata 13? Hence, I am interested in what exactly changed between asclogit algorithm between two versions of Stata that could cause this problem. While in Stata 13 regressions converge nicely in several iterations, with Stata 14 same regressions on the same data either do not converge in many non-concave iterations or sometimes we get this messsage: In particular, same code on the same data in different versions of Stata behaves differently. Now, I try to run same regression with the same data using Stata 14, but I noticed that there has been an important change in the asclogit command. I would appreciate your help with the following issue I encountered.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |