Home Coursework Help WhatsApp Us About us

Qn1. What do generalized linear models (GLMs) generalize?

The linear model, which encompasses the ANOVA
The linear model, which is a subset of the ANOVA
The general model, which supersedes the ANOVA
The general model, which is a subset of the ANOVA
None of the above

Qn2. Generalized linear models (GLMs) handled only between-subjects factors.

True
False

Qn3. Poisson regression is an example of a generalized linear model (GLM) with a Poisson distribution for the response and a log link function.

True
False

Qn4. Which of the following is not an example of a generalized linear model (GLM)?

Poisson regression
Binomial regression
Gamm regression
Ordinal logistic regression
All are GLMs

Qn5. The link function in a generalized linear model (GLM) most precisely relates what to what?

Factors to each of the responses
Factors to the  mean of the response
Factors to the distribution of the response
Factors to the error in the response
None of the above

Qn6. Nominal logistic regression is also known as multinomial regression

True
False

Qn7. Multinomial regression with the cumulative logit link function is also know as:

Nominal logistic regression
Ordinal logistic regression
Poisson regression
Binomial regression
   None of the above

Qn8. Poisson regression is often appropriate for analyzing which kind of data?

Error rates
Success percentages
Logarithmic distributions
Rare event counts
None of the above

Qn9. Exponential regression is a special case of which generalized linear model (GLM)

Poisson regression
Binomial regression
Ordinal logistic regression
Gamm regression
None of the above

Qn10. The generalized linear model (GLM) can be used in place of the linear mode (LM) for between-subjects designs.

True
False









Doing Factorial ANOVAs

Qn20. Download the file socialvalue.csv from the course materials. This file describes a study of people viewing a positive or negative film clip before going onto social media and then judging the value of the first 100 posts they see there. The number of valued posts was recorded. Examine the data and indicate what kind of experiment design this was.

- A 2x2 between-subjects design with factors for clip (positive, negative) and social (Facebook, Twitter).
-A 2x2 within-subjects design with factors for clip(positive, negative) and social (facebook, Twitter).
-A 2x2 mixed factorial design with a between-subjects factor for clip (positive, negative) and a within-subjects factor for social (Facebook, Twitter).
- None of the above

Qn21. How many subjects took part in this experiment?

Qn22. To the nearest hundredth (two digits), on average how many posts out of 100 were valued for the most combination of clip and social?

Qn23. Create an interaction plot with social on the X-axis and clip as the traces. Do the lines cross?

Yes
No

Qn24. Create an interaction plot with clip on the X-axis and social as the traces. Do the lines cross?

Yes
No

Qn25. Conduct a factorial ANOVA to test for any order effects that the presentation order of the clip factor and/or the social factor may have had. To the nearest ten-thousandth (four digits), what is the p-value for the ClipOrder main effect? Hint: Use the ez library and its ezANOVA function. Pass both ClipOrder and Socialorder as the within parameter using a vector created with the “c” function.

Qn26. Conduct a factorial ANOVA on valued by clip and social. To the nearest hundredth (two digits), what is the largest F statistic produced by such a test? Hint: use the ez library and its function. Pass both clip and social as the within parameter using a vector created with the “c” function.

Qn27. Conduct two planned pairwise comparison using paired-samples t-tests. The first question is whether on Facebook, the number of valued posts was different after people saw a positive fil clip versus a negative film clip. The second question is whether on Twitter, the number of valued posts was different after people saw a positive film clip versus a negative film clip. Assuming equal variances and using Holm’s sequential Bonferroni procedure to correct for multiple comparisons, what to within a ten-thousandth (four digits) is the lowest p-value from these tests? Hint: use the reshape2 library and its dcast function to make a wide-format table with columns for subject and the combination of social* clip, and then do a paired-samples t-test between columns with the same social level.

Qn28. Which of the following conclusions are supported by the planned pairwise comparisons just conducted? (Mark all that apply)

On Facebook, people valued significantly more posts after seeing a positive film clip than a negative film clip
On Facebook, people valued significantly more posts after seeing a negative film clip than a positive film clip.
On Twitter, people valued significantly more posts after seeing a positive film clip than a negative film clip,
On Twitter, people valued significantly more posts after seeing a negative film clip than a positive film clip.

