## Mixed Effects R statistic Quiz

Qn17. Download the file vocab.csv from the course materials. This file describes a study in which 50 recent posts by men and women on social media were analyzed for how many unique words they used, i.e the size of their operational vocabulary on social media. The research question is how men’s and women’s vocabulary may differ on each of three social media websites. How many subjects took part in this study?

Qn18. Create an interaction plot with social on the X-axis and Sex as the traces. How many times, if any, do these lines cross?

Qn19. Perform three Kolmogorov-Smirnov goodness-of-fit tests on Vocab for each level of social using exponential distributions. To the nearest ten-thousandth (four digits), what is the lowest p-value of these three tests? Hint: use the MASS library and its fitdistr function on Vocab separately for each level of social. Use “exponential” as the distribution type. Save the estimate as a fit. The se ks.test with “pexp” passing fit [1] as the rate and requesting an exact test. Ignore any warnings produced about ties.

**

## Test of order effects using Generalized Linear Mixed Model

**
Qn20. Use a generalized linear mixed model (GLMM) to conduct a test of order effects on Vocab to ensure counterbalancing worked. To the nearest ten-thousandth (four digits), what is the p-value for the order main effect? Hint: use the lme4 library and its glmer function with family=Gamma(link=”log”) and subject as a random effect. Then use the car library and its Anova function with type = 3. Prior to either, set sum-to-zero contrasts for Sex and Order.

Qn21, Use a generalized linear mixed model (GLMM) to conduct a test of Vocab by Sex and Social. To the nearest then-thousandth (four digits), what is the p-value for the interaction effect? Hint: use the lme4 library and its glmer function with family-Gamma(link=”log”) and subject as a random effect. Then use the car library and its Anova function with type = 3. Prior to either, set sum-to-zero contrasts for sex and social.

Qn22. The only significant effect on Vocab was social. Therefore, perform post hoc pairwise comparisons among levels of social adjusted with Holm’s sequential Bonferroni procedure. To the nearest ten-thousandth (four digits), what is the p-value of the only non-significant pairwise comparison? Hint: Use the multicomp library and its mcp function called from within its glht function, Ignore any warnings produced.

Qn23. In module *, we conducted a generalized linear model (GLM) for ordinal logistic regression using the polr function form the MASS library. We also conducted a GLM for nominal logistic regression using the multinom function from the nnet library. It is, therefore, reasonable to ponder whether variants of such functions exist for generalized linear mixed models (GLMMs), i.e variants that can handle random effects and therefore repeated measures. Unfortunately, although certain approaches exist, ther are arcane and difficult to use, and the R community has not converged upon any widely adopted approaches to mutinomial models with random effects. Our lectures did not venture into such territory, but as a final topic pointing toward the future, here is a brief treatment of ordinal logistic regression with random effects. Let’s being by revisiting our file websearch3.csv from the course materials. Effort is a Likert-type response. How many ordered categories does effort have? Recode Effort as an ordinal response.

Qn24. Use a generalized linear mixed model (GLMM) for ordinal logistic regression to examine Effort by Engine, Specifically, we will use what is called a “cumulative link mixed model” (CLMM). We find the clmm function in the ordinal library. To produce significant tests we use a special version of the ANova function form RVAideMemoire library. There are two quirks. One is that we must make our data frame before passing it to clmm. The second is that the type of parameter seems to be ignore by Anova, resulting in a type II ANOVA. (with a Type II ANOVA, if an interaction is present, then main effects are ignored; not an issue for our one-way analysis of effort by Engine here.) To the nearest ten-thousandth (four digits), what is the p-value of the Engine maineffect? Hint: Here is the code to use:

``````#assuming df contains websearch3.csv
#Assuming Subject has been recoded as nominal
#Assumng effort has been recoded as ordinal
library(ordinal)
library(RVAideMemoire)
df2 <- as.data.frame(df) # quirk
Contrasts (df2)\$Engine) <- “contr.sum”
m  = clmm(Effort ~ Engine + (1|Subject), data = df2)
Anova(m, type = 3) # type ignored
``````

