| linbin2stg {missreg} | R Documentation |
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.
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(...), ...)
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. |
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).
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. |
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.
Chris Wild, Yannan Jiang
Description of the missreg Library, Wild and Jiang, 2007.
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)