[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Standard error of the estimate for svy: reg

From   Steven Samuels <>
Subject   Re: st: Standard error of the estimate for svy: reg
Date   Fri, 24 Aug 2007 11:18:21 -0400

Lineless Line

Here is a program to compute an estimate and C.I. for the RMSE or SER after -svy: reg- . I did not apply a bias correction for the number of predictors because I don't know how to do it. However the bias should be small for large sample size. The concerns that Stas and I have about presenting this estimate still apply.


/***************************CODE FOLLOWS***************/

/* First, a program to compute a 95% CI after -nlcom- has estimated a parameter on the log scale*/

capture program drop _all
program antilog
local lparm el(r(b),1,1)
local se sqrt(el(r(V),1,1))
local bound invttail(e(df_r),.025)*`se'
local parm exp(`lparm')
local ll exp(`lparm' - `bound')
local ul exp( `lparm' + `bound')
di "parm =" `parm' " llim = " `ll' " ul = " `ul'

webuse nhanes2, clear
svy : reg weight height
predict predicted
display "number of predictors = " e(df_m)

gen resid= weight-predicted
gen resid2=resid*resid

svy: mean resid2
nlcom .5*log(_b[resid2])


* For searches and help try:

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