A contrast is a linear combination of parameters or parameter estimates, with the coefficients in the linear combination known. Often used to test focused hypotheses.

learn more… | top users | synonyms

0
votes
0answers
5 views

Doubts regards the contrast between two samples to analyze their expected values

I have this two samples: pob1<-rchisq(90,12) pob2<-rchisq(50,7) For making a contrast to see whether if I can guess that their expected values are equal or ...
0
votes
0answers
7 views

Making a contrast of two samples

Having this pob1<-rchisq(90,12) pob2<-rchisq(50,7) How can I make a "contrast" to see if I can guess that both of their expected values are equal against ...
0
votes
0answers
4 views

Unexpected results with non-parametric multiple comparison of means (R package nparcomp functions nparcomp and mtcp) [migrated]

I am currently trying to perform a non-parametric simultaneous relative contrast effects using the R package nparcomp (https://cran.r-project.org/web/packages/nparcomp/index.html). I am getting some ...
0
votes
0answers
11 views

Interpretation of orthonormal contrasts in ANOVA/regression

Is there an intuitive substantive or geometric interpretation of regression coefficients associated with categorical predictor variables coded with orthonormal codes? For a simple example, say we are ...
0
votes
1answer
25 views

How to preserve order of factor levels in R [closed]

I have an unbalanced longitudinal data for glucose levels of some patients coming to a hospital. My data looks like id, date, glucose_level. As I want to find the ...
1
vote
1answer
52 views

Contrasts in ANOVA in R

I have conjured up a dataset here: ...
1
vote
0answers
31 views

Appropriate test for two test groups, one control group and binary outcome

I have the following problem: We send our Clients an email and offer them some new product. Let's say we want to test 2 email designs. Additionally, we need a control group, since some of the clients ...
0
votes
0answers
8 views

contrast testing in binomial GLM when variance = zero

I am trying to use GLM (family = binomial) to to test for differences in gene frequency among treatments. The data is binary (gene is present or absent). Its a simple one way model,but with quite a ...
0
votes
0answers
12 views

Calculate contrast given the estimate and standard deviation

I am analyzing results for a before-after control-impact experiment on species richness. I've used the 'vegan' package to calculate species richness using species accumulation curves, using the ...
0
votes
0answers
18 views

How to construct contrasts for a linear model with interactions?

I have trouble figuring out how to set up contrasts for a linear model with interaction terms. In the following example, how do I construct contrasts so that I test for the differences of species A - ...
1
vote
0answers
30 views

Complex Factorial Manova in R/SPSS

Hello I have been struggling for many days with this problem. The situation and data set are following. The data set comes from an experiment that asked subjects (ID) to compare several CVs on ...
0
votes
0answers
18 views

Occupancy analysis in Rmark: how can I calculate contrasts for BACI (Before-after-control-impact) experiment?

I'm analyzing presence/absence data using Rmark occupancy analysis (i.e. Rmark is the package which runs Program MARK in R). This is for a BACI (before-after-control-impact) design and I want to ...
2
votes
1answer
50 views

Zero-inflated Poisson regression: how can I calculate contrasts for BACI (Before-after-control-impact) experiment?

I am analyzing count data with a lot of zeros and found that although the data do not fit a poisson glm, they fit the zero-inflated poisson (ZIP) regression significantly better than the standard ...
1
vote
0answers
30 views

what are the consequences if a contrast is non-orthogonal?

everywhere I read about orthogonal contrasts. I know what they are, but I see nowhere why it matters if they are orthogonal or not. What are the consquences? Thank you!
0
votes
0answers
18 views

Strong differences in p-values depending method used to set contrasts with TukeyHSD in multcomp

I am currently running multiple comparisons following ANOVA. For this I want to set my own contrasts in TukeyHSD to exclude comparisons not of interest. So the first thing I did is test whether my ...
0
votes
0answers
31 views

How do I report Helmert contrast when running ANOVA?

I am a German student, so my English might not be perfect. Sorry for that. I would like to know how I do report Helmert contrast. I ran a two-way ANOVA and I wanna write down my contrasts in my thesis ...
0
votes
0answers
2 views

Sum Squares not adding up with testFactor

For some unknown reason the SS for the orthogonal contrasts I created with testFactor in the phia package do not add to the SS for the factor. Any ideas? Here is how I created the contrasts: ...
0
votes
0answers
15 views

contrast mean difference between intervention and control group

I'm studying a case of a quasi-experimental design, and have two groups. The Intervention Group and the Control Group. An answer for each individual was measured before and after the intervention ...
0
votes
0answers
13 views

how to (not) plot all pvals if many contrasts are done

I have run an ANOVA and then a Bonferroni test, using 8 groups. Therefore, the significant pvalues are many and showing them in a plot is messy. How would you recommend to approach this ...
0
votes
0answers
25 views

Compare one level vs the others in regression

we have a set of esclusive mutations on a set of genes. We would like to estimate the influence of such mutations on a certain syndrome. Our main problem is how to model the comparison between ...
7
votes
2answers
177 views

Why do some regression estimates differ by a change of sign, but others don't, when I change reference level?

Suppose I have a continuous outcome y and two factorial predictors, each with two levels. One of my categorical predictors, ...
0
votes
0answers
30 views

Orthogonal contrasts in a logistic mixed-effects model with unbalanced dataset

I have a dataset containing a dichotomous outcome variable Y, and 3 independent variables: ...
0
votes
0answers
11 views

Polynomial Contrast and Syntax in R

I read an example on ANOVA where the response variable is continuous and there are three independent factors, namely, machine (1, 2, 3), temp (low, high) and time (short, mid, long). The question ...
0
votes
0answers
95 views

Helmert contrasts: Each level compared to mean of subsequent levels, or mean of previous levels?

My question is what is the accepted definition of Helmert (and Reverse Helmert)? UCLA stats define Helmert contrasts thus: "Helmert coding compares each level of a categorical variable to the mean of ...
0
votes
1answer
130 views

R function survfit(): give newdata reference values for factors with >2 levels?

The goal is to plot separate survival curves for each level of a categorical variable in R, using a coxph model including the variable and a second categorical variable with >2 levels. If the second ...
2
votes
1answer
154 views

How to set custom contrasts with lmer in R

I am using lmer in R to check the effect of condition (cond) on some result. Here are some made up data, where s is the subject identifier and ...
1
vote
0answers
56 views

Choosing contrast coding in R

I am working on a data set with categorical variables. To apply ANN, I want to apply contrast coding to those variables. But how do I choose between coding functions in R (sum, helmert, treatment ...
1
vote
1answer
61 views

Why does “orthogonality” matter when using poly(x,degrees=1)?

I think I understand why orthogonality matters when doing regression with polynomial fits (so that the linear and quadratic, cubic, etc... can be evaluated independently). However, I don't understand ...
0
votes
0answers
78 views

Contrasts / Post Hoc Tests for three way repeated measures ANOVA

I have three factors A B and C with 2, 2 and 3 levels. A and C have significant main effects, B is not significant, interaction A*C is significant, the others are not. Now I want to know how to ...
2
votes
1answer
64 views

Testing linear restriction of parameters of ordered logistic regression models

Given the ordered logistic regression model: $outcome=\beta_0+\beta_1X_1+\beta_2X_2+\beta_3X_1*X_2$ Can I test linear restrictions on the parameters? For example I would like to test $H_0: ...
0
votes
0answers
14 views

Hypothesis Testing $\mu_{..}$ vs $\mu_{i.}$ for all $i$ In Context of Sample Surveys

I have been tasked with creating a table of p-values, where each cell is a p-value testing $\mu_{..}$ = $\mu_{i.}$, for each level of $i$. Essentially, $\mu_{..}$ is total average and $\mu_{i.}$ is an ...
1
vote
1answer
49 views

successive difference (aka repeated) contrasts with reference group

I have data from an experiment where performance y on two different devices was measured over three successive sessions. The 2x3 design is completely within-subject (see simulation code at the ...
1
vote
0answers
52 views

Imposing restriction over some regressors in a linear model?

I have the following problem: Starting with a multivariate linear model $Y=\beta_1x_1+\beta_2x_2+\beta_3x_3+\beta_4x_4+\alpha_1x_5+\alpha_2x_6+\alpha_3x_7+\alpha_4x_8+\epsilon$ and $$X=\begin{pmatrix} ...
1
vote
1answer
188 views

Why the discrepancy between the classic definition of contrast and that in R

According to Wikipedia, contrast is defined as follows: Let $\theta_1$,$\ldots$,$\theta_t$ be a set of variables, either parameters or statistics, and $a_1$,$\ldots$,$a_t$ be known constants. ...
1
vote
1answer
36 views

Why don't the following contrasts and linear models behave as I expected?

I am trying to understand how contrasts work, so I ran a small simulation using the following R code: ...
0
votes
0answers
24 views

Performing Interaction Contrasts on mixed-models in R

I need to run interaction contrasts on the following data set. It is a mixed design with the dependent variable a questionnaire score measured across five test days (within-subjects variable 'Day'). ...
0
votes
0answers
29 views

Contrast 3 is orthogonal to Contrast 1, Contrast 2

The question is using orthogonal contrast: 4 different paint (1,2,3,4) surface with 2 levels(Asphalt, concrete) for contrast 1: I would like to compare paint 1 and paint 2 for contrast 2: I would ...
1
vote
1answer
277 views

Interpreting GLM Interaction Contrasts in R (using glht)

I am trying to do a BACI analysis on count data, and I am having trouble interpreting the output from multcomp::glht. I don't understand how the contrast's coefficients are related to effect size ...
3
votes
4answers
1k views

Test if two coefficients are statistically different in logistic regression?

I am doing the logistic regression with logit link in MATLAB [b, ~, stats] = glmfit(X, [Y N], 'binomial', 'link', 'logit'); I can find the $p$-values for each ...
0
votes
1answer
78 views

How to choose contrasts for nominal categorical Independent variable so that it results in uncorrelated dummies

I have a nominal categorical predictor and a continuous dependent variable..I want to perform linear regression using lm in R. If the contrasts are such that the resulting dummy variables are ...
4
votes
1answer
144 views

Is there a consensus on adjusting alpha for multiple contrasts if the main effect is significant?

After talking to a couple of statisticians, reading some book sections, internet articles, and forums like this, I am still unclear about multiplicity adjustments of post hoc tests and contrasts. ...
3
votes
2answers
74 views

Geometric Interpretation of Orthogonal Contrasts in ANOVA

I was trying to understand orthogonal contrasts in ANOVA following the article by Harry M. Schey "A Geometric Description of Orthogonal Contrasts in One-Way Analysis of Variance" in The American ...
0
votes
0answers
55 views

Are the statistical words contrasts and post hoc synonymous?

I have implemented a linear mixed-effects model using lmer{} model in R and used glht to to ...
0
votes
0answers
13 views

How to determine values of coefficients for a comparsion using factorial design?

I think my problem is best answered by answering the following example but the more general the answer and explanation the better: Given 2 factors X and Y, x with 2 levels x1 x2 and Y with three ...
2
votes
0answers
117 views

Polynomial contrast in mixed anova with type III SS

I'm trying to replicate SPSS output in R for a mixed ANOVA with a polynomial contrast to test a linear trend. I fitted a mixed ANOVA in R (see code below), but I can't figure out how to get the ...
0
votes
0answers
33 views

How can I make an ANCOVA in R (Prior to a Cox ph model)?

I want to make an ANCOVA analysis of the survival rate of flies after being on a bad diet for the first 21 days of their lives compared to those always on a normal diet. I have studied the responses ...
0
votes
2answers
153 views

R lm() nested formulas give different results

Online sources show two supposedly equivalent ways to write an R linear model formula with nested factors: ...
0
votes
2answers
377 views

How to compare nested factor levels to mean, not to first level, and how to test the last nested level in R lm()

I have two factors j (with 3 levels A, B, C) and k (with 3 levels M, N, O), with k nested within j. Level A of j is the reference level and it has only one k level, M, in it. What I want to test ...
0
votes
0answers
18 views

contrasts between two grouped levels and the other six levels in a mixed 3x3 ANOVA in SPSS

I have a mixed ANOVA with 3 between subjects groups (control, m, s) , and 3 within subjects factors of stimulus type (3 levels), orientation (4), eccentricity (8 levels). i would like to investigate ...
0
votes
0answers
113 views

Why do contrasts or contrast sum of squares have one degree of freedom?

I have repeatedly seen that contrasts or contrast sum of squares are mentioned to have one degree of freedom. I'm wondering why this is the case. Is there an obvious explanation? Shouldn't they have ...