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: lfit 2 lines with different slopes but same intercept in cmogram?


From   Jen Zhen <[email protected]>
To   [email protected]
Subject   st: lfit 2 lines with different slopes but same intercept in cmogram?
Date   Thu, 6 Mar 2014 17:07:27 +0100

Dear list members,

I use Chris Roberts' cmogram to

-cmogram y x, scatter cutpoint(50) lineat(50) lfit histopts(bin(20)) -

to construct a scatterplot and to fit separate lines on each side of a
cutoff value.

Now I'd like to allow the 2 lines to have different slopes, but I want
them to have the same intercept, i.e. I want to impose that there is
no jump between the the two lines at x=50.

I presume this has to be done through lfitopts() but I don't know how.

Any clues?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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