fitGamma {xoi} | R Documentation |
Fit Gamma model
Description
Fit the gamma model for crossover interference to data on crossover locations.
Usage
fitGamma(
d,
censor = NULL,
nu = NULL,
lo = NULL,
hi = NULL,
se = FALSE,
supint = FALSE,
rescale = FALSE,
drop = 1.5,
tol = 0.00001,
maxit = 1000,
max.conv = 25,
integr.tol = 0.00000001,
max.subd = 1000,
min.subd = 10,
h = 0.1,
hstep = 1.5
)
Arguments
d |
A vector of inter-crossover distances in cM. This should include distances from start of chromosome to first crossover, last crossover to end of chromosome, and chromosome length, if there are no crossovers. Alternatively, this may be a matrix with the first column being the
distances and second column being the censoring types ( |
censor |
A vector of the same length as |
nu |
A vector of interference parameters ( |
lo |
If |
hi |
If |
se |
If TRUE and |
supint |
If TRUE and |
rescale |
If TRUE and |
drop |
If |
tol |
Tolerance for converence to calculate the likelihood, SE, and likelihood support interval. |
maxit |
Maximum number of iterations in estimating the SE and likelihood support interval. |
max.conv |
Maximum limit for summation in the convolutions to get inter-crossover distance distribution from the inter-chiasma distance distributions. This should be greater than the maximum number of chiasmata on the 4-strand bundle. |
integr.tol |
Tolerance for convergence of numerical integration. |
max.subd |
Maximum number of subdivisions in numerical integration. |
min.subd |
Minimum number of subdivisions in numerical integration. |
h |
Step used in estimating the second derivative of the log likelihood. |
hstep |
factor by which |
Details
See Broman and Weber (2000) for details of the method.
We use R's stats::integrate()
function for numerical integrals,
stats::optimize()
for optimizing the likelihood, and
stats::uniroot()
for identifying the endpoints of the likelihood
support interval.
Value
If nu
is specified, we return a data frame with two columns:
nu
and the corresponding log (base e) likelihood. If
rescale=TRUE
, the maximum log likelihood is subtracted off, so that
its maximum is at 0.
If lo
and hi
is specified, the output contains a single row
with the MLE of \nu
and the corresponding log likelihood. If
se=TRUE
, we also include the estimated SE. If supint=TRUE
, we
include two additional rows with the lower and upper limits of the
likelihood support interval.
Author(s)
Karl W Broman, broman@wisc.edu
References
Broman, K. W. and Weber, J. L. (2000) Characterization of human crossover interference. Am. J. Hum. Genet. 66, 1911–1926.
Broman, K. W., Rowe, L. B., Churchill, G. A. and Paigen, K. (2002) Crossover interference in the mouse. Genetics 160, 1123–1131.
McPeek, M. S. and Speed, T. P. (1995) Modeling interference in genetic recombination. Genetics 139, 1031–1044.
See Also
Examples
data(bssbsb)
xodist <- convertxoloc(find.breaks(bssbsb, chr=1))
# plot a rough log likelihood curve
## Not run: out <- fitGamma(xodist, nu=seq(1, 19, by=2))
plot(out, type="l", lwd=2)
# get MLE
## Not run: mle <- fitGamma(xodist, lo=8, hi=12)
mle
abline(v=mle[1], h=mle[2], col="blue", lty=2)
# get MLE and SE
## Not run: mle <- fitGamma(xodist, lo=9.5, hi=10.5, se=TRUE)
mle
# get MLE and 10^1.5 support interval
## Not run: int <- fitGamma(xodist, lo=1, hi=20, supint=TRUE)
int
abline(v=mle[2:3,1], h=mle[2:3,2], col="red", lty=2)