Week 4 - GLM Flashcards

(30 cards)

1
Q

General Linear Models require _____ distributed residuals and includes the following models:
(list models and what they are for)

A

ANCOVAs (analyses of covariance, which assume independence between variables)

  • Regression (simple and multilevel - compare continious variables)
  • ANOVA (compare means across groups, 2 or more) & t-test (compare means b/t 2 groups)

AND

Repeated measures ANOVA (which does not assume variables are independent)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are residuals?

A

a residual refers to the amount of variability in a dependent variable (DV) that is “left over” after accounting for the variability explained by the predictors in your analysis (often a regression).

IN OTHER WORDS - when you include predictors (independent variables) in a regression, you are making a guess (or prediction) that they are associated with the DV; a residual is a numeric value for how much you were wrong with that prediction. The lower the residual, the more accurate the the predictions in your regression are, indicating your IVs are related to (predictive of) the DV.

Keep in mind that each person in your sample will have their own residual score. This is because a regression model provided a “predicted value” for every individual, which is estimated from the values of the IVs of the regression. Each person’s residual score is the difference between their predicted score (determined by the values of the IV’s) and the actual observed score of your DV by that individual. That “left-over” value is a residual.

Like the imagery of the orange pulp, a statistical residual is simply what’s left over from your regression model. They can be used for many things, such as estimating accuracy of your model and checking assumptions, but that is a chat for another time…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What factors affect your choice of GLM model?

A
  1. The design of the research, between group vs within (or both)
  2. Measurement scale of IV and DV/s - numerical/categorical
  3. For parametric tests - assumptions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You want to find out whether initial personality scores differ between males and females.

You hypothesis that, on average, females will score higher on personality score 1 than males.

What statistical approach do you take?

A

Fully between groups, independent. Comparing two groups (male/female) on a single numerical DV

So would be a unpaired t-test.

But turns out the t-test yields the same p-value as the F-test (anova)…and with the simple linear regression.

All of these tests are fitting the same model and conducting the same underlying hypothesis test!!!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In what situations would an F-test (ANOVA) yield the same result as a t-test?

A

When comparing two groups on a continious variable.

When the F-test has only one degree of freedom in the numerator (i.e., only one comparison made) then the P-value will be the same….in fact you can find out what the t-statistic would be if you take the square root of the F-value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In GLM the underlying models for regression and ANOVA are same/different (pick one).

In GLM there are no/practical (pick one) differences in implementation between ANOVA and Regression.

A

SAME.

Practical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In GLM, what are ‘fixed factors’?

A

Between-group or independent group IVs

For example, group type (treatment or not) or gender (male/female).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In GLM, what are ‘covariates’?

A

Continuous IV’s - like age.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In GLM, what are ‘random factors’?

A

Generally a catergorical IV, but whoes levels represented a random sample from all population of levels…as opposed to the unique set of levels.

So NOT gender (which exclusively has 2 levels).
but YES when the levels represent ONLY a selection of possible levels (e.g., study centre, hospital 1 and 2….does not include all the other possible hospitals).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the Sum of Squares?

A

The sum, over all observations, of the squared differences of each observation from the overall mean.

In statistical linear models, (particularly in standard regression models), the TSS is the sum of the squares of the difference of the dependent variable and its mean.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between type 1 and type 3 sum of squares?

A

Type 1 - aka sequential SS, is where the SS for each factors is adjusted only for the factors (ivs) that come before it. (it is not commonly used)

e.g., age is adjusted for group, gender for age and group and so on .

Type 3- the SS for each variable is adjusted for all other factors in the model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In the following syntax which variables are covariates and which are fixed factors? Describe what this syntax does?

glm tes1 by group gender with age pers1/
method=sstype(3)/design=group age gender pers1 agegroup agegender

A

Group and gender are fixed factors
age and pers1 are covariates.

Test1 is the DV.

SStype3 specifies to use Sum of squares type 3.

Design specifies the main effects and interactions to be included in the model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

GLM automatically creates interaction term for (1) ______ but not for (2) ____.

A
  1. Fixed Factors

2. Covariates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

GLM expects (1) stacked/wide (pick one) data for independent group analyses and (2)stacked/wide (pick one) data for repeated measures

A
  1. Stacked (long)

2. wide (multivariate)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are contrast analyses? Why are they needed?

A

(should be pre-planned where possible, and always research directed) Statistics used either compare a pair of group means (simple) or to contrast one set of groups with another set of group (complex, weighted) OR interaction contrasts.

