[S] Re: Mamximum likelihood estima

whitman@lexmark.com
Fri, 24 Jul 1998 17:15:50 -0400


Many thanks to Steve Weller of S-Plus tech support for answering my
question. I tried it, and it works.

thanks,

Charlie Whitman.

---------------------- Forwarded by Charles Whitman/Lex/Lexmark on 07/24/98
05:13 PM ---------------------------

Stephen Weller <sweller%statsci.com@interlock.lexmark.com> on 07/24/98
01:20:01 PM

To: Charles Whitman@LEXMARK
cc: tech%statsci.com@interlock.lexmark.com
bcc:
Subject: Re: Mamximum likelihood estima

Dear Mr. Whitman,

The problem is that 'censor(time,censor,type='right') ~ dummy' is not
a valid model formula for the data:

> cwdata1.df
time censor dummy
75 1 1 1
21 29 0 1
43 35 0 1
69 56 1 1
144 73 1 1
154 94 1 1
33 98 0 1
119 136 1 1
15 218 0 1
36 289 0 1
161 328 0 1
2 350 0 1
7 354 1 1

Because the covariate 'dummy' contains only 1's Splus is interpreting the
above formula as saying that you want to fit TWO intercept terms in your
model, which is why the design matrix is collinear.

If you instead fit the model 'censor(time,censor,type='right') ~ 1', you
won't get any error messages and will get the same coefficients as
JMPIN and AGSS return:

*** Parametric Survival ***
Call:
censorReg(formula = censor(time, censor, type = "right") ~ 1, data =
cwdata1.df, na.action = na.omit, distribution = "lognormal",
threshold = 0, control = list(e.scale = 0.0001))

Distribution: Lognormal

Standardized Residuals:
Min Max
Uncensored 0.093 1.086
Censored 0.380 1.081

Coefficients:
Est. Std.Err. 95% LCL 95% UCL z-value p-value
(Intercept) 5.67 0.855 4 7.35 6.64 3.23e-011

Gaussian distribution: Dispersion (scale) = 2.383974
Observations: 13 Total; 7 Censored
-2*Log-Likelihood: 82.7

Sincerely,

|-----------------------------------------------------|
| Stephen Weller |
| S-PLUS Technical Support Engineer |
| Mathsoft Inc. |
| Data Analysis Products Division |
| Tel: (206) 283-8802 |
| Fax: (206) 283-8691 |
| email: support@statsci.com |
| |
| See the S-PLUS 4.0 Frequently Asked Questions: |
| |
| http://www.mathsoft.com/splus/splsprod/splusfaq.htm |
------------------------------------------------------|

Announcing...
1998 International S-PLUS User Conference
October 8-9, 1998
Washington, DC

Includes One Day Workshops:
'''''''''''''''''''''''''''
"Effective Programming in S"
with Bill Venables and Brian Ripley

"Modern Data Analysis Techniques in S-PLUS"
with Brian Ripley and Bill Venables

"Strategies for Developing and Validating Predictive Models"
with Frank Harrell

"Financial Topics in S-PLUS"
with Doug Martin

For current information:
www.mathsoft.com/splus/splusprod/userconf.htm
===========================================================================

On Wed, 15 Jul 1998 whitman@lexmark.com wrote:

> Steve-
> I have checked the estimates from S-PLUS with other software and
they
> do no agree. I used JMPIN software to produce a lognormal fit to some
> data. The parameters I get are mu = 5.67254, sigma = 2.38397. I used
> another software package (AGSS) to give me mu = 5.6725, sigma = 2.284,
> which is fairly close.
> When I use S-PLUS, I have to give it a "dummy" variable so that it
has
> two populations to compare. I have to add at least two fictitious data
> points for it to give me any parametric survival output. When I do this,
I
> find that the sum of the coefficients for the real data and the dummy
data
> give mu = 5.49, and sigma = 2.0406. The intercept for the real data
alone
> was 5.142. This is for a particular choice of fictitious data. If I
make
> up some different numbers for the dummy data, it changes the intercept
> value for the real data to 3.45. Also, the sum of the two coefficients
> changes to 5.53. Further, the scale parameter changes to 2.12. Thus,
the
> output changes depending on my choice for a dummy data set.
> This is really a problem. There must me some way for me to get
> estimates for the paramters for one population of lognormal data. I have
> attached the data frames I used below. If you have a chance, could you
> look them over? I would appreciate any help you could give me.
>
> Thanks,
>
> Charlie Whitman
>
> (See attached file: cwdata1.sdd)(See attached file: cwdata2.sdd)
>
>
>
> Stephen Weller <sweller%statsci.com@interlock.lexmark.com> on 07/14/98
> 09:09:52 PM
>
> Please respond to support%statsci.com@interlock.lexmark.com
>
> To: Charles Whitman@LEXMARK,
ccsupport%statsci.com@interlock.lexmark.com
> cc:
> bcc:
> Subject: Re: Mamximum likelihood estima
>
>
>
>
> Dear Mr. Whitman,
>
> I talked to the author of our censorReg() code, which is new to S-PLUS
4.5.
> For a lognormal distribution and a regression model that includes merely
> a intercept term the estimate of the mean is simply exponential of the
> reported coefficient estimate in the summary output. The estimate of the
> standard deviation is simply exp(scale estimate).
>
>
> Hope this helps.
>
> Sincerely,
>
> |-----------------------------------------------------|
> | Stephen Weller |
> | S-PLUS Technical Support Engineer |
> | Mathsoft Inc. |
> | Data Analysis Products Division |
> | Tel: (206) 283-8802 |
> | Fax: (206) 283-8691 |
> | email: support@statsci.com |
> | |
> | See the S-PLUS 4.0 Frequently Asked Questions: |
> | |
> | http://www.mathsoft.com/splus/splsprod/splusfaq.htm |
> ------------------------------------------------------|
>
> Announcing...
> 1998 International S-PLUS User Conference
> October 8-9, 1998
> Washington, DC
>
>
> Includes One Day Workshops:
> '''''''''''''''''''''''''''
> "Effective Programming in S"
> with Bill Venables and Brian Ripley
>
> "Modern Data Analysis Techniques in S-PLUS"
> with Brian Ripley and Bill Venables
>
> "Strategies for Developing and Validating Predictive Models"
> with Frank Harrell
>
> "Financial Topics in S-PLUS"
> with Doug Martin
>
>
> For current information:
> www.mathsoft.com/splus/splusprod/userconf.htm
>
===========================================================================
>
>
>
>
>

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news