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

Re: st: Simulation: marginal effect at the 5th percentile

From   Maarten buis <>
Subject   Re: st: Simulation: marginal effect at the 5th percentile
Date   Tue, 2 Dec 2008 09:46:18 +0000 (GMT)

--- "Supnithadnaporn, Anupit" <> wrote:
> I am running a simulation of the logit model. Each repetition I
> create a variable called "a", which is normally distributed. I would
> like to find the marginal effect of this variable at the certain
> percentiles of its distribution. The problem is that I cannot 
> specify the number of the particular percentile in  -mfx, predict(p)
> at( )- because I don't know the value in each repetition.

Apart from the excellent comments by Martin, you can also use the fact
that you do have a good idea what the percentile should be, as you
created the variable to be normally distributed:

local percentile = invnormal(.05)

The advantage of this approach is that this way you can get away with
creating smaller datasets, and thus speed up your simulation, because
you now no longer need a large dataset to get a reliably/stable
estimate of the percentile.

Hope this helps,

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

*   For searches and help try:

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