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

st: AW: calculating stdp for interpolation/extrapolation

From   "Ariel Linden, DrPH" <>
Subject   st: AW: calculating stdp for interpolation/extrapolation
Date   Wed, 16 Sep 2009 11:22:08 -0400

Hi Martin,

Thank you for your response. I assume you are referring to the manuals where
you see the formulas for the STDP, STDF, and STDR? I am traveling and don't
have access to them, so I am looking to the help files loaded with Stata

Given that I am trying to interpolate to values within the range (but not
necessarily available in the dataset), it appears that I will either need to
manually calculate the STDP (or STDF), or take the STDF from a value close
to that which I want to build a CI around?

I cannot interpret the MATA code below to know how to calculate this
manually. Could you please provide an example (perhaps with the auto data
using price = Y and weight = X)?

Thank you again for your guidance.


Date: Wed, 16 Sep 2009 00:00:01 +0200
From: "Martin Weiss" <>
Subject: st: AW: calculating stdp for interpolation/extrapolation


If you ever wanted to recalculate the three standard errors returned by
- -predict-, you could employ -mata- to see they are correct...

sysuse auto, clear

reg we pr disp
gen cons=1
predict stdp, stdp
predict stdf, stdf
predict stdr, stdr

tomata cons pr di

X=(cons, price , displacement)
//last 10 rows
(stdp, stdr, stdf)[(rows(stdf)-9..rows(stdf)),.]

l stdp stdr stdf /* 
*/ in -10/l, noo sep(0)


*   For searches and help try:

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