Questions tagged [t.test]

2 questions
0
votes
0 answers

Creating a loop to subset data groups, run a t.test, and write results to a new df of ALL t.tests by Region and timestep

I have a large dataset and I am looking to run t.tests on sub-groupings of my data. I have had success with t.test on a broad scale: t.test(Measurement~Group, data=df, paired="FALSE") But I need to break my data down first by region, and then by…
0
votes
1 answer

Prevent error occuring with t.test because of small number of cases

I need to generate reports for different groups and compute mean values for different subgroups. However, the number of cases it very small, so that t.test() throws an error. Here's an example: library(tidyverse) n <- 10 test_df <- data.frame(var =…
D. Studer
  • 1,711
  • 1
  • 16
  • 35