Description Usage Arguments Details Value Warnings See Also Examples
moimle()
derives the maximum-likelihood
estimate (MLE) of the MOI parameter (Poisson parameter)
and the lineage (allele) frequencies for each molecular
marker in a dataset. Additionally, the lineage
prevalence counts are derived.
1 |
file |
string or data.frame; if file is a path it
must specify the path to the file to be imported. The
dataset can also be a data.frame object in R. The dataset
must be in standard format (see |
nummtd |
numeric; number of metadata columns (e.g.
date, sample location, etc.) in the dataset (default
value is |
bounds |
numeric vector; a vector of size 2, specifying a lower bound (1st element) and an upper bound (2nd element) for the MOI parameter. The function derives lineage frequency ML estimates by profiling the likelihood function on one of the bounds. For a marker without sign of super-infections, the lower bound is employed. If one allele is contained in every sample, the upper bound is employed. |
moimle()
requires a dataset in standard
format which is free of typos (e.g. incompatible and
unidentified entries). Therefore, users need to
standardize the dataset by employing the
moimport()
function.
If one or more molecular markers contain pathological
data, the ML estimate for the Poisson parameter is
either 0 or does not exist. Both estimates are
meaningless, however, in the former case frequency
estimates exist while they do not in the later. By
setting the option bounds
as a range for MOI
parameter λ. i.e., bounds =
c(<λ_min>, <λ_max>), this
problem is bypassed and the ML estimates are calculated
by profiling at λ_min or λ_max.
If no super-infections are observed at a marker,
moimle()
uses λ_min as the MOI
parameter estimate, λ_max if one lineage is
present in all samples. For regular data, the
profile-likelihood estimate using λ_min or
λ_max is returned depending on whether the
ML estimate falls below λ_min or above
λ_max.
moimle()
returns a nested list, where the
outer elements correspond to molecular markers in the
dataset. The inner elements for each molecular marker
contain the following information:
sample size,
allele prevalence counts,
observed prevalences
log likelihood at MLE,
maximum-likelihood estimate of MOI parameter,
maximum-likelihood estimates of lineage frequencies.
Warnings are issued, if data is
pathological at one or multiple markers. If the option
bounds
is set, but MLE of MOI parameter at a
molecular marker takes a lower or higher value than
λ_min or λ_max respectively, a warning
is generated.
To import and transform data to standard format,
please see the function moimport()
.
1 2 3 | #basic data analysis
infile1 <- system.file("extdata", "testDatamerge1.xlsx", package = "MLMOI")
mle1 <- moimle(infile1, nummtd = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.