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 |
Maarten Buis <maartenlbuis@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Constraining OLS coefficients so that prediction satisfies a particular condition |

Date |
Fri, 20 May 2011 15:44:37 +0200 |

On Fri, May 20, 2011 at 2:21 PM, Amer Hasan <amerhasan1@gmail.com> wrote: > I would like to perform the following calculation using Stata 10.1SE > on a windows xp machine. > > reg y1 x1 x2 if year==1 > > predict y2-hat if year==2, xb > > such that y1 - y2-hat = K > > y1 - is observed > > y2-hat - is the prediction using betas of year 1 and Xs of year 2. > > K is the observed difference between y1 and y2 (also observable). > > I know I can constrain the betas and that should change the > prediction. What I am not sure about is how to do so in such a way > that the prediction satisfies the condition. Any guidance on how to > start would be much appreciated. I may also not be seeing the forest > for the trees. I don't think you can do this with -constraints-, so you'll probably have to write your own -ml- problem for this (if you were using Stata 11 I would say that -gmm- would fit nicer with the way you talk about this problem.) Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- * * 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**:**RE: st: Constraining OLS coefficients so that prediction satisfies a particular condition***From:*"Feiveson, Alan H. (JSC-SK311)" <alan.h.feiveson@nasa.gov>

**References**:**st: Constraining OLS coefficients so that prediction satisfies a particular condition***From:*Amer Hasan <amerhasan1@gmail.com>

- Prev by Date:
**st: Jittering problem** - Next by Date:
**st: Area under a curve** - Previous by thread:
**st: Constraining OLS coefficients so that prediction satisfies a particular condition** - Next by thread:
**RE: st: Constraining OLS coefficients so that prediction satisfies a particular condition** - Index(es):