Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Split-half; was: OT:your favorite math equations editor


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   st: Re: Split-half; was: OT:your favorite math equations editor
Date   Fri, 17 Sep 2004 12:22:42 +0200

Simon Moore wrote:
> I am hoping to use non-linear least squares (nl) in Stata v8.0. The
> analyses are relatively straight forward (nl exp2 var1 var2). However
> it would be nice if I could perform some form of split half analysis
> (i.e. fit the model to one half of the dataset and then see how it
> predicts on the other half). Is there a means of achieving this in
> Stata?


Basically something like:

. gen r = uniform()
. nl ... if r < .5
. predict Yhat if r >= .5

uli

-- 
[email protected]
+49 (030) 25491-361


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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