Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Re: Constraining OLS coefficients so that prediction satisfies a particular condition
Date   Sat, 21 May 2011 13:07:00 +0100

Stata references

[R]     ml  . . . . . . . . . . . . . . . . . .  Maximum likelihood estimation
        (help ml, mleval, mlmethod)

Book    . . . . . . . .  Maximum Likelihood Estimation with Stata, 4th Edition
        . . . . . . . . . William Gould, Jeffrey Pitblado, and William Sribney
        http://www.stata.com/bookstore/ml4.html

FAQ     . . . . . . . . . . . . . . . . . . . .  Use of ml for nonlinear model
        . . . . . . . . . . . . . . . . . . . . . . . . W. Guan and G. Sanchez
        6/07    How to estimate a nonlinear model using ml?
                http://www.stata.com/support/faqs/stat/nl_ml.html

Example . . . . . . . . . . . . . Capabilities:  maximum likelihood estimation
        http://www.stata.com/capabilities/mlexample.html

Example . . . . .  Simple linear and nonlinear models using Stata's ml command
        . . . . . . . . . . . . . . . . . .  UCLA Academic Technology Services
        6/09    http://www.ats.ucla.edu/stat/stata/code/simple_ml.htm

Nick 
[email protected] 

Amer Hasan

Thank you both.

Maarten do you have any sample code on using gmm to program ml?

Having never programmed my own ml, I am going to go over the archives
to see how others have gone about it.  But I would also be grateful if
you could point me to a stata reference on how to program your own ml.

Thanks
Amer

On Fri, May 20, 2011 at 8:21 AM, Amer Hasan <[email protected]> wrote:
>
> Dear Statalist Users:
>
> 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.
>

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index