model_bam_standards {spiky} | R Documentation

## Build a Bayesian additive model from spike-ins to correct bias in *-seq

### Description

Build a Bayesian additive model from spike-ins to correct bias in *-seq

### Usage

    model_bam_standards(x, conc = NULL, fm = NULL, ...)

### Arguments

`x` | data with assorted feature information (GCfrac, CpGs, etc)
`conc` | concentration for each spike (must be provided!)
`fm` | model formula (conc ~ read_count + fraglen + GCfrac + CpGs_3)
`...` | other arguments to pass to `bamlss`

### Value

       the model fit for the data

### Examples

    library(bamlss)
    data(spike_cram_counts,package="spiky")
    data(spike,package="spiky")
    scc <- add_frag_info(spike_cram_counts, spike=spike)
    scc$conc <- scc$conc * 0.9 # adjust for dilution
    scc$CpGs_3 <- scc$CpGs ^ (1/3)
    fit0 <- model_bam_standards(scc,
                                fm=conc ~ read_count + fraglen)
    fit1 <- model_bam_standards(scc,
                                fm=conc ~ read_count + fraglen + GCfrac + CpGs_3)
    DIC(fit0, fit1)

[Package spiky version 1.0.0 Index]