Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: Smoothed Plot with Observation Specific CIs

From   Maarten buis <>
Subject   Re: st: Smoothed Plot with Observation Specific CIs
Date   Thu, 15 Jul 2010 06:40:43 +0000 (GMT)

--- On Thu, 15/7/10, Wassim Tarraf wrote:
> I have a data set that includes point (probability)
> estimates and their standard errors. Any recommendations on
> the best way, in Stata, to smooth plot these point estimates
> relative to a continuous X variable (say age) with CIs
> (based on point specific SEs) about them?

Something like:

gen lb = pred - invnormal(0.975)*se
gen ub = pred + invnormal(0.975)*se

twoway rarea lb ub age, sort || ///
       line pred age, sort

This assumes that pred is your prediction, se is your standard
error and age is your X variable.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index