MleCslogistic           package:cslogistic           R Documentation

_P_e_r_f_o_r_m _a _M_a_x_i_m_u_m _L_i_k_e_l_i_h_o_o_d _A_n_a_l_y_s_i_s _o_f _a _c_o_n_d_i_t_i_o_n_a_l_l_y _s_p_e_c_i_f_i_e_d _l_o_g_i_s_t_i_c _r_e_g_r_e_s_s_i_o_n _m_o_d_e_l

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

     Fit a conditional specified logistic regression model for
     multivariate binary responses.

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

     MleCslogistic(formula,type = TRUE, intercept = TRUE, method = "BFGS",
                maxiter=1000 , data, ...)

_A_r_g_u_m_e_n_t_s:

 formula: a symbolic description of the model to be fit.

    type: logical variable indicating if covariates have the same
          effect 'TRUE' or different  effect 'FALSE' for each variable.

intercept: logical variable indicating if only the intercept 'TRUE' or
          all the covariates  have different effect 'FALSE' for each
          variable. The option 'type' must be 'FALSE'.

  method: the optimization method to be used; the default method is
          "BFGS".

 maxiter: maximum number of iterations used by the optimization method.

    data: an optional data frame containing the variables in the model.
          If not found in 'data', the variables are taken from
          'environment(formula)', typically the environment from which
          'cslogistic' is called..

     ...: further arguments to be passed.

_A_u_t_h_o_r(_s):

     Alejandro Jara Vallejos Alejandro.JaraVallejos@med.kuleuven.be

     Maria Jose Garcia-Zattera MariaJose.GarciaZattera@med.kuleuven.be

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

     Garcia-Zattera, M. J., Jara, A., Lesaffre, E. and Declerck, D.
     (2005). On conditional  independence for multivariate binary data
     in caries research. In preparation.

     Joe, H. and Liu, Y. (1996). A model for multivariate response with
     covariates based on  compatible conditionally specified logistic
     regressions. Satistics & Probability Letters  31: 113-120.

_S_e_e _A_l_s_o:

     'cslogistic', 'BayesCslogistic'.

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

     # simulated data set

     library(mvtnorm)

     n<-400
     mu1<-c(-1.5,-0.5)
     Sigma1<-matrix(c(1, -0.175,-0.175,1),ncol=2)
     age<-as.vector(sample(seq(5,6,0.1),n,replace=TRUE))
     beta1<-0.2

     z<-rmvnorm(n,mu1,Sigma1)
     zz<-cbind(z[,1]+beta1*age,z[,2]+beta1*age)
     datos<-cbind(zz[,1]>0,zz[,2]>0,age)
     colnames(datos)<-c("y1","y2","age")
     data0<-data.frame(datos)
     attach(data0)

     # equal effect of age for all the covariates

     y<-cbind(y1,y2)

     fit0<-MleCslogistic(y~age)
     fit0
     summary(fit0)

     # different effects: only intercept

     fit1<-MleCslogistic(y~age,type=FALSE)
     fit1
     summary(fit1)

     # different effects: all the covariates

     fit2<-MleCslogistic(y~age,type=FALSE,intercept=FALSE)
     fit2
     summary(fit2)