Contrasts explore specific research questions that the ANOVA doesn’t answer. E.g., the anova will tell you about main effects, moderation (e.g., YES an interaction exists!! (but what kind?!) - but it is a generic message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

List the various ways of carryingout multiple contrasts/pairwise comparisons

A
  • post hoc subcommand
  • contrast subcommand
  • regression coefficients
  • estimated marginal means
  • lmatrix and mmatrix subcommands (syntax only)
17
Q

Which of the following ways of carrying out multiple contrasts/pairwise comparisons are adjusted for other factors and covariates in the model (Regardless of the type of SS used)?

An which can be used to do post-hoc and a priori comparisons.

post hoc subcommand
contrast subcommand
regression coefficients
estimated marginal means
lmatrix and mmatrix subcommands (syntax only)
A

ALL except for post hoc.

Can all be used to do post-hoc or apriori comparisons…it is up to you to decide how to adjust the P-value (The contrasts just report the MAGNITUDE of the effect, we have to adjust what we will consider sig to reduce false positive/type 1 error)

18
Q

In the following syntax, how will GLM-inSPSS represent group (caterorical) and gender (categorical) in the parameter table?

glm test2 by group gender with age pers1/
print=parameters
design=group gender

A

GLM dummy-codes categorical variables, with the highest-numbered category as the reference category.

The unstandardised coefficient then represents the difference (on the scale of the DV) between each group relative to the reference group.

E.g., … compares each group with the reference group.

  • The parameter estimate of -.45 show that the mean of the dependant variable (test2) is .45 lower fro group 1 relative to the reference group (group 4).
  • and for gender, gender 1 (e.g., female) is.25 lower than gender 2 (e.g., male)
  • these are adjusted effect sizes, removing the effects of group for gender and gender from group.
19
Q

What is the intercept in linear regression models?

e.g.,

Y = B0 + B1X1 + B2X2 + E.

A

B0, the Y-intercept, can be interpreted as the value you would predict for Y if both X1 = 0 and X2 = 0

where:
Y = the response variable;
X1 = the first predictor variable; X2 = the second predictor variable;
E = the residual error, which is an unmeasured variable.

The parameters in the model are B0, the Y-intercept; B1, the first regression coefficient; and B2, the second regression coefficient. (each predictor variable has its own coefficient).

Y = B0 + B1X1 + B2X2 + E.

20
Q

in PICTURE FILE 4 - (a oneway ANOVA table)

What does partial eta squared mean? (how was it calculated?)

What is the ‘corrected model’?

A

patial eta 2 = the portion of variance in the DV explained by each IV. for the corrected model it represents the total variance explained by the model.

The corrected model is the model over and above the intercept term (i.e., the slope of the line when predictors were 0).

  • NOTE - in this case, since there is only one IV, this is redundant, because the model only has one IV.
21
Q

How can you consider contrasts using regression coefficients?

A

Request a table of regression coefficients.

For categorical variables, this will create dummy variables (With the highest value being the reference group). It will then give you an unstandardised regression coefficient (how much, in the DV’s native units did each group differ from the reference group) and a significance test —- whether how much each group differenced from the reference group was significant.

22
Q

what does the following syntax do?

glm score by gp/
contrast(gp)=simple(1)
posthoc=gp(bonferroni)/
emmeans=table(gp)
compare(gp)
adjust(bonferroni)
A
  • *CONTRAST = group comparisons
  • SIMPLE = the type of contrast, a comparisons of groups (pairwise contrast)
    • specifically it says “do a simple contrast using the variable group, where group 1 is the reference group”
  • would have to apply our own correction to these comparisons.

**It also says to than do post-hoc contrasts for the variable gp and to apply bonferroni adjustments to this analysis - i..e, alter the sig value to account for the number of tests being run

**EMmeans just gives a table of the estimated marginal means comparing groups - adjusted bonferroni again (which is similar to post-hoc analysis (see below a bit).

CONTRASTS report the unadjusted P-VALUE….but in POST-HOC PAIRWISE COMPARISONS, the values are already adjusted (for total number of comparisons = 6)- otherwise the tables are the same/have the same information

23
Q

EMmeans and pairwise post-hoc (point and click)

which used estimated marginal means, and which uses observed means?

A
  • EMmeans does post-hoc using estimated marginal means

- pairwise posthoc-point and click uses observed means

24
Q

What is the main difference between CONTRASTS and POST-HOC PAIRWISE COMPARISONS?

A

CONTRASTS report the unadjusted P-VALUE….but in POST-HOC PAIRWISE COMPARISONS, the values are already adjusted (for total number of comparisons otherwise the tables are the same/have the same information.

25
What are the 6 types of contrast comparisons?
- Simple - each group v a reference group - Deviation - they compare each group of a given factor against the overall mean for ALL groups. i.e., how much a particular group is different from/deviates from all other groups. nice when there isn't a natural reference groups - Difference - contrasts each group against the mean of all of the preceeding group - e.g., 2 v 1; 3 v 1&2; etc - Helmert - each group v mean of succeeding group (opposite to difference) e.g., 1 v 234, 2 v 34, 3 v 4) - Repeated - difference between consecutive groups -- 1 v 2 ; 2 v 3 ; 3 v 4 - Polynomial - linear, quadratic, cubic.
26
What is a 'simple' contrast?
- Simple - each group v a reference group
27
What is a 'deviation' contrast?
Compare each group of a given factor against the overall mean for ALL groups. i.e., how much a particular group is different from/deviates from all other groups. nice when there isn't a natural reference groups
28
What is a 'difference' contrast?
- Difference - contrasts each group against the mean of all of the preceeding group - e.g., 2 v 1; 3 v 1&2; etc
29
What is a 'Helmert' contrast?
- Helmert - each group v mean of succeeding group (opposite to difference) e.g., 1 v 234, 2 v 34, 3 v 4)
30
What is a 'Repeated' contrast?
- Repeated - difference between consecutive groups -- 1 v 2 ; 2 v 3 ; 3 v 4