Thread Subject: coxphfit in Statistics toolbox

Subject: coxphfit in Statistics toolbox

From: Jerry

Date: 28 Apr, 2008 22:57:04

Message: 1 of 6

The "censoring" option for coxphfit in the Statistics
toolbox has the following definition in the Matlab documents
"A boolean array of the same size as Y that is 1 for
observations that are right-censored and 0 for observations
that are observed exactly." This is exactly opposite to the
common definition in the literature in which 1 is for
observations that are observed exactly (true event) and 0 is
for right-censored observations. Is it a typo in the
documents or the definition of censoring in the Matlab code
is really like that (i.e., opposite to the commonly used one)?

Thanks very much.

Subject: coxphfit in Statistics toolbox

From: Tom Lane

Date: 29 Apr, 2008 14:33:36

Message: 2 of 6


> The "censoring" option for coxphfit in the Statistics
> toolbox has the following definition in the Matlab documents
> "A boolean array of the same size as Y that is 1 for
> observations that are right-censored and 0 for observations
> that are observed exactly." This is exactly opposite to the
> common definition in the literature in which 1 is for
> observations that are observed exactly (true event) and 0 is
> for right-censored observations. Is it a typo in the
> documents or the definition of censoring in the Matlab code
> is really like that (i.e., opposite to the commonly used one)?

Jerry, it really is like that. In MATLAB, 1 is "true," and since the
argument is called "censoring" it indicates observations that are censored.

I've seen both usages in different references. If you think there's an
authoritative reference that's opposite what this function expects, please
let me know.

-- Tom

Subject: coxphfit in Statistics toolbox

From: Jerry

Date: 1 May, 2008 17:24:04

Message: 3 of 6

> Jerry, it really is like that. In MATLAB, 1 is "true,"
and since the
> argument is called "censoring" it indicates observations
that are censored.
>
> I've seen both usages in different references. If you
think there's an
> authoritative reference that's opposite what this
function expects, please
> let me know.
>

Thanks, Tom. In all the references I read (Tibshirani's
Generalized additive models, for example, and many recent
papers in the bioinformatics/biostat literature), it's
defined oppositely to Matlab. But it won't matter as long
as users notice this difference.

Since the source code is not accessible for this function,
can you provide more specific reference on the algorithm
used? I know two books are listed in the Matlab documents,
is there a particular chapter describing an algorithm that
Matlab implemented exactly?

Thanks very much.
Jerry
  

Subject: coxphfit in Statistics toolbox

From: Steven Lord

Date: 2 May, 2008 14:31:57

Message: 4 of 6


"Jerry " <mricad@yahoo.no000spppam.com> wrote in message
news:fvcubk$men$1@fred.mathworks.com...
>> Jerry, it really is like that. In MATLAB, 1 is "true,"
> and since the
>> argument is called "censoring" it indicates observations
> that are censored.
>>
>> I've seen both usages in different references. If you
> think there's an
>> authoritative reference that's opposite what this
> function expects, please
>> let me know.
>>
>
> Thanks, Tom. In all the references I read (Tibshirani's
> Generalized additive models, for example, and many recent
> papers in the bioinformatics/biostat literature), it's
> defined oppositely to Matlab. But it won't matter as long
> as users notice this difference.
>
> Since the source code is not accessible for this function,

COXPHFIT is an M-file (at least it is in Release R2008a -- I assume it is in
previous releases as well.) You can edit it and read the code.

*snip*

--
Steve Lord
slord@mathworks.com

Subject: coxphfit in Statistics toolbox

From: Tom Lane

Date: 2 May, 2008 17:40:09

Message: 5 of 6

> Since the source code is not accessible for this function,
> can you provide more specific reference on the algorithm
> used? I know two books are listed in the Matlab documents,
> is there a particular chapter describing an algorithm that
> Matlab implemented exactly?

Jerry, as Steve pointed out you can type "edit coxphfit" to see the code.

The books "Analysis of Survival Data" by Cox and Oakes (chapter 7), and
"Statistical Models and Methods for Lifetime Data" by Lawless (also chapter
7), are two good references for this material. The code might not exactly
follow either one step-by-step, but either should be helpful.

-- Tom

Subject: coxphfit in Statistics toolbox

From: Jerry

Date: 5 May, 2008 19:00:20

Message: 6 of 6

"Tom Lane" <tlane@mathworks.com> wrote in message
<fvfjlp$9jp$1@fred.mathworks.com>...
> > Since the source code is not accessible for this
function,
> > can you provide more specific reference on the
algorithm
> > used? I know two books are listed in the Matlab
documents,
> > is there a particular chapter describing an algorithm
that
> > Matlab implemented exactly?
>
> Jerry, as Steve pointed out you can type "edit coxphfit"
to see the code.
>
> The books "Analysis of Survival Data" by Cox and Oakes
(chapter 7), and
> "Statistical Models and Methods for Lifetime Data" by
Lawless (also chapter
> 7), are two good references for this material. The code
might not exactly
> follow either one step-by-step, but either should be
helpful.
>
> -- Tom
>

Thanks very much, Tom. I didn't say it clearly last time --
 there is an optimization function (statsfminbx) being
called in coxphfit which sometimes generates some warning
messages that I don't know how to deal with. Is this
function described somewhere? Also, when there is
censoring in the response data, does coxphfit require that
the number of events (ie, exact observations) to be larger
than the number of covariates?

Thanks again for your help.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
coxphfit Jerry 28 Apr, 2008 19:00:06
censoring Jerry 28 Apr, 2008 19:00:06
rssFeed for this Thread

Contact us at files@mathworks.com