mathexpert published posts

Understanding Mixed Effects Models

Qn1. A mixed model is “mixed” because it contains both between-subjects and within-subjects factors.

True
False

Qn2. Which of the following best describes fixed effects?

Fixed effects are manipulated factors whose levels are sampled randomly from a larger population of interest
Fixed effects are random factors whose chosen levels are of explicit interest.
Fixed effects are random factors whose levels are sampled randomly from a larger population of interest    
None of the above

Qn3. Random effects are called “random” in part because their levels are randomly sampled form a larger population about which wish to generalize

True
False

Qn4. Linear mixed models (LMMS) can handle Poisson response distributions.

True 

False
Qn5. Which is not an advantage of a linear mixed model (LMM)

The ability to handle within-subjects factors
The ability to handle unbalanced designs
The ability to handle missing data
The ability to handle non-normal response distributions
The ability to handle violations of sphericity

Qn6. Linear mixed models (LMMs) produce small residual degrees of freedom.

True
False

Qn7. Nesting is useful when the levels of a factor are not meaningful when pooled across all levels of the other factors.

True
False

Qn8. Nesting is necessary when we wish to calculate the means and variances of a nested factor’s levels only within the levels of the other factors, that is, the nesting factors.

True
False

Qn9, Linear mixed models (LMMs) generalize the linear model (LM) to non-normal response

True 
False

Qn10. Generalized linear mixed models (GLMMs) generalized the linear mixed model (LMM) to non-normal response distributions.

True
False

Qn11. Why are planned pairwise comparisons important? (Mark all that apply)

Planned pairwise comparisons enable experimenters to communicate more effectively within the public
Planned pairwise comparisons force the experiment to consider his or her hypotheses before the data arrives to prevent revisions.
Planned pairwise comparisons should be based on a priori hypotheses and therefore prevent “fishing expeditions” for significant p-values
Planned pairwise comparisons ensure that research funds are only used for anticipated purposes
Planned pairwise comparisons guarantee that significant differences, if they exist, will be found eventually

Qn12. Generalized linear mixed models (GLMMs) are capable of handling repeated measures factors via random effects and non-normal response distributions

True 
False

If you are looking for MyMathlab Answers, then you have landed on the right page because we provide correct solutions to all

Planned comparisons between domestic and international bookings

Qn11. Download the file bookflights.csv from the course materials. This file describes a survey in which website visitors books a flight on either Expedia, Orbitz, or Priceline. Whether they booed a domestic or international flight was recorded. The survey response was 1-7 rating for Ease on a Likert-type scale, with “7” being easiest. The research question is which site felt easiest to use overall, and specifically for domestic vs. international bookings. How many subjects took part in this study?

Qn12. Create an interaction plot with Website on the X-axis and International as the traces. How many times, if ay, do the two traces cross? Hint: if you already recoded Ease as an ordinal response, you must use as.numeric when passing it to interaction.plot.

Qn13. Use ordinal logistic regression to examine Ease by Website and International. To the nearest ten-thousandth (four digits), what is the p-value of the website main effect? Hint: Use the MASS library and its polr function with Hess = TRUE to create the ornidal logistic model. Then use the car library and its Anova function with type = 3. Prior to either, set sum-to-zero contrasts for both website and international.

Qn14. Conduct three planned comparisons between domestic and international bookings for each website. Adjust for multiple comparisons using Holm’s sequential Bonferroni procedure. What is the highest p-value from such tests? Hint: use the multcomp and lsmeans libraries and the lsmeans, pairs, and as.glht functions. (The lsm formulation from within glht will not work in this case.) Because we only have three planned pairwise comparisons, use “none” for the multiple comparisons adjustment to avoid correcting for all possible pairwise comparisons. Instead, just find the three planned and as-yet uncorrected p-values and pass them manually to p.adjust with method=”holm”. Since the formulation for simultaneous comparisons is a bit different, we place the code for those aspects of this questions here:

Summary(glht(m,lsm(pairwise ~ website * International)), test = adjusted (type = “non”)) 

Qn15. Which of the following conclusions are supported by the analyses we performed on bookflights.csv?

