I've studied R a little bit, although I haven't used it in some time
(except via RCommander). I'm working on my dissertation project and have spectrometer data that I need to evaluate. I need to find a way to simplify the output from multi-way ANOVA so I can reduce the areas of the spectrum to only those where there are significant differences between sites. (A preliminary study on a too-small sample size indicates that certain areas of the spectrum can distinguish between sites. This project is the next step.) The dataset is comprised of analyses done on samples from five separate locations, with 50 samples taken from each site. The output of the spectrometer per sample is values for 2048 individual wavelengths, in a spreadsheet with the wavelength as the first column. Since I'm doing the analysis wavelength-by-wavelength, I've transposed the data and broke the data for the project down into smaller spreadsheets (so that R can perform ANOVA on each wavelength). The problem is, I can do ANOVA now on each wavelength, but I don't need a full output table for each... I just need to know if there is significant variation between any of the sites at that wavelength, based on 95% confidence level (or better). If I could get some sort of simple chart (or a single line in a spreadsheet), that would help to narrow down the areas of the spectrum that I need to focus on to evaluate the results of the tests. I've been reading information about ANOVA, but have found very little that is clear about formatting the output - and I don't need to rehash all of the math. I just need to find out how to hack down the output to just the part I need (if possible). Once that's done, I can decide what wavelengths are valuable for future tests and simplify the process. Thanks for any help given! Bob ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see 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. |
In general, analysis functions in R return objects. When returned alone on an interactive console the default print method for that object gets printed. However, you can put it into a variable with the <- assignment operator, and use the str function to see what values are inside the object, and use the summary object to obtain another object with certain computed values depending on the analysis object.
It might make sense to use a model analysis for this data... I don't know how you are handling variation in gross irradiance between measurements. Anyway, this can get involved and you haven't provided sample data or code so this starts to get off topic (which is R, not statistics) pretty quick. On July 25, 2018 10:11:55 AM PDT, "Robert D. Bowers M.A." <[hidden email]> wrote: >I've studied R a little bit, although I haven't used it in some time >(except via RCommander). I'm working on my dissertation project and >have spectrometer data that I need to evaluate. I need to find a way >to >simplify the output from multi-way ANOVA so I can reduce the areas of >the spectrum to only those where there are significant differences >between sites. (A preliminary study on a too-small sample size >indicates that certain areas of the spectrum can distinguish between >sites. This project is the next step.) > >The dataset is comprised of analyses done on samples from five separate > >locations, with 50 samples taken from each site. The output of the >spectrometer per sample is values for 2048 individual wavelengths, in a > >spreadsheet with the wavelength as the first column. Since I'm doing >the analysis wavelength-by-wavelength, I've transposed the data and >broke the data for the project down into smaller spreadsheets (so that >R >can perform ANOVA on each wavelength). > >The problem is, I can do ANOVA now on each wavelength, but I don't need > >a full output table for each... I just need to know if there is >significant variation between any of the sites at that wavelength, >based >on 95% confidence level (or better). If I could get some sort of >simple >chart (or a single line in a spreadsheet), that would help to narrow >down the areas of the spectrum that I need to focus on to evaluate the >results of the tests. > >I've been reading information about ANOVA, but have found very little >that is clear about formatting the output - and I don't need to rehash >all of the math. I just need to find out how to hack down the output >to >just the part I need (if possible). Once that's done, I can decide >what >wavelengths are valuable for future tests and simplify the process. > >Thanks for any help given! > >Bob > >______________________________________________ >[hidden email] mailing list -- To UNSUBSCRIBE and more, see >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. -- Sent from my phone. Please excuse my brevity. ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see 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. |
In reply to this post by Robert D. Bowers M.A.
Dear Robert,
Although you don't say so, it sounds as if you may be using the Anova() function in the car package, which is what the R Commander uses for ANOVA. If so, in most cases, Anova() returns an object of class c("anova", "data.frame"), which can be manipulated as a data frame. To see this, try something like str(Anova(your.model)) You should be able to extract, manipulate, and graph whatever components of the object interest you. I hope this helps, John ----------------------------------------------------------------- John Fox Professor Emeritus McMaster University Hamilton, Ontario, Canada Web: https://socialsciences.mcmaster.ca/jfox/ > -----Original Message----- > From: R-help [mailto:[hidden email]] On Behalf Of Robert D. > Bowers M.A. > Sent: Wednesday, July 25, 2018 1:12 PM > To: [hidden email] > Subject: [R] Formatting multi-way ANOVA output for spectra analysis > > I've studied R a little bit, although I haven't used it in some time (except via > RCommander). I'm working on my dissertation project and have > spectrometer data that I need to evaluate. I need to find a way to simplify the > output from multi-way ANOVA so I can reduce the areas of the spectrum to > only those where there are significant differences between sites. (A > preliminary study on a too-small sample size indicates that certain areas of > the spectrum can distinguish between sites. This project is the next step.) > > The dataset is comprised of analyses done on samples from five separate > locations, with 50 samples taken from each site. The output of the > spectrometer per sample is values for 2048 individual wavelengths, in a > spreadsheet with the wavelength as the first column. Since I'm doing the > analysis wavelength-by-wavelength, I've transposed the data and broke the > data for the project down into smaller spreadsheets (so that R can perform > ANOVA on each wavelength). > > The problem is, I can do ANOVA now on each wavelength, but I don't need a > full output table for each... I just need to know if there is significant variation > between any of the sites at that wavelength, based on 95% confidence level > (or better). If I could get some sort of simple chart (or a single line in a > spreadsheet), that would help to narrow down the areas of the spectrum that I > need to focus on to evaluate the results of the tests. > > I've been reading information about ANOVA, but have found very little that is > clear about formatting the output - and I don't need to rehash all of the > math. I just need to find out how to hack down the output to just the part I > need (if possible). Once that's done, I can decide what wavelengths are > valuable for future tests and simplify the process. > > Thanks for any help given! > > Bob > > ______________________________________________ > [hidden email] mailing list -- To UNSUBSCRIBE and more, see > 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. [hidden email] mailing list -- To UNSUBSCRIBE and more, see 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. |
Free forum by Nabble | Edit this page |