qls                 package:qlspack                 R Documentation

_F_i_t _Q_u_a_s_i _L_e_a_s_t _S_q_u_a_r_e_s (_Q_L_S) _E_s_t_i_m_a_t_i_n_g _E_q_u_a_t_i_o_n_s

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

     The qls function fits quasi least square estimating equations
     based on the geeglm function in the geepack and cor.estimate
     funcion in the qlspack. qls has a syntax similar to glm and
     returns an object similar to a glm object. An important feature of
     qls, is that an anova method exists for these models.

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

     qls(formula, data, id, family = "gaussian",
     time = NULL, correlation = "ar1", std.err = "san.se")

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

 formula: The model to be fitted. The form is similar to the item
          documentated in 'geeglm'.  

    data: A data frame containing the variables in the model. 

      id: a vector which identifies the clusters.  The length of `id'
          should be the same as the number of observations.  Data are
          assumed to be sorted so that observations on a cluster are
          contiguous rows for all entities in the formula. The 'id's
          for different clusters should be different, but need not to
          be consecutive. 

  family: A character string describing the error distribution and link
          function to be used in the model. There are three options:
          "guassian", "binomial" and "poisson". The default option is
          "guassian". 

    time: a vector which identifies the time in the clusters. The
          length of 'time' should be the same as the number of
          observations. This argument is used if and only if
          'correlation == "markov"'. 

correlation: a character string specifying the correlation structure.
          The following are permitted: '"ar1"', '"exchangeable"',
          '"markov"', '"tridiagonal"', '"fam"' and '"ex.fam"'. 

 std.err: See corresponding documentation to 'geeglm'. 

_V_a_l_u_e:

     An object of type 'qlsglm'.

_W_a_r_n_i_n_g:

     qls has not been thoroughly tested. Please report bugs.

_N_o_t_e:

     qls only works for complete data. Thus if there are NA's in data
     you can specify data=na.omit(mydata).

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

     Jichun Xie, jichun@mail.med.upenn.edu

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

     Chaganty, N. R. 1997. An alternative approach to the analysis of
     longitudinal data via generalized estimating equations. _Journal
     of Statistical Planning and Inference_ *63*: 39-54.

     Xie, J. and Shults, J. 2009. Implementation of quasi-least squares
     With the R package qlspack. _UPenn Biostatistics Working Papers_
     *32*. http://biostats.bepress.com/upennbiostat/papers/art32 

     Shults, J. 1996. The analysis of unbalanced and unequally spaced
     longitudinal data using quasi-least squares. Ph.D. Thesis,
     Department of Mathematics and Statistics, Old Dominion University:
     Norfolk, Virginia.

     Shults, J. and Chaganty, N.R. 1998. Analysis of serially
     correlated data using quasi-least squares. _Biometrics_ *54*:
     1622-1630.

     Chaganty, N.R. and Shults, J. 1999. On eliminating the asymptotic
     bias in the quasi-least squares estimate of the correlation
     parameter. _Journal of Statistical Planning and Inference_ *76*:
     127-144.

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

     'glm'

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

     require(qlspack)
     data(rat)
     qlsfit.fam <- qls(bp ~ time + as.factor(group), data = rat, id = rat$id,
               time = rat$time, correlation = "fam")
     summary(qlsfit.fam)

