My aim is to analyse the blood concentration of a biomarker and its annual increase in four different subject groups using longitudinal measurements, i.e. biomarker concentrations of each subject were measured at multiple points of time. The dataset consists of (1) the biomarker concentration as the dependent variable and (2) the independent variables age (in years, centred at the mean age of all subject measurements to obtain meaningful intercepts) and group (categorical factor with four levels, i.e. there were four subject groups A, B, C and D, with A being the reference group). The grouping variable is subject (i.e. the subject pseudonym). The number of observations is roughly 320 (4 groups, 20 subjects per group, 4 visits per subject).
A linear mixed model was run to predict the biomarker concentration by the fixed effects of “group” and “age”, their interaction and random intercepts for the variable “subject”, using the lme4 package in R with the following code:
model <- lmer(biomarker ~ group * age + (1 | subject),
data = biomarker_data)
Now I would like to ask for your help to visualise the model estimates with their confidence intervals in the following manner:
(a) Visualising the estimated biomarker concentration of each group (A, B, C, D) at the mean age (i.e. age = 0) as a bar plot with error bars of the 95% confidence interval: The program output only provides me with the group estimates (of group B, C, D) and confidence intervals relative to the reference group A (i.e. intercepts relative to group A). What I would like to display for each group, however, is the estimate and confidence interval of the absolute biomarker concentration. The confidence interval should relate to the fixed effect without the random effect of the variable subject.
(b) Visualising the estimated annual biomarker increase of each group (A, B, C, D) as a bar plot with error bars of the 95% confidence interval: Again, the program output only provides me with the interaction values of the groups B, C, and D relative to the reference group A. What I would like to display for each group, however, is the estimate and confidence of the absolute annual increase. Again, the confidence interval should relate to the interaction of the fixed effect without the variation of the random variable subject.
(c) Visualising the biomarker concentration (y-axis) as a function of age (x-axis) for each group with the confidence interval of the model estimate. My problem is not to plot the four regression lines, but the confidence interval around each regression line. As in the above, I am interested in the fixed effect without the random subject variation. (My question (a) is a special case of question (c)).