Qn29. Continue using the file socialvalue.csv from the course materials. Conduct a nonparametric Aligned Rank Transform procedure on Valued by Clip and Social. To the nearest hundredth (two digits). What is the largest F statistic produced by this procedure?

Hint: use the ARTOOL library and its art function with the formula.
Valued ~ Clip * Social + (1|Subject)

The above formular expression indicates that subject is to be treated as a random effect.

Qn30. Pairwise comparisons among levels of clip and among levels of social could be conducted using the following code, but these are unnecessary after our main effects tests because each of these factors only has two levels.

library(lsmeans)
lsmeans(artlm(m,”clip”), pairwise ~ Clip)
lsmenas(artlm(m, “social”), pairwise ~ social)

True
False

Qn31. Conduct interaction contrasts (i.e difference-of-differences) to discover whether the difference in the number of valued posts after viewing a negative clip vs. a positive clip on Facebook was itself different that that same difference on Twitter. To the nearest hundredth (two digits), what is the chi-square statistic from such a test? Hint: use the phia library and its testInteractions function with the artlm function.

Qn32. The difference in the number of valued posts after people saw negative film clip vs positive film clips in the Facebook condition is significantly different from that difference in the Twitter condition. An interaction plot makes it clear that the difference in valued posts was much greater in the Facebook condition than in the Twitter condition, with positive film clips resulting in more valued posts.

Doing Factorial ANOVAs

Qn20. Download the file socialvalue.csv from the course materials. This file describes a study of people viewing a positive or negative film clip before going onto social media and then judging the value of the first 100 posts they see there. The number of valued posts was recorded. Examine the data and indicate what kind of experiment design this was.

- A 2x2 between-subjects design with factors for clip (positive, negative) and social (Facebook, Twitter).
-A 2x2 within-subjects design with factors for clip(positive, negative) and social (facebook, Twitter).
-A 2x2 mixed factorial design with a between-subjects factor for clip (positive, negative) and a within-subjects factor for social (Facebook, Twitter).
- None of the above

Qn21. How many subjects took part in this experiment?
Qn22. To the nearest hundredth (two digits), on average how many posts out of 100 were valued for the most combination of clip and social?

Qn23. Create an interaction plot with social on the X-axis and clip as the traces. Do the lines cross?

Yes
No

Qn24. Create an interaction plot with clip on the X-axis and social as the traces. Do the lines cross?

Yes
No

Qn25. Conduct a factorial ANOVA to test for any order effects that the presentation order of the clip factor and/or the social factor may have had. To the nearest ten-thousandth (four digits), what is the p-value for the ClipOrder main effect? Hint: Use the ez library and its ezANOVA function. Pass both ClipOrder and Socialorder as the within parameter using a vector created with the “c” function.

Qn26. Conduct a factorial ANOVA on valued by clip and social. To the nearest hundredth (two digits), what is the largest F statistic produced by such a test? Hint: use the ez library and its function. Pass both clip and social as the within parameter using a vector created with the “c” function.

Qn27. Conduct two planned pairwise comparison using paired-samples t-tests. The first question is whether on Facebook, the number of valued posts was different after people saw a positive fil clip versus a negative film clip. The second question is whether on Twitter, the number of valued posts was different after people saw a positive film clip versus a negative film clip. Assuming equal variances and using Holm’s sequential Bonferroni procedure to correct for multiple comparisons, what to within a ten-thousandth (four digits) is the lowest p-value from these tests? Hint: use the reshape2 library and its dcast function to make a wide-format table with columns for subject and the combination of social* clip, and then do a paired-samples t-test between columns with the same social level.

Qn28. Which of the following conclusions are supported by the planned pairwise comparisons just conducted? (Mark all that apply)

On Facebook, people valued significantly more posts after seeing a positive film clip than a negative film clip
On Facebook, people valued significantly more posts after seeing a negative film clip than a positive film clip.
On Twitter, people valued significantly more posts after seeing a positive film clip than a negative film clip,
On Twitter, people valued significantly more posts after seeing a negative film clip than a positive film clip.

Qn29. Continue using the file socialvalue.csv from the course materials. Conduct a nonparametric Aligned Rank Transform procedure on Valued by Clip and Social. To the nearest hundredth (two digits). What is the largest F statistic produced by this procedure?

Hint: use the ARTOOL library and its art function with the formula.
Valued ~ Clip * Social + (1|Subject)

The above formular expression indicates that subject is to be treated as a random effect.

