[R] dr ()
Hi all-- A quick question about the dr () function. I am using this function to reduce the dimensions of a data set I have that involves 14 predictor variables and one predictant or response. The goal is to discover which variables play the most important role in determining the response and, thus, to reduce the variables. I would like to use the sliced inverse regression method (SIR) within this function but each time I specify 8 slices, it only performs 5 slices. Any suggestions/thoughts? THanks, Jessica __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] searching through a matrix
I am trying to search through a matrix I have (x) to see if there are any missing values. This is what I have been using: for (i in 1:3455) for (j in 1:24) if (is.na(x[i,j])) break; i j When I run the program, it either freezes or stops and returns the last entry in the matrix (x[3455,24]). I need to figure out what values in my data matrix are missing because I am using prcomp and it keeps giving me an error starting that there are missing or infinite values in x. My data matrix does have some values that are equal to zero but zero doesn't mean that the data is missing. it just indicates that that value is equivalent to zero. Any suggestions for how to fix this problem? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] eigen vector question
Sorry to bother everyone, but I've looked in all of the help files and manuals I have and I can't find the answer to this question. I'm doing principle component analysis by calculating the eigen vectors of a correlation matrix that I have that is composed of 21 parameters. I have the eigen vectors and their values that R produced for me but I'm not sure how to tell which eigen vector/value corresponds to which parameter because when R produces eigen vectors it does so in decreasing order of significance, meaning that the eigen vector that explains the most of the variance is listed first, followed by the next eigen vector, etc etc. Any help would be appreciated. Feel free to write back if you need more information on my problem. Thanks! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Creating a correlation Matrix
I've tried using cor() by the following sequence: C <- cor(x, y = NULL, use = "all.obs", method = c("pearson")) where x is my matrix of 21 columns and 3471 rows. and I get this error: Error in cor(x, y = NULL, use = "all.obs", method = c("pearson")) : missing observations in cov/cor any suggestions? At 08:32 AM 2/7/2005 -0800, Spencer Graves wrote: Have you considered "cor"? The command 'help.search("correlation")' suggests among other functions "var(stats)", the documentation for which also includes "cor". If this is not adequate, "PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ". It may help you get more useful replies in the future. spencer graves Jessica Higgs wrote: Hi all: I have a question on how to go about creating a correlation matrix. I have a huge amount of data21 variables for 3471 times. I want to see how each of the variables correlate to each other. Any help would be appreciated, including which package and which functions I should use to do this. Thanks, Jessica Higgs Masters Student Department of Meteorology Penn State University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Creating a correlation Matrix
Hi all: I have a question on how to go about creating a correlation matrix. I have a huge amount of data21 variables for 3471 times. I want to see how each of the variables correlate to each other. Any help would be appreciated, including which package and which functions I should use to do this. Thanks, Jessica Higgs Masters Student Department of Meteorology Penn State University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] using RODBC
I am trying to bring data into R from an excel spreadsheet in order to perform several statistical tests on it. I was trying to use odbcConnectExcel in the RODBC package. Once I am connected to the excel file, how do I select rows and columns from the file in order to analysis them in R. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html