Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: fracplot for gamma glm


From   Keith Dear <keith.dear@anu.edu.au>
To   statalist@hsphsun2.harvard.edu
Subject   st: fracplot for gamma glm
Date   Fri, 11 Aug 2006 12:47:07 +1000

Fracplot "plots the data and fit, with 95% confidence limits, from the most recently fitted fractional polynomial model."

I am using gamma regression with identity link, and what it plots as "data" is
yv = etahat + dr
(I am omitting lots of macro quotes here), where
dr = sign(y-mu)*sqrt(drsq)
and the squared deviance residuals are
drsq = -2*(ln(y/mu) - (y-mu)/mu)

I am puzzled because then dr is dimensionless, whereas I would like it to be in Y units, as etahat is (identity link, remember). I am getting plots with "data" much too close to the fitted curve, because my mu>>1. How can I fix this and get plots that look like the data?

An alternative (in my particular case) would be to plot
yv = mu + mu*dr
I can force this by tinkering inside the ado files, but is there a better, and more general, way? And does "mu*dr" have a name?

kd


Dr Keith B.G. Dear
Senior Fellow in Biostatistics
National Centre for Epidemiology and Population Health
Australian National University
Canberra, ACT 0200, Australia
Tel: 02 612 54865, Fax: 02 612 50740
http://nceph.anu.edu.au/Staff_Students/staff_pages/dear.php
CRICOS provider #00120C

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