7
answers
1
watching
166
views

RStudio (data is below):

Setup: A psycholinguist was interested in how three different types of sentences were processed in real time. She created stimuli, and presented these sentences to participants in a speeded grammaticality judgement task. In this type of task, participants give an acceptability judgement for the sentence on an ordinal scale, and the time the participant takes to give the judgement is measured. The file la1.txt is partial results from this experiment: Participant is the participant number, Group is the type of sentence tested with that participant (1, 2, or 3), and RT is the mean reaction time for that participant. (This data doesn’t contain any information about the rating itself.)

Questions: Answer each of the following questions using the R functions and techniques we’ve learned in class. Use la1 as the variable where you initially store the data. Only a couple questions require you to store calculations in specific variables, but make sure you use the correct variable names. Use comments and whitespace when appropriate to make your code more readable to others.

1. Compute mean, median, and standard deviation for each of the three groups. Store your calculations as group1.mean, group1.median, group1.sd, group2.mean, and so on.

2. Construct a boxplot to summarize reaction times for each level of the independent variable. Include the plot as your answer to this question. See the notes for boxplot() on Quercus for information on how to change group names in a boxplot.

3. Based on the boxplot, does it look like Groups 1 and 2 might have central tendencies that are statistically different from each other? Explain your reasoning.

4. Compute 95% confidence intervals of the mean reaction time for Groups 1 and

2. Do the confidence intervals support your hunch, or do they provide conflicting information? Explain your reasoning.

5. Conduct a relevant statistical test to compare the central tendencies of Groups 1 and 2 and store the result of the test in the variable test1. 1 Report the results, and also report the results of any statistical tests you ran to check assumptions.

6. Does the boxplot mischaracterize the data for Group 3 in any way? Use other methods we’ve learned about in class to examine Group 3. Briefly explain what you did, why you did it, and what you found out. 

For instance, if you had computed a one-sample t-test, you might do test1 <- t.test(a, mu=400).

7. Group 3 looks like it is bimodally distributed (e.g. it’s sampled from a distribution with two peaks). Use subset() to subset Group 3 into two subgroups: one group should be all the values of the dependent variable that are strictly less than the median reaction time, and the other group should be all the values greater than or equal to the median reaction time.

8. Compute mean, median, and standard deviation for these subgroups. Store the computations as group3a.mean, group3a.median, group3a.sd, group3b.mean, and so on.

9. Draw a boxplot for the two subgroups. See the R function list on Quercus for pointers on how to use the names parameter to make the group names more informative. Include the plot as your answer to this question.

10. From the plot, do you expect the Group 3 subgroups to have measures of central tendency that are significantly different from each other? Explain your reasoning.

11. From the plot, do you expect that the subgroups have similar dispersions? Explain your reasoning.

12. Conduct a relevant statistical test to compare the central tendencies of the subgroups you created from Group 3. Store the results in test2. Report the results, and also report the results of any additional statistical tests you ran to check assumptions.

Encourage you to use comments and whitespace (blank lines, spaces, indentation) to make your code more readable.

you might want/need to use some functions with vectors instead of formulas. You can use boxplot() with two vectors instead of a formula by using boxplot(a,b), where a and b are vectors. This works for t.test() and wilcox.test() as well.

 

 

 

DATA TXT:

 

RT Participant Group
466.76 1 1
489.6 2 1
487.72 3 1
402.51 4 1
504.46 5 1
421.09 6 1
527.49 7 1
420.32 8 1
360.27 9 1
390.98 10 1
527.74 11 1
456.07 12 1
523.72 13 1
519.42 14 1
487.03 15 1
431.2 16 1
644.31 17 1
564.61 18 1
619.6 19 1
405.39 20 1
428.09 21 1
520.42 22 1
357.35 23 1
424.67 24 1
419.1 25 1
488.97 26 1
470.67 27 1
533.38 28 1
527.72 29 1
552.7 30 1
315.92 31 2
456.53 32 2
442.27 33 2
342.5 34 2
493.79 35 2
426.27 36 2
377.36 37 2
515.34 38 2
492.56 39 2
476.48 40 2
486.05 41 2
479.56 42 2
425.08 43 2
488.37 44 2
315.88 45 2
417.15 46 2
434.63 47 2
371.77 48 2
375.57 49 2
375.58 50 2
504.51 51 2
350.41 52 2
582.64 53 2
452.7 54 2
458.69 55 2
314.68 56 2
397.13 57 2
410.09 58 2
394.01 59 2
572.44 60 2
529.42 61 3
495.63 62 3
323.5 63 3
292.77 64 3
516.84 65 3
317.3 66 3
534.84 67 3
350.02 68 3
523.41 69 3
744.39 70 3
307.04 71 3
657.69 72 3
619.51 73 3
588.96 74 3
315.94 75 3
497.8 76 3
443.79 77 3
347.26 78 3
342.11 79 3
321.96 80 3
329.19 81 3
526.74 82 3
594.58 83 3
279.41 84 3
285.41 85 3
520.06 86 3
620.46 87 3
647.73 88 3
292.59 89 3
346.79 90 3

For unlimited access to Homework Help, a Homework+ subscription is required.

Avatar image
Liked by astray and 1 others

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Avatar image
Liked by astray and 1 others
Already have an account? Log in
Avatar image
Liked by astray and 3 others
Already have an account? Log in
Avatar image
Liked by astray and 1 others
Already have an account? Log in
Avatar image
Liked by astray and 2 others
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in

Related questions

Related Documents

Weekly leaderboard

Start filling in the gaps now
Log in