EconPapers    
Economics at your fingertips  
 

Versatile sample-size calculation using simulation

Richard Hooper ()
Additional contact information
Richard Hooper: Queen Mary, University of London

Stata Journal, 2013, vol. 13, issue 1, 21-38

Abstract: I present a new Stata command, simsam, that uses simulation to determine the sample size required to achieve a given statistical power for any hypothesis test under any probability model that can be programmed in Stata. simsam returns the smallest sample size (or smallest multiple of 5, 10, or some other user-specified increment) so that the estimated power exceeds the target. The user controls the precision of the power estimate, and power is reported with a confidence interval. The sample size returned is reliable to the extent that if simsam is repeated, it will, nearly every time, give a sample size no more than one increment away. Copyright 2013 by StataCorp LP.

Keywords: simsam; sample size; power; simulation (search for similar items in EconPapers)
Date: 2013
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj13-1/st0282/
References: View references in EconPapers View complete reference list from CitEc
Citations: View citations in EconPapers (1)

Downloads: (external link)
http://www.stata-journal.com/article.html?article=st0282 link to article purchase

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:v:13:y:2013:i:1:p:21-38

Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html

Access Statistics for this article

Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins

More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().

 
Page updated 2025-03-20
Handle: RePEc:tsj:stataj:v:13:y:2013:i:1:p:21-38