2
$\begingroup$

I'm confused as to which test to run here.

I want to test whether the amplitude (measured in millivolts) differs for the two types of words (concrete vs. abstract). Keeping in mind that all participants were exposed to both concrete and abstract words.

I attached a photo here for a brief overview of the data. I'm confused because one variable is ratio and the other is nominal.

I feel like I have exhausted all options and I am really just at a loss. (Also, I'm a newbie to stats and coding via R so please don't come at me haha)

$\endgroup$
2
  • 2
    $\begingroup$ Please include your data as cut-and-pasted text, rather than as a screenshot - it's much more accessible and convenient that way. You will probably want to fit a linear mixed model. $\endgroup$
    – Ben Bolker
    Commented Apr 20, 2021 at 14:56
  • $\begingroup$ What is the purpose of the "time of day" variable? Just for convenience or do you want to control for it? $\endgroup$ Commented Apr 20, 2021 at 15:23

2 Answers 2

1
$\begingroup$

You can use the paired T test. Here is an example:

set.seed(1000)
df <- data.frame(
  participant = c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10),
  word_type = rep(c("concrete","abstract"),5),
  amplitude = 50:69+rnorm(20,sd=.5),
  other_col=NA)
df

Output

   participant word_type amplitude other_col
1            1  concrete  49.77711        NA
2            1  abstract  50.39707        NA
3            2  concrete  52.02056        NA
4            2  abstract  53.31969        NA
5            3  concrete  53.60672        NA
6            3  abstract  54.80726        NA
7            4  concrete  55.76207        NA
8            4  abstract  57.35988        NA
9            5  concrete  57.99075        NA
10           5  abstract  58.31344        NA
11           6  concrete  59.50879        NA
12           6  abstract  60.72276        NA
13           7  concrete  62.06069        NA
14           7  abstract  62.93956        NA
15           8  concrete  63.33198        NA
16           8  abstract  65.08503        NA
17           9  concrete  66.07754        NA
18           9  abstract  67.01247        NA
19          10  concrete  66.97671        NA
20          10  abstract  69.10658        NA

Now, you have to fit your data:

library(tidyr)
df <- df %>%
  select(participant,word_type,amplitude) %>%
  group_by(participant) %>% 
  pivot_wider(names_from = word_type, values_from = amplitude)
df

Output:

# A tibble: 10 x 3
# Groups:   participant [10]
   participant concrete abstract
         <dbl>    <dbl>    <dbl>
 1           1     49.8     50.4
 2           2     52.0     53.3
 3           3     53.6     54.8
 4           4     55.8     57.4
 5           5     58.0     58.3
 6           6     59.5     60.7
 7           7     62.1     62.9
 8           8     63.3     65.1
 9           9     66.1     67.0
10          10     67.0     69.1

Finally, you can make the paired t-test:

t.test(df$concrete,df$abstract,paired = TRUE)

Output:

    Paired t-test

data:  df$concrete and df$abstract
t = -7.007, df = 9, p-value = 6.276e-05
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -1.5809068 -0.8092564
sample estimates:
mean of the differences 
              -1.195082 

The p-value is less than 0.05 then reject the null hypothesis, so we can say that there is evidence to assert exists amplitude difference between words "concrete" and "abstract".

$\endgroup$
0
$\begingroup$

At first glance, it seems like a simple paired T-test is appropriate. If I understand correctly, the question you're asking is whether the mean of the samples from concrete words differs from the mean of the samples from abstract words. The null hypothesis is that there is no difference in the means.

You can use a paired T-test because each sample in abstract group is "paired" with a sample in the concrete group (because it comes from the same test subject).

The test will return a p-value indicating the probability of observing the data under the null hypothesis - i.e. how likely your data is if the underlying means were actually the same. If p < 0.05, then you can reject the null hypothesis.

$\endgroup$
2
  • $\begingroup$ I would think you would also want to include other covariates, especially "know_word", when testing for a difference, so a paired t-test would not be adequate $\endgroup$ Commented Apr 20, 2021 at 16:21
  • $\begingroup$ Good point! What are your thoughts on using a linear model where the outcome (amplitude) is a linear function of an indicator variable for concrete (1 for concrete, 0 for abstract) and of the covariates? The coefficient for 'concrete' would tell you the effect of a change from abstract to concrete on your outcome. To test the statistical significance, you could just do a Wald test to assess the signifiance of the coefficient of 'concrete'. Thoughts? $\endgroup$ Commented Apr 20, 2021 at 21:00

Your Answer

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