*! version 1.0.0 13mar2020 Matteo Bottai
help emagnification

Title

emagnification -- Effect magnification

Syntax

Effect magnification for proportions

emagnification proportion,
p0(numlist)
or(numlist)
n0(numlist)
n1(numlist)
[other_options]

Effect magnification for rates

emagnification rate,
r0(numlist)
rr(numlist)
n0(numlist)
n1(numlist)
[other_options]

Description

emagnification estimates effect magnification of proportions and rates through simulations.

Options

p0(numlist) specifies the proportions in the reference group

or(numlist) specifies the odds ratios of the exposure group versus the reference group

r0(numlist) specifies the rates in the reference group

rr(numlist) specifies the risk ratios of the exposure group versus the reference group

n0(numlist) specifies the sample size in the reference group

n1(numlist) specifies the sample size in the exposure group

Other options

pctile(numlist) shows the percentiles specified in numlist; defaults to 10 50 90

ifactor(numlist) shows the inflation factors of the percentiles specified in numlist

nsim(#) number of simulated datasets; defaults to 10

level(#) significance level of the test; defaults to 0.05

onesided specifies a one-sided test

exact for proportion specifies the Fisher's exact test instead of the default chi-square test; for rates specifies the exact Poisson regression instead of the default Poisson regression

seed(string) specifies the seed for the pseudo-random numbers generator

log shows the simulation iterations

clean shows the results without separator lines

format(format) specifies the display format for the percentiles

Examples

Estimate the effect magnification for a proportion:

emagnification proportion, p0(.5) or(2) n0(100) n1(100)

Estimate the effect magnification for a rate:

emagnification rate, r0(.5) rr(2) n0(100) n1(100)

Estimate the effect magnification for a proportion in multiple scenarios:

emagnification proportion, p0(.5 .9) or(1.5 2) n0(100 200) n1(100 200) pctile(50 90) ifactor(50) nsim(20) level(.1) onesided seed(123) log clean

Show the saved results of the latest estimation:

return list

matrix list r(table)

Saved results

Scalars

r(level) the level of the tests

Macros

r(cmdline) command as typed

r(seed) the seed used by the pseudo-random numbers generator

Matrices

r(table) the table of the results

Also see

[PSS] power

[R] seed

Reference

Miller, D. J., Nguyen, J. T., and Bottai, M. emagnification: A tool for estimating effect size magnification and performing design calculations in epidemiological studies. Stata Journal (submitted)

Author

Matteo Bottai

Unit of Biostatistics

Institute of Environmental Medicine, Karolinska Institutet

Stockholm, Sweden