Re: [R] using rcorr.cens for Goodman Kruskal gamma

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Wed, 19 Dec 2007 06:58:27 -0600

Colin Robertson wrote:
> Dear List,
>
>
>
> I would like to calculate the Goodman-Kruskal gamma for the predicted
> classes obtained from an ordinal regression model using lrm in the Design
> package. I couldn't find a way to get gamma for predicted values in Design
> so have found previous positings suggesting to use :
>
>
>
> Rcorr.cens(x, S outx = TRUE) in the Hmisc package
>
>
>
> My question is, will this work for predicted vs observed factors? I.e. x =
> predicted class and S = observed class? Or is there a better way to obtain
> this? I used the maximum individual probability for each observation to
> determine the predicted class.

Rank correlation measures are for correlating a continuous or ordinal prediction with a response (continuous, ordinal, or binary). So you should be able to do something like rcorr.cens(predict(fit), as.numeric(Y), outx=TRUE). Note that rcorr is all lower case. This assumes that the levels of Y are in order, as does lrm.

Note that the new version of lrm has a method for getting predicted mean scores from an ordinal lrm.

Frank

>
>
>
> Any help appreciated,
>
>
>
> Thanks
>
>
>
> Colin
>
>
>
>
>
>
>
> Colin Robertson
>
> Dept of Geography
>
> University of Victoria

-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 19 Dec 2007 - 13:01:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 19 Dec 2007 - 13:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.