Qn30. Pairwise comparisons among levels of clip and among levels of social could be conducted using the following code, but these are unnecessary after our main effects tests because each of these factors only has two levels.

*library(lsmeans)
lsmeans(artlm(m,”clip”), pairwise ~ Clip)
lsmenas(artlm(m, “social”), pairwise ~ social)*

True
False

Qn31. Conduct interaction contrasts (i.e difference-of-differences) to discover whether the difference in the number of valued posts after viewing a negative clip vs. a positive clip on Facebook was itself different that that same difference on Twitter. To the nearest hundredth (two digits), what is the chi-square statistic from such a test? Hint: use the phia library and its testInteractions function with the artlm function.

Qn32. The difference in the number of valued posts after people saw negative film clip vs positive film clips in the Facebook condition is significantly different from that difference in the Twitter condition. An interaction plot makes it clear that the difference in valued posts was much greater in the Facebook condition than in the Twitter condition, with positive film clips resulting in more valued posts.

Qn1. Download the file avatars.csv from the course materials. This file describes a study in which men and women were shown a virtual human avatar that was itself either male of female, and asked to craft a persona and write a day-in-th0life scenario for that avatar. The number of positive sentiments in either description were summed by a blind panel of judges. Examine the data and indicate what kind of experiment design this was.

  • A 2 x 2 between-subjects design with factors for sex (M,F) and Avatar (M,F)
  • A 2 x2 within-subjects design with factors for ex (M,F) and Avatar (M,F).
  • A 2 x 2 mixed factorial design with a between-subjects factor for sex (M,F) and a within-subjects factor for Avatar (M,F).
  • None of the above

Qn2. How many subjects took part in this experiment?

Qn3. To the nearest hundredth (two digits), on average how many positive sentiments were expressed for the most positive combination of sex and avatar?
Qn4. Create an interaction plot with Sex on the X-axis and Avatar as the traces. Do the lines cross?

Yes
No

Qn5. Create an interaction plot with Avatar on the X-axis and Sex as the traces. Do the line cross?

Yes,
No

Qn6. Conduct a factorial ANOVA on positives by sex avatar. To the nearest hundredth (two digits), what is the largest F statistic from such a test? Hint: Use the ez library and its exANOVA function. Pass both Sex and Avatar as the between parameter using a vector created with the “c” function.

Qn7. Which effects are statistically significant in the factorial ANOVA of positives by sex and avatar? (Mark all that apply)

Main effect of sex
Main effect of Avatar
Sex * Avatar interaction
None of the above

Planned Pairwise Comparisons

Qn8. Conduct two planned pairwise comparisons using independent samples t-tests. The first question is whether women produced different numbers of positive sentiments for male avatars versus female avatars. The second question is whether men produced different numbers of positive sentiments for male avatars versus female avatars. Assuming equal variances and using Holm’s sequential Bonferroni procedure to correct for multiple comparisons, what to within a ten-thousandth (four digits) is the lowest corrected p-value from these tests? Hint: You will need conjunctions with ampersands (&) to select the necessary rows for your t.test functions.

Qn9. Which of the following conclusions are supported by the planned pairwise comparisons just conducted? (Mark all that apply.)

Women made significantly more positive sentiments about male avatars that they did female avatars
Women made significantly more positive sentiments about female avatars than they did male avatars
Men made significantly more positive sentiments about male avatars than they did female avatars
Men made significantly more positive sentiments about female avatars than they did male avatars
None of the above

Qn10. Download the file notes.csv from the course materials. This file describes a study in which iphone and Android smartphone owners used their phone’s built-in note-taking app and then switched to an add-on third-party app, or vice-versa. The number of words they wrote in their notes apps over the course of the week was recorded. Examine the data and indicate what kind of experiment design this was

A 2 x 2 between-subjects design with factors for phone (iPhone, Android) and Notes (Built-in, Add-on).
A 2 x 2 **within-subjects design with factors** for Phone(iPhone, Android) and Notes (Built-in, Add-on)
A 2 x2 mixed factorial design with a between-subjects factor for Phone (iPhone, Andoid) and a within-subjects factor for Notes (Built-in, Add-on).
None of the above

Qn11. How many subjects took part in this experiment?

Qn12. To the nearest hundredth (two digits) on average how many words were record with the most heavily used combination of phone and notes?

Qn13. Create an interaction plot with Phone on the X-axis and Notes as the traces, Do the lines cross?

