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]

Re: Re: st: modify axis range in scatter graphs


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: Re: st: modify axis range in scatter graphs
Date   Tue, 23 Mar 2010 13:07:47 -0500

Andrew <[email protected]> :

Also compare:

clear all
ssc inst locpr, replace
use http://fmwww.bc.edu/repec/bocode/c/citybudget
locpr urbanplanning houseval, leg(off) yla(0 .25 "25" .5 "50" .75 "75"
1 "100") xla(0/4)

On Tue, Mar 23, 2010 at 12:41 PM, Maarten buis <[email protected]> wrote:
> --- On Tue, 23/3/10, Klink, Andrew wrote:
>> There is one caveat: when I graphed the curve using the
>> post-estimation variables as you suggest, it generates
>> the same shape curve, but on a different scale on the
>> y-axis. The initial -fpfitci- I ran generated a curve
>> whose y-axis range is within 0-1 (or as a percent: 0-100,
>> as it will be labeled). When I graph the curve from the
>> generated variables as you describe, the y-axis range is
>> from 0.5-3
>
> I thought your problem was only with the lower bound, so I
> suggested the log-link as more people are familiar and
> comfortable with it. But these new results show that that
> model won't fit well. The alternative is to fit a
> fractional polynomial within a fractional logit model (I
> couldn't resist that one, but it is a lot less complicated
> than it sounds). The fractional logit model is just a
> -glm- with the options -link(logit)-, -family(binomial)-,
> and -vce(robust)-. The inverse of the logit link is
> pre-programmed in Stata as the appropriately named
> -invlogit()- function. So, applying this to the tricks
> from my previous post leads to:
>
> *----------------- begin example ----------------------
> use http://fmwww.bc.edu/repec/bocode/c/citybudget.dta, clear
> fracpoly : glm urbanplanning houseval, ///
>           link(logit) family(binomial) vce(robust)
> predict xb , xb
> predict se , stdp
> gen lb = 100*invlogit(xb - invnormal(0.975)*se)
> gen ub = 100*invlogit(xb + invnormal(0.975)*se)
> gen mu = 100*invlogit(xb)
> twoway rarea lb ub houseval, sort astyle(ci) || ///
>       line mu houseval, sort lpattern(solid)   ///
>           ylab(0(25)100)                           ///
>           ytitle(percent of budget spent on urban planning)
> *------------- end example ----------------------
> (For more on examples I sent to the Statalist see:
> http://www.maartenbuis.nl/example_faq )

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