seizure               package:flexmix               R Documentation

_E_p_i_l_e_p_t_i_c _S_e_i_z_u_r_e _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Data from a clinical trial where the effect of intravenous
     gamma-globulin on suppression of epileptic seizures is studied.
     There are daily observations for a period of 140 days on one
     patient,  where the first 27 days are a baseline period without
     treatment, the remaining 113 days are the treatment period.

_U_s_a_g_e:

     data(seizure)

_F_o_r_m_a_t:

     A data frame with 140 observations on the following 4 variables.

     _S_e_i_z_u_r_e_s a numeric vector, daily counts of epileptic seizures

     _H_o_u_r_s a numeric vector, hours of daily parental observation

     _T_r_e_a_t_m_e_n_t a factor with levels 'No' and 'Yes'

     _D_a_y a numeric vector

_S_o_u_r_c_e:

     P. Wang, M. Puterman, I. Cockburn, and N. Le (1996): Mixed poisson
     regression models with covariate dependent rates. Biometrics 52,
     pages 381-400.

_R_e_f_e_r_e_n_c_e_s:

     B. Grn and F. Leisch (2004): Bootstrapping finite mixture models.
     In J. Antoch, editor, Compstat 2004 - Proceedings in Computational
     Statistics, pages 1115-1122. Physika Verlag, Heidelberg, Germany,
     ISBN 3-7908-1554-3.

_E_x_a_m_p_l_e_s:

     data(seizure)
     plot(Seizures/Hours~Day, col=as.integer(Treatment),
          pch=as.integer(Treatment), data=seizure)
     abline(v=27.5, lty=2, col="grey")
     legend(140, 9, c("Baseline", "Treatment"),
            pch=1:2, col=1:2, xjust=1, yjust=1)

     set.seed(123)

     ## The model presented in the Wang et al paper: two components for
     ## "good" and "bad" days, respectively, each a Poisson GLM with hours of
     ## parental observation as offset

     seizMix <- flexmix(Seizures~Treatment*log(Day),
                        data=seizure, k=2,
                        model=FLXglm(family="poisson", offset=log(seizure$Hours)))

     summary(seizMix)
     summary(refit(seizMix))

     matplot(seizure$Day, fitted(seizMix)/seizure$Hours, type="l",
             add=TRUE, col=3:4)

