Skip to content
Back to formatted view

Raw Message

Message-ID: <OFB6E2C61F.DA39A75C-ONC12573A7.0050C7C3-C12573A7.00514B0F@precheza.cz>
Date: 2007-12-04T14:48:37Z
From: PIKAL Petr
Subject: Odp:  R-help
In-Reply-To: <20013690712031739r768bafebs4fbbae207c9ccb27@mail.gmail.com>

Hi

r-help-bounces at r-project.org napsal dne 04.12.2007 02:39:39:

> > I recently picked up R for econometrics modeling, and I am confronted 
with
> a
> > problem. I use cor.test() for spearman test, and want to get the "rho" 
and
> > "P-value" in the summary. Would you please tell me how to get them? 
Thank
> you very much!
> >
> >
> >
> > Here is the cor.test() summary:
> >
> > Spearman's rank correlation rho
> >
> >
> >
> > data:  a[, 3] and a[, 2]
> >
> > S = 22, p-value = 0.001174
> >
> > alternative hypothesis: true rho is not equal to 0
> >
> > sample estimates:
> >
> >       rho
> >
> > 0.8666667

See how result of cor.test() is organised by

str(your.result)

and pick up the value you want from list. See ...$estimate

Regards
Petr

> >
> >
> >
> > Best Regards,
> >
> > Hayes
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.