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

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

From   "Carlo Lazzaro" <>
To   <>
Subject   st: R: Simulation using Stata (flag: 9.2/SE version)
Date   Sat, 17 Oct 2009 11:24:23 +0200

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

HTH and Kind Regards,

-----Messaggio originale-----
[] Per conto di Ali
Inviato: sabato 17 ottobre 2009 2.04
Oggetto: st: Simulation using Stata

Hello all:

Does anyone know if there is a book (or any other resource) that
introduces simulation and provides practical examples using Stata?
This is mainly for quantifying the impact of change in a particular
predictor of interest on the observed odds ratio or relative risk in a
regression model.

Thank you for your help,
*   For searches and help try:

*   For searches and help try:

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