fitz {hyperdirichlet} | R Documentation |
Hyperdirichlet distribution corresponding to a dataset of Fitzmaurice et al
fitz(dat , include.missing=TRUE , validated=NULL)
dat |
A vector corresponding to either male or female data |
include.missing |
Boolean, with default TRUE meaning to
return the likelihood function for the data including the missing
cases, and FALSE meaning to include only the data
corresponding to complete cases |
validated |
Boolean, with TRUE meaning to omit the checks
(OK if all elements of dat are non-negative) and FALSE meaning
to check them all (time-consuming) |
Fitzmaurice considered childhood obesity. See the reference for further details.
Returns a hyperdirichlet distribution (without normalizing factor) corresponding to the observations, either male or female, made by Fitzmaurice et al.
Pat Altham originally spotted that this dataset could be represented using the hyperdirichlet distribution.
The functional form for replacement “[<-
()” is used
because it is possible to set the validated
argument to
TRUE
: this suppresses the computationally intensive checking
that the distribution is proper.
warning. Setting validated
to TRUE
is not
recommended in general. It is OK here because the function knows that
no elements of dat
is negative.
Robin K. S. Hankin
G. M. Fitzmaurice, N. M. Laird, and S. R. Lipsitz 1994. “Analysing incomplete longitudinal binary responses: a likelihood-based approach”. Biometrics, volume 50, pp601-612.
boys <- c(20,7,9,8, 8, 8,15,150,13,3,2,42,3,1, 6,16,11,1,3,38,14,55,4,33,7,45) girls <- c(21,6,6,2,19,13,14,154, 8,1,4,47,4,0,16, 3,11,1,3,25,13,39,5,23,7,47) male <- fitz(boys) maximum_likelihood(male)