sim_dauer_biased: sim_dauer_biased

Description Usage Arguments Examples

View source: R/sim_dauer_biased.R

Description

simulate unbalanced 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. Contains nested function gen.dauer.data which is specific for unbalanced.data.

Usage

1
sim_dauer_biased(settings)

Arguments

settings

input list of settings for the simulation. See sim_dauer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
settings <- list(settings <- list(
I = 0 #population control intercept (in logit). 0 = p(0.5)
,nP = 12 # number of plates in total (for group I) min = 12
,nD = 6 # number of days (some will be randomly missing) min = 6
,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)
))

### to plot one simulation
sim_dauer_biased(settings = c(settings, do.plot = TRUE)) 

### to simulate and perform model tests once - see scripts/sim_dauer_data.r for multiple simulations
simulation <- sim_dauer_unbal(settings = c(settings, do.plot = FALSE, do.stan = TRUE))

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