sim_dauer: sim_dauer

Description Usage Arguments Examples

View source: R/sim_dauer.R

Description

simulate balanced dauer assay data using 3 groups of strains I, A and B. Simulation uses day-to-day and plate-to-plate variance. Can be used to simulate any binomial data with hierarchical clusters.

Usage

1
sim_dauer(settings)

Arguments

settings

input list of settings for the simulation. Must be a list. settings$I #population control intercept (in logit) settings$nP # number of plates settings$nD # number of days settings$sP # plate to plate sd settings$sD # day to day sd settings$sG # genotype sd due to culture history (logit) settings$k # number animal per plate) settings$A # population A intercept (expt) settings$B # pop B intercept

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
settings <- list(settings <- list(
I = 0 #population control intercept (in logit). 0 = p(0.5)
,nP = 6 # number of plates
,nD = 3 # number of days
,sP = 0.1 # plate to plate variance (0.3)
,sD = 0.5 # day to day variance (0.2)
,sG = 0.5 # genotype variance due to culture history (logit) (0.2)
,k = 60 # number animal per plate)
,A = 0 # population A intercept (expt - genotype2)
,B = 0 #pop B intercept (expt - genotype2)
))


sim_dauer(settings = c(settings, do.plot = TRUE))

simulation <- sim_dauer(settings = c(settings, do.plot = FALSE, do.stan = TRUE))

mikeod38/dauergut documentation built on April 26, 2018, 4:15 p.m.