[R] Odp: R-help

From: Petr PIKAL <petr.pikal_at_precheza.cz>
Date: Tue, 4 Dec 2007 15:48:37 +0100


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.



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 Tue 04 Dec 2007 - 14:55:01 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 Tue 04 Dec 2007 - 15:30:17 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.