Description Usage Arguments Details Value Author(s) Examples
Logistic regression models are usually fitted by iteratively reweighted generalised least squares (GLS). This function formulates a GLS problem by calculating weights and rescaling the response variable such that a logistic regression analysis is approximated. This is equivalent to making a quadratic approximation to the likelihood and to performing a score test.
1 2 3 | gls.approx.logistic(snpdata, leftvar, rightvars = NULL,
outvar = paste(leftvar, "star", sep = ""),
weightvar = "weight")
|
snpdata |
a list with snpinfo and data, see snpdata. |
leftvar |
the name (in |
rightvars |
the names (in |
outvar |
the name (to be added to |
weightvar |
the name (to be added to |
An intercept term is always included and there is currently no way to override this.
The specified model is printed as a check. MLE parameter values are
estimated under the specified model by calling glm
. These are
used to compute weights and a transformed phenotype such that one
iteration of generalised least squares constitutes a score test for
additional terms that might subsequently be added to the model.
This function works on the (usually phenotypic) columns in the
$data
slot of snpdata
.
Returns snpdata
with additional columns for the weights and transformed
phenotype.
The formula used to find an MLE is printed.
Toby Johnson Toby.x.Johnson@gsk.com
1 2 3 4 5 6 | data(mthfrex)
mthfrex <- gls.approx.logistic(mthfrex, "HTN", c("SexC", "Age"))
xtwx <- make.moments2(mthfr.params, c("HTNstar", "SexC", "Age"), mthfrex,
weightvar = "weight")
est.moments2(xtwx, "HTNstar", c("ONE", "rs6668659_T", "rs4846049_T",
"rs1801133_G", "SexC", "Age"), vscale=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.