Skip to main content

Questions tagged [contrasts]

In linear models and particularly in ANOVA, a contrast is a linear combination of parameters with coefficients summing up to zero. It is used to test the corresponding null hypothesis. Contrasts are especially often used with categorical predictors (factors) to make comparisons among the groups (categories). [See also tag 'categorical-encoding']

2 votes
1 answer
115 views

I’m trying to use the R poly() function with degree 1 to force glm to interpret a factor linearly. I’m puzzled by the fact that the size of the sample seems to increase the coefficient of the ...
Guillaume's user avatar
0 votes
0 answers
16 views

I have a dataframe where I'm studying the effects of a variable, say Word Type (with levels A,B,C,D) on reaction times (RTs). I have manually set treatment contrasts that compare each of these levels ...
Nayana's user avatar
  • 11
2 votes
1 answer
314 views

I've been following the method illustrated here: Polynomial contrasts for regression to transform the results .L, .Q, .C, etc. of a glm ordinal factor regression in the values for each of the levels ...
Guillaume's user avatar
0 votes
1 answer
65 views

I am fitting a linear model, y ~ sex + age_group, to test whether y exhibits a strong linear trend across ...
ty.fu's user avatar
  • 1
0 votes
1 answer
82 views

I have a dataset of participants performing a maximum work task at various loads, under two conditions c("A", "B"). I would like to estimate at what load work becomes the same in ...
Jem Arnold's user avatar
0 votes
0 answers
70 views

Is it possible for a GLM emmeans contrast to be significant if CLs contain 0 ? I am running this model ...
Paris's user avatar
  • 21
2 votes
1 answer
79 views

I have a linear model in R my_lm <- lm(Measurement ~ Group, my_df) where 'Group' has 3 levels (UHR, CC, HC). I use treatment contrasts to do the following ...
SilvaC's user avatar
  • 688
2 votes
1 answer
94 views

From what I can tell, Helmert coding seems to be the default coding scheme for ordinal variables in linear regression, where you compare each level to the mean of previous levels. Would it be valid to ...
edetone's user avatar
  • 41
1 vote
0 answers
41 views

I have a mixed effects model specified as complex1.model <- glmer(rt~ mental + alert + (1|subj_id), data = rt.df, family = Gamma(link = "inverse")) I ...
Paradeisios's user avatar
0 votes
0 answers
35 views

This is to some degree a software and to some degree a purely stats question. I have a design matrix $X$ with categorial and continuous variables. The first column contains only ones. For a given ...
Quertiopler's user avatar
7 votes
2 answers
528 views

When using dummy coding (e.g., contr.treatment) for a categorical predictor in a linear model in R: ...
Vicente Robinson's user avatar
2 votes
1 answer
99 views

I have been trying to understand a bit better polynomial contrasts using this resource/example : https://library.virginia.edu/data/articles/understanding-ordered-factors-in-a-linear-model I know this ...
She Wonders's user avatar
2 votes
1 answer
82 views

I am trying to understand how specifying a different contrast for the outcome variable affects the results in proportional odds logistic regression models in R using the polr function. To illustrate ...
StatisticsFanBoy's user avatar
1 vote
0 answers
147 views

I am watching one lecture about ANOVA and lecturer gave 3 examples for possible hypothesis for the data: For hypothesis 3 ($\mu_2 = \mu_1 - 3*\mu_3$) coefficients for contrast don't sum up to zero $(-...
Helios's user avatar
  • 115
2 votes
1 answer
113 views

I have a longitudinal mixed-effects regression comparing change in depression between two timepoints across 12 groups. I'd like to know if the control group is significantly less effective in reducing ...
Benji's user avatar
  • 423

15 30 50 per page
1
2 3 4 5
30