sagarnikam123
2012-Mar-07 06:36 UTC
[R] how to see inbuilt function(cor.test) & how to get p-value from t-value(test of significance) ?
i can see source code of function> corfunction (x, y = NULL, use = "everything", method = c("pearson", "kendall", "spearman")) { na.method <- pmatch(use, c("all.obs", "complete.obs", "pairwise.complete.obs", "everything", "na.or.complete")) ------------------------------------------------------------------------------------------------------------------------------------- but for cor.test,i gives> cor.testfunction (x, ...) UseMethod("cor.test") <bytecode: 0x05a5bff8> <environment: namespace:stats> ------------------------------------------------------------------------------------------------------------------------------------- i want p-value calculation formula also,i have t-values(test of significance) -- View this message in context: http://r.789695.n4.nabble.com/how-to-see-inbuilt-function-cor-test-how-to-get-p-value-from-t-value-test-of-significance-tp4452454p4452454.html Sent from the R help mailing list archive at Nabble.com.
Pascal Oettli
2012-Mar-07 09:12 UTC
[R] Re : how to see inbuilt function(cor.test) & how to get p-value from t-value(test of significance) ?
Hi, Please take a look at?http://svn.r-project.org/R/trunk/src/library/stats/R/cor.test.R Pascal ----- Mail original ----- De?: sagarnikam123 <sagarnikam123 at gmail.com> ??: r-help at r-project.org Cc?: Envoy? le : Mercredi 7 mars 2012 15h36 Objet?: [R] how to see inbuilt function(cor.test) & how to get p-value from t-value(test of significance) ? i can see source code of function> corfunction (x, y = NULL, use = "everything", method = c("pearson", ? ? "kendall", "spearman")) { ? ? na.method <- pmatch(use, c("all.obs", "complete.obs", "pairwise.complete.obs", ? ? ? ? "everything", "na.or.complete")) ------------------------------------------------------------------------------------------------------------------------------------- but for cor.test,i gives> cor.testfunction (x, ...) UseMethod("cor.test") <bytecode: 0x05a5bff8> <environment: namespace:stats> ------------------------------------------------------------------------------------------------------------------------------------- i want p-value calculation formula also,i have t-values(test of significance) -- View this message in context: http://r.789695.n4.nabble.com/how-to-see-inbuilt-function-cor-test-how-to-get-p-value-from-t-value-test-of-significance-tp4452454p4452454.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.
Tal Galili
2012-Mar-07 09:35 UTC
[R] how to see inbuilt function(cor.test) & how to get p-value from t-value(test of significance) ?
Try: getAnywhere(cor.test.default) ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- On Wed, Mar 7, 2012 at 8:36 AM, sagarnikam123 <sagarnikam123@gmail.com>wrote:> i can see source code of function > > > cor > function (x, y = NULL, use = "everything", method = c("pearson", > "kendall", "spearman")) > { > na.method <- pmatch(use, c("all.obs", "complete.obs", > "pairwise.complete.obs", > "everything", "na.or.complete")) > > ------------------------------------------------------------------------------------------------------------------------------------- > but for cor.test,i gives > > > cor.test > function (x, ...) > UseMethod("cor.test") > <bytecode: 0x05a5bff8> > <environment: namespace:stats> > > > ------------------------------------------------------------------------------------------------------------------------------------- > i want p-value calculation formula also,i have t-values(test of > significance) > > > -- > View this message in context: > http://r.789695.n4.nabble.com/how-to-see-inbuilt-function-cor-test-how-to-get-p-value-from-t-value-test-of-significance-tp4452454p4452454.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
Possibly Parallel Threads
- cor(..., method="spearman") or cor(..., method="kendall") (PR#6641)
- Very slow: using double apply and cor.test to compute correlation p.values for 2 matrices
- cor.test(x,y)
- strange behavior of cor() with pairwise.complete.obs
- about spearman and kendal correlation coefficient calculation in "cor"