0
$\begingroup$

Background on what I am doing...

I have 31 years of Landsat satellite data, and have extracted spectral reluctance and calculated 13 unique spectral based vegetation metrics for a series of 16 field plots have, which were then split into two groups, deciduous dominant and spruce dominant. My goal is to identify the change in spectral seperability between the two groups over time, following a fire in 1994.

To identify seperability, I have used both ANOVA anova(lm()) and t.test() in R, with the goal of identifying statistically significant differences in the mean spectral reflectance of the two groups.

For one iteration of my analysis, I end up with 31 years years of t tests for 113 metrics, or 403 t tests. I have run several iterations, using different classification criteria for vegetation type dominance. So a TON of t tests. I have all of the T statistics organized in a tidy .csv.

My t test is set up as follows:

t.test(data1_1984, data2_1984, paired=FALSE, var.equal=FALSE)

where data1_1984 is a list of spectral reflectance values for the deciduous group, and data2 is spectral reflectance for the spruce group.

I fundamentally understand that I should look at each resulting t statistic, to determine whether t statistic is > critical t value, as determined by the df of the sample. Given that the same set of samples is used for each test, I assumed that there would be one common df, with one common critical value used to interpret all tests. But when I look at the df of the resulting tests, they are highly variable, non-integer numbers.

An example of my t_test t statistic results :

enter image description here

as well as an example of the df for each respective record in the t_test table:

enter image description here

So my question is:

1) Is there some optional argument that I am not setting correctly which is causing the df to be calculated for each individual test

or

2) If the variability in df is to be expected, a) could someone explain how these values are calculated, and b) can anyone suggest an automated way to analyze some 1200 t test results?? My original method was to use conditional formatting in Excel, to simply highlight any cells that were >= the critical value...

$\endgroup$
1

1 Answer 1

3
$\begingroup$

The reason you get different degrees of freedom is that you are asking for the Welch approximation which is suitable for unequal variances. You are doing this by setting var.equal = FALSE. So R is doing what you asked it to do.

Doing so many tests and then just looking at which reach some arbitrary level of statistical significance is not likely to be very helpful. Is there no way in which you could build a larger model which includes more of the data? For instance if you have 31 years at least have a model which has both year and dominance in it. Without knowing more about your 113 metrics it is rather hard to give more advice.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.