Test your knowledge of the material on loglinear models in the following quiz to see how much you learned. This is entirely private for you---no records are kept of your performance.

Questions

1. What is a loglinear model for frequency tables in categorical data analysis?

Loglinear models are statistical models that analyze relationships (associations) between categorical variables in frequency tables. They model the logarithm of expected cell frequencies as a linear function of the effects of the categorical variables and their interactions.

2. How do you test for goodness of fit of a loglinear model for a two-way frequency table?

Goodness of fit for a loglinear model compares the fit of that model (like [A B][C]) to the saturated model [ABC] that fits perfectly. This is best described as a likelihood ratio test, although the test statistic has a chi-square distribution and can also be described as a 'chi-squared test'.

3. What is the main difference between a glm() loglinear model and the chi-squared test for independence in two-way frequency tables?

glm() models can accommodate allowing or avoiding any combinations of factors, similar to ANOVA designs. They can also handle special models for ordered factors. This flexibility allows modeling different types of associations, whereas the chi-square test only tests the null hypothesis of complete independence.

4. How does a loglinear model differ from a logit model?

Logit models are designed for binary (or categorical) response variables and model the probability of an outcome. Loglinear models treat all variables symmetrically and model the logarithm of expected frequencies in multi-way tables, handling any number of categorical variables without designating one as a response.

5. What is the difference between a loglinear model fit by loglm() and one fit using glm()?

loglm() from the MASS package primarily provides fitted values and goodness-of-fit statistics but doesn't directly estimate model parameters (coefficients). glm() estimates the actual regression coefficients (parameters) for each term in the model, allowing interpretation of effect sizes and significance tests for individual parameters.

6. What are the advantages of a loglinear model fit using glm() over one fit using loglm()?

All three advantages are correct: glm() (a) provides parameter estimates with standard errors and significance tests, (b) can incorporate ordinal variables as linear/polynomial terms and quantitative predictors, and (c) can use quasi-Poisson or negative binomial families to handle over-dispersion. This makes glm() much more flexible than loglm().

7. How can you extend a loglinear model for frequency tables to handle multi-way contingency tables?

Multi-way contingency tables are modeled by adding higher-order association terms. For a three-way table with factors A, B, C, you can include two-way associations [AB], [AC], [BC] and even three-way associations [ABC]. The model formula specifies which associations to include.

8. For a three-way frequency table, what is the interpretation of the model symbolized by [A B] [A C]?

The model [A B][A C] includes the two-way associations A:B and A:C but not B:C. This means B and C are conditionally independent given Aโ€”there's no association between B and C after accounting for their relationships with A. The model allows A to be associated with both B and C.