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

Re: st: calculating the confidence intervals for the difference in predicted values

From   stata user <>
Subject   Re: st: calculating the confidence intervals for the difference in predicted values
Date   Mon, 19 Oct 2009 01:00:07 -0700

Thanks Maarten for your suggestions.

Yes, I expect to get one confidence interval for each observation. The
context for this exercise is that, for example, we want to study the
housing price difference in two regions. I first run a regression to
determine how the housing charateristics (X) would affect a house
price (Y), based on region A's data. Then I make an out-of-sample
prediction of house price in region B. And make a in-sample prediction
of house price in region A. The the difference btw the two predictions
would be the difference in housing prices between region A and region
B, if both of the housing prices depend on the same set of housing
characteristics. I just wanted to get rid of the unobservables that
affect a particular region's housing price--so that i can have an
apple-to-apple comparison. And I want to know the error of such an

I took a look at the lincom and nlcom too, but I still don't know how
to implement this calculation because I have a lot of explanatory
variables, and over 1000 observations, and I want to do it once and
for all the observations at the same time. However, lincom and nlcom
seem to only allow me to do it for one observation every time. I am
sure whether I can use the lincom or nlcom command in some matrix
form...any ideas?

Thanks again for your help.

On Mon, Oct 19, 2009 at 12:34 AM, Maarten buis <> wrote:
> --- On Mon, 19/10/09, stata user wrote:
>> I have a question on how to calculate confidence intervals
>> for the difference between two predicted values.
> <snip>
>> Also, what if I want to find Var(Y_in/Y_out)?--i.e. now we
>> want to estimate the variance of a nonlinear function of
>> the two predicted values.
> I am not quite sure what it is exactly that you are trying to do:
> do you expect to get one number out of this calculation, or a
> number for every observation in your data, how do you want to
> match your observed values with your counterfactual values, etc.
> So the only advise I can give you is to take a look at -lincom-,
> -nlcom-, and -predictnl-.
> Hope this helps,
> Maarten
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
> --------------------------
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

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