Dear Jose,
the genpr(myvariable) option generates simulated probabilities and stores
them in a variable called myvariable. This option is only allowed for
models in which the quantity of interest is a probability.
If you want confidence intervals around an expected value in a regression,
use genev(myvariable), which will generate simulations of E(Y) and store
them in "myvariable". If you want simulations of Y itself, use
genpv(myvariable)
Hope this helps.
- Mike
Michael Tomz
Assistant Professor, Stanford University
Department of Political Science
Encina Hall West, Stanford, CA 94305-6044
phone 650-725-4031 | fax 650-723-1808
On Thu, 14 Apr 2005, Jose Antonio Pena Merino wrote:
Hi all,
I have been reading the instructions to graph the clarify results in
stata. However, it is not clear how to keep the confidence intervals
low
and high values for a simple OLS regression instead of a probabilistic
model. When I try to do it:
estsimp reg dependent set of independents, sims(1000);
gen axis=_n + 1 in 1/204;
setx mean;
local a=1;
while `a'<=204 {;
setx keyindependent `a';
simqi, ev genpr(margins);
_pctile margins, p(.5,99.5);
replace plo=r(r1) if axis==`a';
replace phi=r(r2) if axis==`a';
drop margins;
local a = `a' + 1;
};
sort axis;
graph plo phi axis, s(ii) c(||);
It returns this message "Probabilities are not allowed with
regression", as I understand it when we say genpr(margins) we are just
generating the confidence interval and in the next line we define the
confidence level, such that we can replace those values to be graphed
later.
If I try without generating the margins I obtain the values but,
obviously, this are not kept by stata and thus I cannot do the graph
directly in stata.
I wonder if any of you have faced the same problem and how did you
solved it.
Thanks a lot
Yours
Jose Merino
--
Clarify mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive:
http://lists.hmdc.harvard.edu/?info=clarify
--
Clarify mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive:
http://lists.hmdc.harvard.edu/?info=clarify