We have mass spectrometry data (measurements of 100s of metabolites) from 4 samples. These were Non-treated, Treatment 1, Treatment 2, and Treatment 1 and 2 simultaneously.

The readout is intensities, which are a continuous data type. There are many metabolites, with relatively few replicates so as is typical of mass spec data, distribution is not reliably calculated.

We wanted to see what each treatment does allow as well as any interaction so we used the GLM function with two factors and their interaction. I want to check if this is actually a specific instance of the GLM that I have used (IE a linear model (LM)) as the default settings are:

Gaussian distribution and (Link = "Identity').

Specifically I would like to know if the following two models are equivalent:

`mod1 <- glm(Intensity ~ factor(Treatment 1) + factor(Treatment 2) + factor(Treatment 1)*factor(Treatment 2)) mod2 <- lm(Intensity ~ factor(Treatment 1) + factor(Treatment 2) + factor(Treatment 1)*factor(Treatment 2)) `

**Contents**hide

#### Best Answer

Well, run the code and you will observe the exact same results. So yes, they are the same. A linear model is just a special case of Generalized Linear Models (glm's) and it's the default in glm(). You can find all this in the help file of the functions though.

### Similar Posts:

- Solved – Whether to perform a 3 by 2 repeated measures ANOVA or three separate paired t-tests
- Solved – How to interpret these custom contrasts
- Solved – How to interpret these custom contrasts
- Solved – Repeated measures with nested data mixed effects model
- Solved – the differences of interaction mark in lme4