Puromycin data
Data on the velocity of an enzymatic reaction were obtained by Treloar (1974).
The number of counts per minute of radioactive product from the reaction was measured as a function of substrate concentration in parts per million (ppm) and from these counts the initial rate (or velocity) of the reaction was calculated (counts/min/min). The experiment was conducted once with the enzyme treated with Puromycin, and once with the enzyme untreated.
Assess if there is an association between the substrate concentration and rate for the treated enzyme.
data(Puromycin)
Puromycin <- Puromycin %>%
filter(state=="treated")
Data Exploration
Puromycin %>%
ggplot(aes(x=conc,y=rate)) +
geom_point() +
stat_smooth(method = "loess",col="red") + # fit een kromme door de punten (rode lijn)
stat_smooth(method='lm',col="black") + # fit een rechte door de punten aan de hand van de kleinstekwadratenmethode
ylab("Reaction rate (counts/min)") +
xlab("Substrate concentratie (ppm)")
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
The plot shows that there is a relation between the velocity and the concentration, however, the relation does not seem to be linear.
We will assess the impact of log-transforming the concentration. Because the concentration is measured in ppm we will log\(_{10}\) transform the data.
Puromycin %>%
ggplot(aes(x=conc %>% log10,y=rate)) +
geom_point() +
stat_smooth(method = "loess",col="red") +
stat_smooth(method='lm',col="black") +
ylab("Reaction Rate (counts/min)") +
xlab("log10(Substrate concentration) (log10 ppm)")
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
The relation between the velocity and the log\(_{10}\) transformed concentration seems to be linear.
Linear regression
We will fit the following model to the data
\(Y_i = \beta_0 + \beta_1 log_{10}(x_i) + \epsilon_i\)
with \(Y_i\) the reaction rate, \(x_i\) the adopted concentration, \(\beta_0\) the intercept, \(\beta_1\) the slope or the effect of the log\(_{10}\)(concentratie) on the average reaction rate, and \(\epsilon_i\) the error term that is \(\epsilon_i\) i.i.d. normally distributed with mean 0 and variance \(\sigma^2\).
Note, that we write the substrate concentratio with a small letter because the predictor is not random. The researchers have chosen the substrate concentrations in the design phase and it is thus no random variable.
mod1 <- lm(rate ~ conc %>% log10, Puromycin)
summary(mod1)
##
## Call:
## lm(formula = rate ~ conc %>% log10, data = Puromycin)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.0176 -6.2455 0.6039 7.4262 13.3228
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 209.194 5.045 41.47 1.59e-12 ***
## conc %>% log10 85.450 5.133 16.65 1.28e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.37 on 10 degrees of freedom
## Multiple R-squared: 0.9652, Adjusted R-squared: 0.9617
## F-statistic: 277.1 on 1 and 10 DF, p-value: 1.28e-08
Before we perform inference we will first assess the assumptions
Assumptions
- Independence
- Linearity
- Normal distribution of the residuals
- Homoscedasticity
We assume that the experiment was well designed and that the different reactions that were use in the experiment are independent.
Linearity
We assess linearity in a residual analysis
There seem to be small deviations for the residuals at high concentrations. However, we do not have many observation in the study so this might be caused by random varibility.
We will use simulation to assess if we can observe similar residual plots if all assumptions for the linear model hold.
set.seed(1031)
sigma <- mod1 %>% sigma
dataHlp <- Puromycin
simModels <- list()
par(mfrow=c(3,3))
for (i in 1:9)
{
nobs <- Puromycin %>% nrow
dataHlp$ySim <- mod1$fit + rnorm(nobs, sd = sigma)
simModels[[i]] <- lm(ySim~conc %>% log10, dataHlp)
plot(simModels[[i]], which = 1)
}
We observe that similar deviations might be generated for a model where all assumptions are valid.
Normality
The QQ-plot does not show large deviations from normality.
Homoscedasticity: equality of the variance
We can again use the residual plot for assessing this assumption or the plot were we plot the square root of the standardized residuals in function of the fit.
We see that the spread of the majority of the residuals is more or less similar. However, the two residuals at low concentrations are slightly higher. Again we can use our simulations to show that similar deviations might occur for models where all assumptions hold.
par(mfrow = c(3,3))
for (i in 1:9)
plot(simModels[[i]], which = 3)
Inference
hypotheses
We want to assess if there is a linear association between the reaction rate and the log\(_{10}\) transformed concentration.
So we will assess
\(H_0\): \(\beta_1 = 0\)
against
\(H_A\): \(\beta_1 \ne 0\)
using a t-test on the slope parameter.
##
## Call:
## lm(formula = rate ~ conc %>% log10, data = Puromycin)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.0176 -6.2455 0.6039 7.4262 13.3228
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 209.194 5.045 41.47 1.59e-12 ***
## conc %>% log10 85.450 5.133 16.65 1.28e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.37 on 10 degrees of freedom
## Multiple R-squared: 0.9652, Adjusted R-squared: 0.9617
## F-statistic: 277.1 on 1 and 10 DF, p-value: 1.28e-08
## 2.5 % 97.5 %
## (Intercept) 197.95335 220.43564
## conc %>% log10 74.01255 96.88732
Conclusion
There is an extremely significant linear association between the substrate concentration on the log-scale and the reaction rate (p<<0.001). A reaction at a substrate concentration that is 10 times higher will have a reaction speed that is on average 85.4 counts/min higher (95% CI [74, 96.9] counts/min).
LS0tCnRpdGxlOiAiRXhlcmNpc2UgNi4xOiBMaW5lYXIgcmVncmVzc2lvbiBvbiBwdXJvbXljaW4gZGF0YSIKYXV0aG9yOiAiTGlldmVuIENsZW1lbnQgJiBBbGV4YW5kcmUgU2VnZXJzIgpkYXRlOiAic3RhdE9taWNzLCBHaGVudCBVbml2ZXJzaXR5IChodHRwczovL3N0YXRvbWljcy5naXRodWIuaW8pIgpvdXRwdXQ6CiAgaHRtbF9kb2N1bWVudDoKICAgIGNvZGVfZG93bmxvYWQ6IHllcwogICAgdGhlbWU6IGNvc21vCiAgICB0b2M6IHllcwogICAgdG9jX2Zsb2F0OiB5ZXMKICAgIGhpZ2hsaWdodDogdGFuZ28KICAgIG51bWJlcl9zZWN0aW9uczogeWVzCi0tLQoKCjxhIHJlbD0ibGljZW5zZSIgaHJlZj0iaHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzQuMCI+PGltZyBhbHQ9IkNyZWF0aXZlIENvbW1vbnMg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