Yes
No

Qn14. Create an interaction plot with notes on the X-axis and Phones as the traces. Do the lines cross?

Yes
No

Qn15. Conduct a factorial ANOVA to test for any order effect that the presentation order of the Notes factor may have had. To the nearest ten-thousandth (four digits), what is the p-value for the order factor from such a test? Hint: use the ez library and its ezANOVA function, passing one between parameter and Order as the withing parameter.

Qn16. In our test of possible order effects, Mauchly’s test of sphericity is irrelevant because our within-subjects factor only has two levels, which cannot present a sphericity violation.

True
False

Qn17. Conduct a factorial ANOVA on words by phone and Notes. To the nearest hundredth (two digits), what is the largest F statistic produced by such a test? Hint: use the ez library and its ezANOVA function, passing one between parameter and on within parameter.

Qn18. Conduct two planned pairwise comparisons using paired-samples t-tests. The first question is whether iPhone users entered different numbers of words using built-in notes apps versus the add-on notes app. The second question is whether Android users entered different numbers of words using the built-in notes app versus the add-on notes app. Assuming equal variances and using Holm’s sequential Bonferroni procedure to correct for multiple comparisons, what to within a ten-thousandth (four digits) is the lowest p-value from these tests? Hint: use the reshape2 library and its dcast function to make a wide-format table with columns for subject, phone, Add-on, and Built-in, and then within each phone type, do a paired-samples t-test between the Add-on and built-in columns.

Qn19. Which of the following conclusions are supported by the planned pairwise comparisons just conducted? (Mark all that apply)

Android users entered significantly more words using the built-in notes app than theadd-on notes app.
Android users entered significantly more words using the add-on notes app than the built-in notes app.
iPhone users entered significantly more words using the add-on notes app than the built-in notes app.
None of the above

Doing Tests of Assumptions

Qn1. Download the file designtime.csv from the course materials. This file describes a study in which designers used Adobe Illustrator or Adobe InDesign to create a benchmark set of classic children’s illustrations. The amount of time they took was recorded, in minutes. How many subjects took part in this study?

Qn2. Create a boxplot of the task time data for each tool. At a glance, which of the following conclusions seems to be most likely?

-Illustrator and InDesign have similar median task times, with similar variances.
- Illustrator has a higher median task time than InDesign, with similar variances.
- Illustrator has a higher median task time than InDesign, with dissimilar variances.
- InDesign has a higher median task time than Illustrator, with similar variances.
- InDesign has a higher median task time than illustrator, with dissimilar variances.

Qn3. Conduct a Shapiro-Wilk test on the time response for each of the tools. To the nearest ten-thousandth (four digits), what is the p-value of this test for illustrator?

Qn4. Conduct a Shapiro-Wilk normality test on the residuals of Time by Tool. To the nearest ten-thousandth (four digits), What is the W value displayed? Hint: use aov to fit a model and then run Shapiro.test on the model residuals.
Qn5. In light of your normality tests, would you conclude the data does or does not violate normality?

-The data does violate normality
-The data does not violate normality

Qn6. Conduct a Brown-Forsythe test of homoscedasticity. To the nearest hundredth (two digits), what is the F statistic for the test? Hint: use the car library and its leveneTest function with center=median.
Qn7. Fit a lognormal distribution to the Time response of each of the design tools. Conduct a Kolmogorov-Smirnov goodness-of-fit test. To the nearest ten-thousandth (four digits), What is the exact p-value of the test for the Illustrator data? Hint: use the MASS library and its fitdistr function with “lognormal” to acquire a fit estimate. The use ks.test with “plnorm” passing the acquired fit values as meanlog and sdlog. Request and exact fit.
Qn8. Create a new column that is the log-transformed Time response. Compute the mean of this log-transformed response for each drawing tool. To the nearest hundredth (to digits), what is the mean of the log-transformed response for InDesign?
Qn9. Conduct an independent-samples t-test on the log-transformed Time response. Use the Welch version for unequal variances. To the nearest hundredth (two digits), what is the t statistic for the test?
Qn10. As an alternative to log-transforming the Time response, leave Time as it is and conduct an exact nonparametric Mann-Whitney U test on it. To the nearest ten-thousandth (four digits), what is the z statistic that results from this test? Hint: use the coin library and its wilcox test function with distribution=”exact”