Qn25. In light of the significant main effect of Engine on Effort, post hoc pairwise comparisons are justified among the levels of Engine. However, there is no glht equivalent for clmm, so the best we can do is to treat Effort as a numeric value. Plot the Effort ratings by Engine and perform pairwise comparisons with the following code, To the neares ten-thousandth (four digits), what is the p-value of the one non-significant pairwise comparisons?

``````#assuming code continuing from Q24
plot(as.numeric(Effort)~Engine, data = df2)
library(mle4)
library(multcomp)
m = lmer(as.numeric(Effort)~Engine + (1|subject), data=df2)
summary(glht(m, mcp(Engine = “Tukey”)), test = adjusted(type=”holm”))
``````

Looking for someone to help you with this Coursera Quiz ? Do not hesitate because MyMathLabhomeworkhelp.com statistics experts are the best when it comes to providing accurate and timely solutions to all your statistics problems. You can place an order under our Coursework help tab, and we'll get back to you ASAP

## Questions from Generalized mixed-model Coursera Quiz

Qn11. Download the file teaser.csv from the course materials. This file describes a survey in which respondents recruited online saw five different teaser trailers for upcoming movies of different genres. Respondents simply indicated whether they liked each teaser or not. The research question is whether trailers from certain film genres were liked more than others. How many respondents took part in this survey?

Qn12. By viewing the data table, discern which counterbalancing scheme was used for the Teaser factor, if any:

``````Full counterbalancing
Latin Square
Balanced Latin square
Random
None random
``````

Q13. Create a plot of Liked by Teaser. Which teaser trailer genre was like the most?

``````Action
Comedy
Horror
Romance
Thriller
``````

Qn14. Using a generalized linear mixed model (GLMM), conduct a test of order effects on Liked to ensure counterbalancing worked, To the nearest ten-thousandth (four digits), what is the p-value for the order main effect? Hint: use the lme4 library and its glmer function with family=binomial and subject as random effect. The use the car library and its Anova function with type= 3. Prior to either, set sum-to-zero contrasts for order.

Qn15. Using a generalized linear mixed model (GLMM), conduct a test of liked by Teaser. To the nearest ten-thousandth (four digits), what is the chi-square statistic for the Teaser main effect? Hint: Use the lme4 library and its glmer function with family=binomial and subject as a random effect. Then use the car library and its Anova function with type = 3. Prior to either, set sum-to-zero contrasts for Teaser.
Qn16. Conduct simultaneous post hoc pairwise comparisons among levels of Teaser. Be sure to use Holm’s sequential Bonferroni procedure. How many of the tests are statistically significant? Hint: use the multcomp library and its mcp function called from within its glht function.

## Coursera conducting linear mixed model using social sav data

Conducting Linear Mixed Model using Social.sav Data

Qn6. Because the omnibus linear mixed model (LMM) did not result in a significant main effect of Engine on Searches, post hoc pairwise comparisons were not justified. As a result, despite one such comparison having p < 0.05, strictly speaking this “finding” must be disregarded

``````True
False``````

Qn7. Recall our file socialvalue.cv. If you have not done so already, please download it form 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. You originally analyzed this data with a 2x2 within subjects ANOVA. Now you will use a linear mixed model (LMM). Let’s refresh our memory: How many subjects took part in this study?

Qn9. Conduct a linear mixed model (LMM) on valued by social and Clip. To the nearest ten-thousandth (four digits), what is the p-value of the interaction effect? Hint: use the lme4 library and its lmer function with subject as a random effect. Then use the car library and its Anova function with type = 3 and test.statistic = “F”. Prior to either, set sum-to-zero contrasts for both social and clip.

Planned Pairwise comparisons of the data
Q10. Conduct two planned pairwise comparisons of how the film clips may have influenced judgements about the vale of social media. The first question is whether on Facebook, the number of valued posts was different after people saw a positive film 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. Correcting for these two planned comparisons using Holm’s sequential Bonferroni procedure, to the nearest ten-thousandth (four digits), what is the lowers corrected p-value of the two tests? Hint: use the multcomp and lsmeans libraries and the lsm function within the glht function. Do not correct for multiple comparisons yet as only two planned comparisons will be regarded. After retrieving the two as-yet uncorrected p-values of interest manually pass them to p.adjust for correction.