There was a significant main effect of website on Ease
There was a significant main effect of International on Ease
There was significant website*international interaction
Expedia was perceived as significantly easier for booking international flights than domestic
Orbitz was perceived as significantly easier for booking domestic flights than international flights
Priceline was perceived as significantly easier for booking domestic flights than interanion flights.

COnducting Planned Comparisons Coursera Quiz
Qn5. Download the file hwreco.csv from the course materials. This file describes a study of three handwriting recognizers (A,B,C) and subjects who were either right-handed or left-handed. The response is the number of incorrectly recognized handwriting words out of every 100 handwritten words. The research questions are how each recognizer fared overall and whether a given recognizer performed better for right-handed or left-handed writers. How many subjects took part in this study?

Qn6. Create an interaction plot with Recognizer on the X-axis and Hand as the traces. How many times, if any, do the two traces cross?

Qn7. Fit Poisson distributions to the Errors of each of the three Recognizer levels and test those fits with goodness-of-fit tests, To the nearest ten-thousandth (four digits), what is the lowest p-value produced by these tests? Hint: To fit a Poisson distribution, use the fitdistrplus library and its fitdist function. Then test the fit with the gotstat function.

Qn8. Use Poisson regression to examine Errors by Recognizer and Hand. To the nearest ten-thousandth (four digits), What is the p-value of the recognizer * hand interaction? Hint: Create a model with glm using family – poisson. Then use the car library and its Anova function with type = 3. Prior to either, set sum-to-zero contrasts for bot recognizer and Hand.

Qn9. Conduct three planned comparisons between left-and right-handed recognition errors within each recognizer, Adjust for multiple comparisons using Holm’s sequential Bonferroni procedure. What is the lowest corrected p-value form such tests? Hint: use the multcomp and lsmeans libraries and the lsm formulation of the right glht function. Because we only have three planned pairwise comparisons, use “non” for the initial multiple comparisons adjustment to avoid correcting for all possible pairwise comparisons. Instead, just find the three planned and as=ye uncorrected p-values and pass them manually to p.adjust with method=”holm”.

Qn10. Which of the following conclusions are supported by the analyses we performed on hwreco.csv? (Mark all that apply)

The handwriting counts seemed to be Poisson-distributed.
There was a significant main effect of Recognizer on Errors
There was a significant main effect of hands on Errors
There was a significant Recognizer * Hand interaction
For recognizer ‘a’ there were significantly more errors for right-handed writers that left handed writers.
For recognizer B, there were significantly more errors for left-handed writers than left-handed writers.
For recognizer C, there were significantly more errors for right-handed writers than left-handed writers. 

Doing Generalized Linear Models
Qn1. Download the file deviceprefssex.csv from the course materials. This file describes the same study as in our deviceprefs.csv file, but now augmented with a column for sex (M,F). It also still contains a column for disability (1,0). The research question is how preference for either touchpads or trackballs differs by disability status and sex. How many subjects took part in this study?

Qn2. Use binomial regression to examine Pref by Disability and sex. To the nearest ten-thousandth (four digits), what is the p-value f the Disability * Sex interaction? Hint: Create a model with glm using family=binomial. The use the car library and its Anova function with type = 3. Prior to either, set sum-to-zero contrasts for both disability and sex.

Qn3. Multinomial regression generalizes binomial regression to dependent variables with more than two categories, so it can handle just two categories as well. Use multinomial regression to examine Pref by Disability and Sex, To the nearest ten-thousandth (four digits), what is the p-value of Disability * Sez interaction? Hint: use the nnet library and its multinom function, The use the car library and its Anova function with type = 3. Prior to either, set sum-to-zero contrasts for both Disability and Sex.

Qn4. Let us examine whether there was a significant preference for touchpads or trackballs within each Disability Se combination. Conduct such exploration using post hoc binomial tests. Adjust for multiple comparisons using Holm’s sequential Bonferroni procedure. What is the lowest corrected p-value produced by such an exploration? Hint: Conduct four separate tests with binm.test. The four tests correspond to the four combinations of Disability and Sex. For each combination, test the sum of rows preferring “touchpad” against all rows having that same Disability Sex combination. Since there are only two devices, a test for touchpad is implicity a test for trackball, and vice versa.

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