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

Re: st: regress


From   Lars Korsholm <korsholm@stat.sdu.dk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: regress
Date   Mon, 2 Feb 2004 13:26:02 +0100 (MET)

On Mon, 2 Feb 2004, Andreas Aschbacher wrote:

> dear fellows !
> 
> I have a snappy curve(y(x)) which looks like the sum of two Gauß-functions a
> great and a little 
> hump.I use > integ y x,gen(Sy)  and  line y Sy x < to get the
> integral-function above.
> the result-curve .line Sy x seems to be the "sum" of two nearly straight
> lines with different
> k- values(y = k*x+d) that means from 0 to 5 I have k1 and from 5 to 10 I
> have k2.
> Now I'd like to make linear regression for both
> parts(region1<->k1,region2<->k2)
> in one commandline.Is this possible ?

even though I cant quite follow why you want to do this
the answer to your last question is
gen x1=x*(x<5)
gen x2=x*(x>=5)

regress y x1 x2

Best
Lars

> thank you very much                                andreas
> 
> -- 
> +++ Mailpower für Multimedia-Begeisterte: http://www.gmx.net/topmail +++
> 250 MB Mailbox, 1 GB Online-Festplatte, 100 FreeSMS. Jetzt kostenlos testen!
> 
> *
> *   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/
> 

..............................................
: Lars Korsholm Ph.D.,                       :
:  Department of Statistics                  :
:  University of Southern Denmark            :
:  Sdr. Boulevard 23A, 2.                    :
:  DK-5000 Odense C                          :
: Phone +45 6550 3608 (or 3868)              :
: Mobil +45 3033 3617                        :
: Fax   +45 6595 7766                        :
: Mail  korsholm@stat.sdu.dk                 :
: Web   http://www.biostat.sdu.dk/~korsholm  :
:............................................:



*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index