| SBMDfem | R Documentation |
Repeated measurements of spinal bone mineral density of 230 girls and young women aged 9 to 26 of four
ethnic groups, from a study of bone mineral acquisition (Bachrach et al. 1999); the data of M. P. Wand's
additive mixed model example (gamm()). HRW::femSBMD is a larger version (1003 measurements).
data(SBMDfem)
A data frame with 547 rows and 7 columns:
identification number of the subject.
spinal bone mineral density (g/cm^2).
age (years).
factor: Asian, Black, Hispanic, White.
indicators (1 = yes) of the ethnic groups other than Asian.
Bachrach, L. K., Hastie, T., Wang, M.-C., Narasimhan, B. and Marcus, R. (1999). Bone mineral acquisition in healthy Asian, Hispanic, Black, and Caucasian youth: a longitudinal study. Journal of Clinical Endocrinology and Metabolism, 84, 4702-4712.
data(SBMDfem)
SBMDfem$idnum <- factor(SBMDfem$idnum)
# a curve over age, ethnicity as a fixed effect, a random intercept per girl
fit <- semireg(spnbmd ~ s(age, bs = "os", k = 15) + ethnicity + (1 | idnum), data = SBMDfem)
anova(fit) # ethnicity: F test with Kenward-Roger df; the smooth: likelihood ratio test
# the ethnic groups at age 15, compared in pairs
predictmeans(fit, "ethnicity", covariate = c(age = 15), pairwise = TRUE, adj = "tukey")$pairs
# growth of bone density: where is the curve rising?
attr(semipred(fit, "age", "age", deriv = 1)$pred_df, "significant")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.