-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHW4.Rmd
830 lines (563 loc) · 19.9 KB
/
HW4.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
---
title: "Homework 4 - BSTA 519"
author: "Matthew Hoctor"
date: "10/31/2021"
output:
html_document:
number_sections: no
theme: lumen
toc: yes
toc_float:
collapsed: yes
smooth_scroll: no
pdf_document:
toc: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
library(readxl)
library(tidyverse)
library(ggplot2)
#library(CarletonStats)
#library(pwr)
#library(BSDA)
#library(exact2x2)
#library(car)
#library(dvmisc)
#library(emmeans)
#library(gridExtra)
#library(DescTools)
#library(DiagrammeR)
library(nlme)
library(doBy)
```
Toenail Data: Parametric & Semi-Parametric Curves
# Dental Data import
Import the 'dental' dataset:
```{r}
dent <- read_csv("dent.csv")
```
Create factored long-form data:
```{r}
dent_long <- pivot_longer(data = dent, cols = c("8", "10","12", "14"), names_to = "age", values_to = "distance")
```
# 1.1
On a single graph, construct a time plot that displays the mean distance (mm) vs. age (in years)) for boys and girls. Describe the time trends for boys and girls.
```{r}
mm_mean <- dent_long %>% group_by(Gender, age) %>% summarise(mm = mean(distance))
```
Creating a factored gender variable for ggplot:
```{r}
mm_mean$Gender.f <- factor(mm_mean$Gender, c("F", "M"))
```
Creating a numeric age variable:
```{r}
mm_mean$age <- as.numeric(mm_mean$age)
```
Plotting with ggplot:
```{r}
ggplot(data = mm_mean,
mapping = aes(
x = age,
y = mm,
colour = Gender.f,
group = Gender
)) +
geom_line() + geom_point()
ggplot(data = mm_mean,
mapping = aes(
x = age,
y = mm,
colour = Gender.f,
group = Gender
)) +
geom_line() + geom_point()+coord_cartesian(ylim = c(0,30))
```
As we can see from the plots above, the average dental growth distance increases with age for female and male children over the ages considered; however the average dental growth distance for males is greater throughout the age range. Plotting such that the graph of the response variable includes the null shows that the relative increases are somewhat small, overall.
# 1.2
Provide the estimated covariance and correlation matrix from the data, and describe how the variance and correlation change over time.
To provide a qualitative visualization, see below for the scatterplot matrix:
```{r}
pairs(dent[,3:6])
```
To calculate the correlation matrix:
```{r}
round(cor(dent[, 3:6]), 4)
```
To calculate the covariance matrix:
```{r}
round(cov(dent[, 3:6]), 4)
```
Although we would expect to see decreasing correlation over time; no distinct pattern of change in correlation or covariance is immediately apparent from these matricies. Increasing variance (along the diagonal of the covariance matrix) is possible, but not completely apparent.
# 1.3
## Fitting Models
Use the response profile model (saturated model for the mean response) as the maximal model for the mean, fit the following models for covariance:
First we will convert age to a numerical variable in the long-form dataset:
```{r}
dent_long$age <- as.numeric(dent_long$age)
```
Then create factored variables for age and gender:
```{r}
dent_long$Gender.f <- factor(dent_long$Gender, c("F", "M"))
dent_long$age.f <- factor(dent_long$age, c(8,10,12,14))
```
Then create a 'time' variable so that corSymm doesn't complain about 'objects must be a sequence of consecutive integers':
```{r}
dent_long$time = dent_long$age
dent_long$time[dent_long$age == 8] = 1
dent_long$time[dent_long$age == 10] = 2
dent_long$time[dent_long$age == 12] = 3
dent_long$time[dent_long$age == 14] = 4
```
### i. Unstructured covariance
Creating the model:
```{r}
dent_reml_uns <- gls(distance ~ Gender.f*age.f,
data = dent_long,
corr = corSymm(form = ~ time | ID), # it does not run if use form = ~ age | ID
weights = varIdent(form = ~ 1 | age),
method = "REML"
)
```
Summary:
```{r}
summary(dent_reml_uns)
```
Type III test:
```{r}
anova(dent_reml_uns)
```
Covariance & Correlation:
```{r}
#obtain covariance structure
getVarCov(dent_reml_uns)
#obtain correlation matrix
dent_reml_uns_cov <- getVarCov(dent_reml_uns)
dent_reml_uns_cov
cov2cor(dent_reml_uns_cov)
is.matrix(dent_reml_uns_cov)
#Obtain correlation parameters
dent_reml_uns_MS <- dent_reml_uns$modelStruct
dent_reml_uns_MS$corStruct
dent_reml_uns_MS$varStruct
```
### ii. Compound symmetry
Creating the model:
```{r}
dent_reml_cs <- gls(distance ~ Gender.f*age.f,
data = dent_long,
corr = corCompSymm(form = ~ time | ID), # it does not run if use form = ~ age | ID
#weights = varIdent(form = ~ 1 | age),
method = "REML"
)
```
Summary:
```{r}
summary(dent_reml_cs)
```
Type III test:
```{r}
anova(dent_reml_cs)
```
Covariance & Correlation:
```{r}
#obtain covariance structure
getVarCov(dent_reml_cs)
#obtain correlation matrix
dent_reml_cs_cov <- getVarCov(dent_reml_cs)
dent_reml_cs_cov
cov2cor(dent_reml_cs_cov)
is.matrix(dent_reml_cs_cov)
#Obtain correlation parameters
dent_reml_cs_MS <- dent_reml_cs$modelStruct
dent_reml_cs_MS$corStruct
dent_reml_cs_MS$varStruct
```
### iii. Heterogeneous Compound symmetry
Creating the model:
```{r}
dent_reml_csh <- gls(distance ~ Gender.f*age.f,
data = dent_long,
corr = corCompSymm(form = ~ time | ID), # it does not run if use form = ~ age | ID
weights = varIdent(form = ~ 1 | age),
method = "REML"
)
```
Summary:
```{r}
summary(dent_reml_csh)
```
Type III test:
```{r}
anova(dent_reml_csh)
```
Covariance & Correlation:
```{r}
#obtain covariance structure
getVarCov(dent_reml_csh)
#obtain correlation matrix
dent_reml_csh_cov <- getVarCov(dent_reml_csh)
dent_reml_csh_cov
cov2cor(dent_reml_csh_cov)
is.matrix(dent_reml_csh_cov)
#Obtain correlation parameters
dent_reml_csh_MS <- dent_reml_csh$modelStruct
dent_reml_csh_MS$corStruct
dent_reml_csh_MS$varStruct
```
#### Compare compound symmetry to heterogenious compound symmetry
```{r}
anova(dent_reml_cs, dent_reml_csh, test = TRUE)
```
### iv. Autoregressive(1)
Creating the model:
```{r}
dent_reml_ar1 <- gls(distance ~ Gender.f*age.f,
data = dent_long,
corr = corAR1(form = ~ time | ID), # it does not run if use form = ~ age | ID
#weights = varIdent(form = ~ 1 | age),
method = "REML"
)
```
Summary:
```{r}
summary(dent_reml_ar1)
```
Type III test:
```{r}
anova(dent_reml_ar1)
```
Covariance & Correlation:
```{r}
#obtain covariance structure
getVarCov(dent_reml_ar1)
#obtain correlation matrix
dent_reml_ar1_cov <- getVarCov(dent_reml_ar1)
dent_reml_ar1_cov
cov2cor(dent_reml_ar1_cov)
is.matrix(dent_reml_ar1_cov)
#Obtain correlation parameters
dent_reml_ar1_MS <- dent_reml_ar1$modelStruct
dent_reml_ar1_MS$corStruct
dent_reml_ar1_MS$varStruct
```
### v. Heterogeneous autoregressive(1)
Creating the model:
```{r}
dent_reml_ar1h <- gls(distance ~ Gender.f*age.f,
data = dent_long,
corr = corAR1(form = ~ time | ID), # it does not run if use form = ~ age | ID
weights = varIdent(form = ~ 1 | age),
method = "REML"
)
```
Summary:
```{r}
summary(dent_reml_ar1h)
```
Type III test:
```{r}
anova(dent_reml_ar1h)
```
Covariance & Correlation:
```{r}
#obtain covariance structure
getVarCov(dent_reml_ar1h)
#obtain correlation matrix
dent_reml_ar1h_cov <- getVarCov(dent_reml_ar1h)
dent_reml_ar1h_cov
cov2cor(dent_reml_ar1h_cov)
is.matrix(dent_reml_ar1h_cov)
#Obtain correlation parameters
dent_reml_ar1h_MS <- dent_reml_ar1h$modelStruct
dent_reml_ar1h_MS$corStruct
dent_reml_ar1h_MS$varStruct
```
#### Compare AR1 to heterogenious AR1
```{r}
anova(dent_reml_ar1h, dent_reml_ar1, test = TRUE)
```
### vi. Toeplitz
Creating the model:
```{r}
dent_reml_toep <- gls(distance ~ Gender.f*age.f,
data = dent_long,
corr = corARMA(form = ~ time | ID, p = 3), # it does not run if use form = ~ age | ID
#weights = varIdent(form = ~ 1 | age),
method = "REML"
)
```
Summary:
```{r}
summary(dent_reml_toep)
```
Type III test:
```{r}
anova(dent_reml_toep)
```
Covariance & Correlation:
```{r}
#obtain covariance structure
getVarCov(dent_reml_toep)
#obtain correlation matrix
dent_reml_toep_cov <- getVarCov(dent_reml_toep)
dent_reml_toep_cov
cov2cor(dent_reml_toep_cov)
is.matrix(dent_reml_toep_cov)
#Obtain correlation parameters
dent_reml_toep_MS <- dent_reml_toep$modelStruct
dent_reml_toep_MS$corStruct
dent_reml_toep_MS$varStruct
```
### vii. Heterogeneous Toeplitz
Creating the model:
```{r}
dent_reml_toeph <- gls(distance ~ Gender.f*age.f,
data = dent_long,
corr = corARMA(form = ~ time | ID, p = 3), # it does not run if use form = ~ age | ID
weights = varIdent(form = ~ 1 | age),
method = "REML"
)
```
Summary:
```{r}
summary(dent_reml_toeph)
```
Type III test:
```{r}
anova(dent_reml_toeph)
```
Covariance & Correlation:
```{r}
#obtain covariance structure
getVarCov(dent_reml_toeph)
#obtain correlation matrix
dent_reml_toeph_cov <- getVarCov(dent_reml_toeph)
dent_reml_toeph_cov
cov2cor(dent_reml_toeph_cov)
is.matrix(dent_reml_toeph_cov)
#Obtain correlation parameters
dent_reml_toeph_MS <- dent_reml_toeph$modelStruct
dent_reml_toeph_MS$corStruct
dent_reml_toeph_MS$varStruct
```
#### Compare Toeplitz to heterogenious Toeplitz
```{r}
anova(dent_reml_toeph, dent_reml_toep, test = TRUE)
```
## Based on the results from these models, do the following:
### a
Based on the estimated unstructured covariance, describe how the variance and correlation change over time. Do you see similar pattern to what you saw in 1.2?
Comparing the correlation matrix from 1.2 to that of the unstructured model:
```{r}
#1.2
round(cor(dent[, 3:6]), 4)
#Unstructured
round(cov2cor(dent_reml_uns_cov), 4)
```
Comparing the covariance matrix from 1.2 to that of the unstructured model:
```{r}
#1.2
round(cov(dent[, 3:6]), 4)
#Unstructured
round(dent_reml_uns_cov, 4)
```
A similar pattern is seen in the unstructured correlation matrix as was found in 1.2 (i.e. a lack of defined pattern in change in correlation); similarly for the covariance matrix, although it is interesting to note overall smaller values for the covariance matrix of the unstructured model.
### b
Provide the estimated covariance matrix and estimated correlation matrix for covariance pattern models ii to vii, and qualitatively summarize the major differences among these estimated covariance and correlation matrices.
#### ii CS
Correlation matrix
```{r}
round(cov2cor(dent_reml_cs_cov), 4)
```
Covariance matrix
```{r}
round(dent_reml_cs_cov, 4)
```
#### iii hCS
Correlation matrix
```{r}
round(cov2cor(dent_reml_csh_cov), 4)
```
Covariance matrix
```{r}
round(dent_reml_csh_cov, 4)
```
#### iv AR1
Correlation matrix
```{r}
round(cov2cor(dent_reml_ar1_cov), 4)
```
Covariance matrix
```{r}
round(dent_reml_ar1_cov, 4)
```
#### v hAR1
Correlation matrix
```{r}
round(cov2cor(dent_reml_ar1h_cov), 4)
```
Covariance matrix
```{r}
round(dent_reml_ar1h_cov, 4)
```
#### vi Toep
Correlation matrix
```{r}
round(cov2cor(dent_reml_toep_cov), 4)
```
Covariance matrix
```{r}
round(dent_reml_toep_cov, 4)
```
#### vii hToep
Correlation matrix
```{r}
round(cov2cor(dent_reml_toeph_cov), 4)
```
Covariance matrix
```{r}
round(dent_reml_toeph_cov, 4)
```
#### Summary of differences
As we would expect from the mathematical definitions of these covariance patterns, autoregressive models had the greatest decreases in covariance over time, whereas compound symmetry models showed the least decreases in covariance overtime, and the Toeplitz models had an intermediate decrease in covariance over time.
### c
Compared to the unstructured covariance, do the compound symmetry, heterogeneous compound symmetry, and Toeplitz models provide adequate fit? Perform the relevant tests and interpret your results.
All of these models are nested within the unstructured covariance model; and thus all can be compared to the unstructured covariance model with the LRT:
#### CS vs Unstructured
```{r}
anova(dent_reml_cs, dent_reml_uns, test = TRUE)
```
#### Heterogenious CS vs Unstructured
```{r}
anova(dent_reml_csh, dent_reml_uns, test = TRUE)
```
#### Toeplitz vs Unstructured
```{r}
anova(dent_reml_toep, dent_reml_uns, test = TRUE)
```
#### Heterogenious Toeplitz vs Unstructured
```{r}
anova(dent_reml_toeph, dent_reml_uns, test = TRUE)
```
#### Conclusion
None of the above liklihood ratio tests provided a significant result, and thus compared to the unstructured model Toeplitz and compound symmetry models provide adequate fit.
### d
Do the heterogeneous compound symmetry and Toeplitz provide a better fit than the compound symmetry model? Perform the relevant test and show your results.
The compound symmetry model is nested within the Toeplitz model, and the CS model is also nested within the heterogeneous CS model; thus these two comparisons can be made with the LRT:
#### CS vs Toeplitz
```{r}
anova(dent_reml_toep, dent_reml_cs, test = TRUE)
```
#### CS vs hCS
```{r}
anova(dent_reml_csh, dent_reml_cs, test = TRUE)
```
#### Conclusion
None of the above liklihood ratio tests provided a significant result, and thus compared to the compound symmetry model, the Toeplitz and heterogeneous compound symmetry models do not provide adequate fit (and have more parameters and thus are less parsimonious).
### e
Compare the performance of heterogeneous compound symmetry, heterogeneous autoregressive (1) and heterogeneous Toeplitz models.
The heterogeneous CS and heterogeneous autoregressive models are nested within the heterogeneous toeplitz; however the heterogeneous CS and heterogeneous autoregressive models are not nested in any way. The best way to compare these models is with AIC & BIC (which is reported nicely from the anova function):
```{r}
anova(dent_reml_ar1h, dent_reml_csh, dent_reml_toeph)
```
Therefore we would choose the heterogenous compound symmetry model based on these criteria.
### f
Choose a model for the covariance pattern that adequately fits the data.
We can choose the compound symmetry model, based on the above results. From part c we know that Toeplitz and CS models (homogenous or heterogeneous variance) compare adequately to the unstructure model; from part d we know that the CS model is preffered to Toeplitz and heterogeneous CS becaus of adequate fit and parsimony.
# 1.4
Given the choice of model for the covariance from 1.3.f, and still use the response profile as the mean model, determine whether the pattern of change over time is different for boys and girls.
If we suppose that there is a simple linear relationship, we can express the model in terms of the response (distance in mm) $y_{ij}$:
$$y_{ij} = \beta_0 + \beta_1 x_i + \beta_2 t_{ij} + \beta_{12} x_i t_{ij} + \varepsilon_{ij}$$
Where$x_i$ denotes gender (1 for female, 0 for male), and $t_{ij}$ denotes time.
The null hypothesis that overall pattern of change does not differ between the two groups can be expressed as:
$$H_0: \beta_1 = \beta_{12} = 0$$
We can find the p-value and 95% CI for our parameters with the following commands:
```{r}
dent_final <- gls(distance ~ Gender*age,
data = dent_long,
corr = corCompSymm(form = ~ time | ID), # it does not run if use form = ~ age | ID
#weights = varIdent(form = ~ 1 | age),
method = "REML"
)
```
```{r}
summary(dent_final)
```
```{r}
intervals(dent_final)
```
We can also do a type III test for our null hypothesis:
```{r}
q1 = c(0,1,0,0)
q2 = c(0,0,0,1)
anova(dent_final, L = rbind(q1, q2))
```
## Conclusion
Therefore we can reject $H_0$; there is a significant difference in pattern of change over time for boys and girls.
# 1.5
Given the choice of model for the covariance from 1.3.f, fit a linear trend model, and determine whether the change over time is different for boys and girls. Does the linear trend seem to be adequate to describe the pattern of change in the two groups?
## Change between genders
We can test the difference in linear trend between boys and girls, by testing the following null hypothesis:
$$H_0: \beta_{12} = 0$$
We have the p-value and 95% CI of $\beta_{12}$ from part 1.5; but we can also perform a type III test will test of this hypothesis:
```{r}
s1 = c(0,0,0,1)
anova(dent_final, L = s1)
```
### Conclusion
Therefore we can reject $H_0$; there is a significant difference in change over time for boys compared to girls.
## Adequacy of linear trend
### Quadratic model
We can create a quadratic model with compound symmetry and compare it to the linear model to assess if there may be a need for a higher order model. The quadratic model can be expressed as:
$$y_{ij} = \beta_0 + \beta_1 x_i + \beta_2 t_{ij} + \beta_3 t_{ij}^2 + \beta_{12} x_i t_{ij} + \beta_{13} x_i t_{ij}^2 + \varepsilon_{ij}$$
First creating centralized age and quadratic age variables:
```{r}
dent_long$age_c <- dent_long$age - mean(dent_long$age)
dent_long$age_c_sq <- (dent_long$age_c)^2
```
Creating the model:
```{r}
dent_cs_quad <- gls(distance ~ Gender*age_c + Gender*age_c_sq,
data = dent_long,
corr = corCompSymm(form = ~ time | ID), # it does not run if use form = ~ age | ID
#weights = varIdent(form = ~ 1 | age),
method = "REML"
)
summary(dent_cs_quad)
```
We can test $H_0: \beta_3 = \beta_{13} = 0$ using a type III test:
```{r}
q1 = c(0,0,0,1,0,0)
q2 = c(0,0,0,0,0,1)
anova(dent_cs_quad, L = rbind(q1, q2))
```
Therefore we can reject $H_0$; adding a quadratic term does not improve the model. It is possible that other kinds of models (e.g. splines) may improve the model, but given the above result, and given the linear trends seen in the graphical result they are unlikely to have much benefit over the linear model.
### Linear Splines
We can also consider a linear spline model. The graph of average dental growth suggests that patterns of dental growth may change at age 10; thus we can use $t^* = 10 \; \mbox{years}$.
First we can create the new variable for $t'$:
```{r}
dent_long$a10 <- ifelse(dent_long$age>10, dent_long$age-10, 0)
```
```{r}
dent_cs_spline <- gls(distance ~ Gender*age + Gender*a10,
data = dent_long,
corr = corCompSymm(form = ~ time | ID), # it does not run if use form = ~ age | ID
#weights = varIdent(form = ~ 1 | age),
method = "REML"
)
summary(dent_cs_spline)
```
We can test $H_0: \beta_3 = \beta_{13} = 0$ using a type III test:
```{r}
q1 = c(0,0,0,1,0,0)
q2 = c(0,0,0,0,0,1)
anova(dent_cs_spline, L = rbind(q1, q2))
```
This model also does not perform any better than the linear model.
### Conclusion
Although it is possible that a complex model may offer marginal improvements over the linera model; it is unlikely given that no improvement is seen with quadratic or linear spline models.
# 1.6
Based on results from 1.4 and 1.5, what conclusions can you draw about gender differences in patterns of dental growth?
From part 1.4 we saw an overall difference in dental growth pattern between dental growth in boys and girls; and from part 1.5 we noticed a difference in dental growth over time between boys and girls. The p-values and 95% CIs from part 1.4 showed us that $\beta_1$, the intercept offset for gender, is not significant; whereas $\beta_{12}$, the difference in slope betweeen genders, is significant. Thus the difference in overall patterns of dental growth is driven by change over time.