linbin2stg              package:missreg              R Documentation

_E_s_t_i_m_a_t_e _b_i_n_a_r_y-_l_o_g_i_s_t_i_c _p_a_r_a_m_e_t_e_r_s _a_n_d _o_d_d_s _r_a_t_i_o_s _u_s_i_n_g _l_i_n_e_a_r _r_e_g_r_e_s_s_i_o_n _w_i_t_h _a _s_i_n_g_l_e _c_o_n_t_i_n_u_o_u_s _Y-_v_a_r_i_a_b_l_e _f_o_r _t_w_o-_p_h_a_s_e _s_a_m_p_l_e_d _d_a_t_a.

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

     Fit location-scale model of the form 'Y = eta + sigma*error' to
     data with a single continuous Y-variable and two-phase missingness
     structure, and convert to binary-logistic parameters and
     odds-ratio estimates with appropriate cut-points of Y.

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

     linbin2stg(formula1, yCuts, lower.tail = TRUE, weights = NULL, 
             xstrata = NULL, data = list(), obstype.name = "obstype", 
             fit = TRUE, xs.includes = FALSE, compactX = FALSE, 
             start = NULL, Qstart = NULL, deltastart = NULL, 
             int.rescale = TRUE, control = mlefn.control(...), 
             control.inner = mlefn.control.inner(...), ...)

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

formula1: A symbolic description of the location model to be fitted,
          i.e. eta.

   yCuts: Cutpoint(s) used to define the binary Y-variable for logistic
          regression. Can be a matrix form (1*S) with S the number of
          xstrata.

lower.tail: If TRUE, define the cases being '{Y <= yCuts}'.

 weights: An optional vector of weights to be used in the fitting
          process. Should be 'NULL' or a numeric vector.

 xstrata: Specify names of the stratification variables to be used,
          e.g. '"vname"' or 'c("vname1","vname2",...)'. Strata are
          defined by cross-classification of all levels.

    data: A data frame containing all the variables required for
          analysis, including those for 'xstrata' and 'obstype.name'.

obstype.name: Name of the variable specifying labels for observations
          by sampling and variable type: '"uncond"', '"retro"',
          '"xonly"', '"y|x"' or '"strata"'.

     fit: If 'FALSE', only stratum report will be generated without
          model fitting.

xs.includes: 'TRUE' if weights specified for observations labelled as
          '"strata"' include those observed at the second phase (i.e.
          '"retro"' or '"uncond"' observations).

compactX: If 'TRUE', compress X matrix to distinct values with counts
          before model fitting. 

   start: Starting values for the regression parameters. Can be
          compusory if the program cannot produce a valid starting
          value at some situations.

  Qstart: An optional starting matrix for Pr(Ystratum=i|Xstratum=j).
          Can be compulsory if the program cannot produce a valid
          starting value at some situations.

deltastart: An optional starting matrix for Pr(X=xk|Xstratum=j).

int.rescale: If 'TRUE', all X-variables will be standardised first
          before fitted in the model.

 control: Specify control parameters for the iterations in 'mlefn'
          call. See 'mlefn' for details.

control.inner: Specify control parameters for inner iterations nested
          within 'mlefn' call. See 'mlefn' for details.

     ...: Further arguments passed to or from related functions.

_D_e_t_a_i_l_s:

     This function is a simple application of 'locsc2stg' fitting
     linear regression models with a continuous Y using logistic error
     distribution. The results are then converted to much more
     efficient inferences about the same odds-ratio parameters being
     estimated by the logistic regression with the dichotomized binary
     outcome (case-control).  

      More detailed descriptions of this function can be found in 
     "Description of the 'missreg' Library" (Wild and Jiang).

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

missReport: Matrix containing information on deleted records with
          missing observations.

StrReport: Cross tabulation of counts for different levels of 'obstype'
          and Y-values by X-strata.

xStrReport: Cross tabulation of counts for 'obstype' by X-strata when
          'obstype="xonly"'.

     key: Specify detailed classification for each of the X-strata.

yCutsKey: Specify the cutoff intervals for defined Y-strata within each
          X-stratum.

     fit: 'TRUE' or 'FALSE' as its argument.

   error: The error messages returned by 'mlefn' call. Non-zero values
          indicate an unsuccessful fit.

coefficients: Linear regression coefficients.

   loglk: Log-likelihood returned from final 'mlefn' call.

   score: Score vector returned from final 'mlefn' call.

     inf: Observed information matrix returned from final 'mlefn' call.

  fitted: The fitted values of Y obtained from the model.

     cov: The asymptotic covariance matrix (inverse of the informnation
          matrix) of linear parameter estimates.

     cor: The asymptotic correlation matrix of linear parameter
          estimates.

bcoefficients: Binary regression coefficients converted from linear
          parameters.

    bcov: The asymptotic variance of binary parameter estimates.

_N_o_t_e:

     The function 'summary.linbin2stg' provides a complete summary of
     the regression results including the Wald tests and a regression
     panel for linear coefficients, a regression panel for binary
     coefficients, and associated odds-ratio estimates and confidence
     intervals.  All related output functions ('print.linbin2stg',
     'summary.linbin2stg' and 'print.summary.linbin2stg') don't have 
     help files provided at the moment. 

      Also note that the intercept of binary coefficients will not be
     available when more than one cut-point of Y is used, e.g.
     different for each x-stratum.

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

     Chris Wild, Yannan Jiang

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

     Description of the 'missreg' Library, Wild and Jiang, 2007.

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

     'locsc2stg'

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

     data(lowbirth.ls)
     lowbirth.ls$sex.age <- interaction(lowbirth.ls$sex,lowbirth.ls$gest)
     yCuts <- matrix(c(2550,2650,2740,2840,2900,3010,3030,3140),nrow=1)
     yCut1 <- mean(yCuts)
      
     ### Multiple yCuts;
     z1 <- linbin2stg(birthwt~gest+mumht+bmi+ethnicdb+hyper+smoke, 
                       yCuts=yCuts, xstrata=c("sex.age"), data=lowbirth.ls, 
                       obstype.name=c("instudy"), xs.includes=FALSE)

     summary(z1)

     ### Single yCut;
     z2 <- linbin2stg(birthwt~gest+mumht+bmi+ethnicdb+hyper+smoke, 
                       yCuts=yCut1, xstrata=c("sex.age"), data=lowbirth.ls, 
                       obstype.name=c("instudy"), xs.includes=FALSE)

     summary(z2) 
       

