Description Usage Arguments Details Value Examples
This function allows to compare model behaviour and statistics for different developmental pathways in B cell compartment using data from BuChi.
1 | neutral_func(par_pop, pop_interest, params, mod_diag = NULL)
|
par_pop |
column name of the parent population (chracter string e.g. 'SP_T1' or 'LN_FM') |
pop_interest |
column name of the population of interest (chracter string e.g. 'SP_T1' or 'LN_GC') |
params |
a vector containing initial parameter values in order c(N0, fd0, theta0, lambda) |
mod_diag |
Boolean. If TRUE returns residual and QQ plots. By default FALSE. |
The basic model is as follws:
X'(t) = θ(t) - λ X(t)
Neutral model assumes 'homogeneity' in the population of interest considering that all the subsets turnover with a constant, identical rate. Neutral_func solves the system of linear first order ODEs for displaceable donor and host population and fits the 'Neutral model' to the cell counts and normalised donor fractions. Influx of cells from parent population (θ) changes exponentially with time (mouse age) with the rate ν.
θ(t) = θ_0 e^-ν t
Needs the dataframes for Spleen and LN counts in the directory. Data is fitted using Nealder-Mead algorithm in optim. Currently only fits on log transformed cell counts and untransformed donor fractions. 95% CI is generated using hessian matrix in optim (not by bootstrapping). if mod_diag is set to TRUE, the function will validate whether the best-fit model is behaving normally and is following the basic assumptions of least-square method.
AIC value for statistical comparison
a dataframe containing parameter values with 95% CI
plot1 - spline fitted to parent population using linear regression on log cell counts.
plot2 - Nutral model fitted to cell counts
plot3 - Neutral model fitted to donor fractions
plot4 - returns residual and QQ plots in a single page (only if mod_diag == TRUE)
1 | neutral_func(compartment= 'Spleen', par_pop = 'SP_T1', pop_interest = 'SP_FM', params = c(7,0.1,5,0.01), mod_diag = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.