
Olá a todos, eu ando as voltas para instalar pacotes para trabalhar com correlação. install.packages("ppcor", lib="~/Rpacks") library" library(ppcor, lib="~/Rpacks") install.packages("ppcor", lib="~/Rpacks") library" library(ppcor, lib="~/Rpacks") no library trees found in 'lib.loc'
help.search(“correlaction”)
help.search(“correlation”)
Error: unexpected input in "help.search(“"
help.search(“correlation”)
Error: unexpected input in "help.search(“"
help.search(“correlaction”)
Error: unexpected input in "help.search(“"
help.search(“cor”)
Error: unexpected input in "help.search(“"
help(package=ppcor)
starting httpd help server ... done
help(package=ppcor) help(package=cor) install.packages("ppcor") Installing package(s) into ‘C:/Documents and Settings/ARua/My Documents/R/win-library/2.15’ (as ‘lib’ is unspecified) Warning: unable to access index for repository http://cran.fiocruz.br/bin/windows/contrib/2.15 Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.15 Warning message: package ‘ppcor’ is not available (for R version 2.15.1) library(ppcor) Error in library(ppcor) : there is no package called ‘ppcor’
e tambem com "cor" pscor etc se eu tenho um pdf do pacote por isso acho ainda mai estranho... que estou eu a fazer mal? tenho R2.15 Package ‘ppcor’ February 15, 2012 Type Package Title Partial and Semi-partial (Part) correlation Version 1.0 Date 2011-06-14 Author Seongho Kim Maintainer Seongho Kim <biostatistician.kim@gmail.com> Description The R package ppcor can calculate parital and semi-partial (part) correlations along with p-value. License GPL-2 Repository CRAN Date/Publication 2011-06-15 18:04:26 R topics documented: ppcor-package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 pcor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 pcor.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 spcor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 spcor.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Index 9 ppcor-package Partial and Semi-partial (Part) correlation Description The R package ppcor can calculate parital and semi-partial (part) correlations along with p value. Details 1 2 ppcor-package Package: ppcor Type: Package Version: 1.0 Date: 2011-06-14 License: GPL-2 Author(s) Seongho Kim <biostatistician.kim@gmail.com> References Kim, S.H. and Yi, S. (2007) Understanding relationship between sequence and functional evolution in yeast proteins . Genetica, 131: 151. Kim, S.H. and Yi, S. (2006) Correlated asymmetry between sequence and functional divergence of duplicate proteins in Saccharomyces cerevisiae . Molecular Biology and Evolution, 23: 1068. Johnson, Richard A. and Dean W. Wichern (2002) Applied multivariate statistical analysis. Prentice Hall. Whittaker, Joe (1990) Graphical models in applied multivariate statistics. John Wiley & Sons. Examples # data y.data <- data.frame( hl=c(7,15,19,15,21,22,57,15,20,18), disp=c(0.000,0.964,0.000,0.000,0.921,0.000,0.000,1.006,0.000,1.011), deg=c(9,2,3,4,1,3,1,3,6,1), BC=c(1.78e-02,1.05e-06,1.37e-05,7.18e-03,0.00e+00,0.00e+00,0.00e+00,4.48e-03,2.10e-06,0.00e+00) ) # partial correlation pcor(y.data) # partial correlation between "hl" and "disp" given "deg" and "BC" pcor.test(y.data$hl,y.data$disp,y.data[,c("deg","BC")]) pcor.test(y.data[,1],y.data[,2],y.data[,c(3:4)]) pcor.test(y.data[,1],y.data[,2],y.data[,-c(1:2)]) # semi-partial (part) correlation spcor(y.data) # semi-partial (part) correlation between "hl" and "disp" given "deg" and "BC" spcor.test(y.data$hl,y.data$disp,y.data[,c("deg","BC")]) spcor.test(y.data[,1],y.data[,2],y.data[,c(3:4)]) spcor.test(y.data[,1],y.data[,2],y.data[,-c(1:2)]) pcor 3 pcor Partial correlation Description The function pcor can calculate the pairwise partial correlations for each pair of variables given others. In addition, it gives us the p value as well as statistic for each pair of variables. Usage pcor(x, method = c("pearson", "kendall", "spearman")) Arguments x a matrix or data fram. method a character string indicating which partial correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman" can be abbreviated. Details Partial correlation is the correlation of two variables while controlling for a third or more other variables. Value estimate a matrix of the partial correlation coefficient between two variables p.value a matrix of the p value of the test statistic a matrix of the value of the test statistic n the number of samples gn the number of given variables method the correlation method used Note Missing values are not allowed. Author(s) Seongho Kim <<biostatistician.kim@gmail.com>> References Kim, S.H. and Yi, S. (2007) Understanding relationship between sequence and functional evolution in yeast proteins . Genetica, 131: 151. Kim, S.H. and Yi, S. (2006) Correlated asymmetry between sequence and functional divergence of duplicate proteins in Saccharomyces cerevisiae . Molecular Biology and Evolution, 23: 1068. Johnson, Richard A. and Dean W. Wichern (2002) Applied multivariate statistical analysis. Prentice Hall. Whittaker, Joe (1990) Graphical models in applied multivariate statistics. John Wiley & Sons. 4 pcor.test See Also pcor.test, spcor, spcor.test Examples # data y.data <- data.frame( hl=c(7,15,19,15,21,22,57,15,20,18), disp=c(0.000,0.964,0.000,0.000,0.921,0.000,0.000,1.006,0.000,1.011), deg=c(9,2,3,4,1,3,1,3,6,1), BC=c(1.78e-02,1.05e-06,1.37e-05,7.18e-03,0.00e+00,0.00e+00,0.00e+00,4.48e-03,2.10e-06,0.00e+00) ) # partial correlation pcor(y.data) pcor.test Partial correlation for two variables given a third variable. Description The function pcor.test can calculate the pairwise partial correlations between two variables. In addition, it gives us the p value as well as statistic. Usage pcor.test(x, y, z, method = c("pearson", "kendall", "spearman")) Arguments x a numeric vector. y a numeric vector. z a numeric vector. method a character string indicating which partial correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman" can be abbreviated. Details Partial correlation is the correlation of two variables while controlling for a third variable. Value estimate the partial correlation coefficient between two variables p.value the p value of the test statistic the value of the test statistic n the number of samples gn the number of given variables method the correlation method used spcor 5 Note Missing values are not allowed Author(s) Seongho Kim <<biostatistician.kim@gmail.com>> References Kim, S.H. and Yi, S. (2007) Understanding relationship between sequence and functional evolution in yeast proteins . Genetica, 131: 151. Kim, S.H. and Yi, S. (2006) Correlated asymmetry between sequence and functional divergence of duplicate proteins in Saccharomyces cerevisiae . Molecular Biology and Evolution, 23: 1068. Johnson, Richard A. and Dean W. Wichern (2002) Applied multivariate statistical analysis. Prentice Hall. Whittaker, Joe (1990) Graphical models in applied multivariate statistics. John Wiley & Sons. See Also pcor, spcor, spcor.test Examples # data y.data <- data.frame( hl=c(7,15,19,15,21,22,57,15,20,18), disp=c(0.000,0.964,0.000,0.000,0.921,0.000,0.000,1.006,0.000,1.011), deg=c(9,2,3,4,1,3,1,3,6,1), BC=c(1.78e-02,1.05e-06,1.37e-05,7.18e-03,0.00e+00,0.00e+00,0.00e+00,4.48e-03,2.10e-06,0.00e+00) ) # partial correlation between "hl" and "disp" given "deg" and "BC" pcor.test(y.data$hl,y.data$disp,y.data[,c("deg","BC")]) pcor.test(y.data[,1],y.data[,2],y.data[,c(3:4)]) pcor.test(y.data[,1],y.data[,2],y.data[,-c(1:2)]) spcor Semi-partial (part) correlation Description The function spcor can calculate the pairwise semi-partial (part) correlations for each pair of variables given others. In addition, it gives us the p value as well as statistic for each pair of variables. Usage spcor(x, method = c("pearson", "kendall", "spearman")) 6 spcor Arguments x a matrix or data fram. method a character string indicating which semi-partial (part) correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman" can be abbreviated. Details Semi-partial correlation is the correlation of two variables with variation from a third or more other variables removed only from the second variable. Value estimate a matrix of the semi-partial (part) correlation coefficient between two variables p.value a matrix of the p value of the test statistic a matrix of the value of the test statistic n the number of samples gn the number of given variables method the correlation method used Note Missing values are not allowed. Author(s) Seongho Kim <<biostatistician.kim@gmail.com>> References Kim, S.H. and Yi, S. (2007) Understanding relationship between sequence and functional evolution in yeast proteins . Genetica, 131: 151. Kim, S.H. and Yi, S. (2006) Correlated asymmetry between sequence and functional divergence of duplicate proteins in Saccharomyces cerevisiae . Molecular Biology and Evolution, 23: 1068. Johnson, Richard A. and Dean W. Wichern (2002) Applied multivariate statistical analysis. Prentice Hall. Whittaker, Joe (1990) Graphical models in applied multivariate statistics. John Wiley & Sons. See Also spcor.test, pcor, pcor.test Examples # data y.data <- data.frame( hl=c(7,15,19,15,21,22,57,15,20,18), disp=c(0.000,0.964,0.000,0.000,0.921,0.000,0.000,1.006,0.000,1.011), deg=c(9,2,3,4,1,3,1,3,6,1), spcor.test 7 BC=c(1.78e-02,1.05e-06,1.37e-05,7.18e-03,0.00e+00,0.00e+00,0.00e+00,4.48e-03,2.10e-06,0.00e+00) ) # semi-partial (part) correlation spcor(y.data) spcor.test Semi-partial (part) correlation for two variables given a third variable. Description The function spcor.test can calculate the pairwise semi-partial (part) correlations between two variables. In addition, it gives us the p value as well as statistic. Usage spcor.test(x, y, z, method = c("pearson", "kendall", "spearman")) Arguments x a numeric vector. y a numeric vector. z a numeric vector. method a character string indicating which partial correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman" can be abbreviated. Details Semi-partial correlation is the correlation of two variables with variation from a third variable removed only from the second variable. Value estimate the semi-partial (part) correlation coefficient between two variables p.value the p value of the test statistic the value of the test statistic n the number of samples gn the number of given variables method the correlation method used Note Missing values are not allowed 8 spcor.test Author(s) Seongho Kim <<biostatistician.kim@gmail.com>> References Kim, S.H. and Yi, S. (2007) Understanding relationship between sequence and functional evolution in yeast proteins . Genetica, 131: 151. Kim, S.H. and Yi, S. (2006) Correlated asymmetry between sequence and functional divergence of duplicate proteins in Saccharomyces cerevisiae . Molecular Biology and Evolution, 23: 1068. Johnson, Richard A. and Dean W. Wichern (2002) Applied multivariate statistical analysis. Prentice Hall. Whittaker, Joe (1990) Graphical models in applied multivariate statistics. John Wiley & Sons. See Also spcor, pcor, pcor.test Examples # data y.data <- data.frame( hl=c(7,15,19,15,21,22,57,15,20,18), disp=c(0.000,0.964,0.000,0.000,0.921,0.000,0.000,1.006,0.000,1.011), deg=c(9,2,3,4,1,3,1,3,6,1), BC=c(1.78e-02,1.05e-06,1.37e-05,7.18e-03,0.00e+00,0.00e+00,0.00e+00,4.48e-03,2.10e-06,0.00e+00) ) # semi-partial (part) correlation between "hl" and "disp" given "deg" and "BC" spcor.test(y.data$hl,y.data$disp,y.data[,c("deg","BC")]) spcor.test(y.data[,1],y.data[,2],y.data[,c(3:4)]) spcor.test(y.data[,1],y.data[,2],y.data[,-c(1:2)]) Index _Topic htest pcor, 3 pcor.test, 4 ppcor-package, 1 spcor, 5 spcor.test, 7 pcor, 3, 5, 6, 8 pcor.test, 4, 4, 6, 8 ppcor (ppcor-package), 1 ppcor-package, 1 spcor, 4, 5, 5, 8 spcor.test, 4–6, 7 u9no meu caso qero trabalhar com matrizes de celação obrigada Ana Rocha