Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: R: Simulation using Stata (flag: 9.2/SE version)


From   jhilbe@aol.com
To   statalist@hsphsun2.harvard.edu
Subject   st: R: Simulation using Stata (flag: 9.2/SE version)
Date   Sun, 18 Oct 2009 12:36:26 -0400

I only get the Digest, so do not see the Stata list until the next day.

I submitted a rather extensive article to the Stata Journal a while back that shows how to create a number of different types of synthetic data sets using Stata. I also provide code that can be amended by the user to modify the models as they desire.. Included are, in part, logit and probit both binary and proportional response, Poisson with and without offsets and with a separate cluster variable, negative binomial with and without offsets -- I show for each NB2, NB1, quasipoisson, and NB-C. I also show multinomial and ordered logit and probit models, and synthetic hurdle models. The user can specify how many predictors they what and their coefficient values, and for NB models can specify the desired value of alpha, the ancillary parameter. For categorical response models, the user can select how many levels and the coefficients in each level, and for ordered models,
the values of coefficients and cut values.

I used and explained many of these models in my text, "Logistic Regression Models", but the article goes into greater length for non-binomial models. If you are having a need to create a synthetic model of this type, or others which can use the same logic for construction, let me know and I'll send it to you. Email me a hilbe@asu.edu

I am a strong advocate of using synthetic models to better understand real models. Fortunately, Stata has all of the tools necessary to create a wide variety of synthetic
models.

Joseph Hilbe


========================================

Date: Sat, 17 Oct 2009 14:37:59 +0200
From: "Martin Weiss" <martin.weiss1@gmx.de>
Subject: st: RE: R: RE: R: Simulation using Stata (flag: 9.2/SE version)

<>

Well, the MUS book is pretty comprehensive in its coverage of MCs, and the presentation by Ian White at the London UGM this year may fill some blank spots. Stata.com seems to be down at the moment, so cannot post the link...

A book totally devoted to MC would be a bit of a stretch, IMHO...


HTH
Martin

- -----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Carlo Lazzaro
Sent: Samstag, 17. Oktober 2009 13:34
To: statalist@hsphsun2.harvard.edu
Subject: st: R: RE: R: Simulation using Stata (flag: 9.2/SE version)


Dear Martin,
In my previous posting I meant something like "Performing Monte Carlo
simulations with Stata".
IMHO, this textbook should cover the theoretical building blocks of Monte
Carlo simulations, including double loop exercises, and present a lot of
examples drawn from different research fields (eg: risk analysis;
epidemiology; statistics; econometrics and, of course, microeconometrics;
health economics; ecology)with related Stata codes discussed to the gory
detail.

I do not know if someone at Stata or among the most prominent Statalist
contributors are interested in publishing such a textbook.

Kind Regards and a nice W_E to you and to all Statalisters,
Carlo

- -----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Martin Weiss
Inviato: sabato 17 ottobre 2009 12.09
A: statalist@hsphsun2.harvard.edu
Oggetto: st: RE: R: Simulation using Stata (flag: 9.2/SE version)


<>


" Unfortunately, Stata textbooks entirely devoted to this topic haven't be
published, so far."


Microeconometrics Using Stata, by Cameron and Trivedi (2008), is full of
examples for -simulate-...




HTH
Martin

- -----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Carlo Lazzaro
Sent: Samstag, 17. Oktober 2009 11:24
To: statalist@hsphsun2.harvard.edu
Cc: 'Ali Rowhani-Rahbar'
Subject: st: R: Simulation using Stata (flag: 9.2/SE version)

Dear Ali,
as far as my knowledge is concerned, the only examples of simulations with
Stata (9.2/SE version) are reported in - help simulate -, that you might
want to invoke from within Stata.
Unfortunately, Stata textbooks entirely devoted to this topic haven't be
published, so far.
However, sticking to your query, performing a probabilistic sensitivity
analysis on the observed OR is straightforward with Stata.

- ----------------------------begin example --------------------------------
sysuse nlsw88.dta
logistic union married
set obs 10000
g Sens_OR= (.7800495 +.0863818 *invnorm(uniform()))
- ----------------------------end example --------------------------------

In the example sketched above you can draw 10,000 random values from the OR sampling distribution by simply plugging in the observed OR and its standard
error.

HTH and Kind Regards,
Carlo


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index