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, **statalist.org** is already up and running.

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

From |
Dirk Enzmann <dirk.enzmann@uni-hamburg.de> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: correct confidence intervals of -mean- ? |

Date |
Sat, 06 Mar 2010 13:47:41 +0100 |

* -------------------------------------- sysuse auto, clear mean price, over(rep78) local df = e(df_r) display "degrees of freedom = n-1 = `df'" * Note that here df is the number of the total sample - 1! * alternative route:

* calculate the confidence intervals the -mean- way: gen ci95la = mprice - invttail(`df',.025)*sdprice/sqrt(nprice) gen ci95ua = mprice + invttail(`df',.025)*sdprice/sqrt(nprice) * calculate the confidence intervals a different way: gen ci95lb = mprice - invttail(nprice-1,.025)*sdprice/sqrt(nprice) gen ci95ub = mprice + invttail(nprice-1,.025)*sdprice/sqrt(nprice) * compare both sets of confidence intervals (..a vs ..b): list * -------------------------------------- My question: Which procedure is correct? ************************************************* Dr. Dirk Enzmann Institute of Criminal Sciences Dept. of Criminology Schlueterstr. 28 D-20146 Hamburg Germany phone: +49-(0)40-42838.7498 (office) +49-(0)40-42838.4591 (Mrs Billon) fax: +49-(0)40-42838.2344 email: dirk.enzmann@uni-hamburg.de

************************************************* * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: Re: correct confidence intervals of -mean- ?***From:*Dirk Enzmann <dirk.enzmann@uni-hamburg.de>

**Re: st: correct confidence intervals of -mean- ?***From:*Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>

- Prev by Date:
**st: 回复： st: Re: str** - Next by Date:
**st: re: correct confidence intervals of -mean- ?** - Previous by thread:
**st: str** - Next by thread:
**Re: st: correct confidence intervals of -mean- ?** - Index(es):