if you'd like someone to help you with r statistics assignments, then you can send us your files with the assignments instructions, and we'll get back to you with the solutions on time.

## Doing Mixed Effects Models - Coursera online quiz

Doing Mixed Effects Models
Qn1. Recall our file websearch3.csv. If you have not done so already, please download if from the course materials. This file describes a study of the number of searches people did with various search engines to successfully find 100 facts on the web. You originally analyzed this data with a one-way repeated measures ANOVA. Now you will use a linear mixed model (LMM). Let’s refresh our memory: How many subjects took part in this study?

Qn2. To the nearest hundredth (two digits), how many searches on average did subjects require with the Google search engine?

Qn3. Conduct a linear mixed model (LMM) on Searches by Engine. To the nearest ten-thousandth (four digits), what is the p-value of such a test? Hint: use the lme4 library and its lmer function with the subject as random effect. The use the car library and its Anova function with type = 3 and test.statistic = “f”. Prior to either, set sum-to-zero contrasts for engine.
Qn4. In light of your p-value result, are post hoc pairwise comparisons among levels of Engine justified, strictly speaking?

``````Yes
No``````

Qn5. Regardless of your answer to the previous question, conduct simultaneous pairwise comparisons among all levels of Engine. Correct your p-values with Holm’s sequential Bonferroni procedure. To the nearest ten-thousandth (four digits), what is the lowest corredted p-value resulting from such tests? Hint: use the multcomp library and its mcp function from within a call to its glht function.

This questions uses the r statistics programming software, if you are looking for someone to help with this question, then do not hesitate to contact MyMathLab answers .

## Understanding oneway repeated Measures Designs

Qn1. What primarily distinguishes a oneway repeated measures ANOVA from a one-way ANOVA?

``````- The presence of multiple factors
- The presence of a between-subjects factor.
- The presence of a within-subjects factors.
- None of the above
``````

Qn2. All else being equal, which of the following is a reason to use a within-subjects factor instead of a between-subjects factor?

``````- The data is more reliable
- The data exhibits less variance
- The factors are easier to analyze
- The exposure to confounds is less
- Less time from each subject is required
``````

Qn3. In a repeated measures experiment, why should we encode an Order factor and test whether it is statistically significant? (Mark all that apply)

``````- To examine whether the presentation order of conditions exerts a statistically significant effect on the response.
- To examine whether any counterbalancing strategies we may have used were effective
- To examine whether confounds may have affected our results
- To examine whether our factors cause changes in our response
- To examine whether out experiment discovered any differences``````

Qn4. How many subjects would be needed to fully counterbalance a repeated measures factor with four levels?

`` - 4,8,16,24,32``

Qn5. For an even number of conditions, a balanced Latin Square contains more sequences than a Latin Square.

``````- True
- False``````

Qn6. For a within-subjects factor of five levels, a balanced Latin Square would distribute which of the following number of subjects evenly across all sequences?

``````5, 15, 20,25,35
``````

Qn7. Which is the key property of a long-format data table?

``````- Each row contains only one data point per response for a given subject.
- Each row contains all of the data points per response for a given subject.
- Each row contains all of the dependent variables for a given subject.
- Multiple columns together encode all levels of a single factor.
- Multiple columns together encode all measures for a given subject``````

Qn8. Which is not a reason why Likert-type responses often do not satisfy the assumptions of ANOVA for parametric analyses.

``````- Despite having numbers on a scale, the response is not actually numeric.
- Responses may violate normality
- The response distribution cannot be calculated
- The response is ordinal
- The response is bound to within, say, a 5- or 7-point scale.
``````

Qn9. When is the Greenhouse-Geisser Correction necessary?

``````- When a within-subjects factor of 2+ levels violates sphericity
- When a within-subjects factor of 2+ levels exhibits sphericity
- When a within-subjects factor of 3+ levels violates sphericity
- When a within-subjects factor of 3+ levels exhibits sphericity
- None of the above
``````

Qn10. If an omnibus Friedman test is non-significant, post hoc pairwise comparisons should be carried out with Wilcoxon signed-rank tests

``````-True
-False
``````