fitgammamodel {euroformix}R Documentation

fitgammamodel

Description

fitgammamodel is a function to fit sumPH of the observed peak heights to a gamma model

Usage

fitgammamodel(y, x = NULL, DEG = TRUE, niter = 30, delta = 1,
  plott = FALSE, alpha = 0.05, offset = 125, scale = 100)

Arguments

y

a vector of sum peak heights per loci

x

a vector of base pairs

DEG

a boolean of whether degradation (i.e. the bp at x-axis should be considered)

niter

number of random samples

delta

Standard deviation of normal distribution when drawing random startpoints. Default is 1.

plott

a boolean of whether plotting fitted model along with data

alpha

The alpha/2 and 1-alpha/2 percentiles will be plotted if x is provided

offset

a number giving shift of bp in degradation model.

scale

a number giving scaling of shifted bp in degradation model.

Details

This function is used for fitting a gamma regression model

Value

Estimated parameters (mean,coefVar,slopePara)

Author(s)

Oyvind Bleka

Examples

th = c(1000,0.8,0.6)
n = 100 #number of samples
x = seq(10,300,l=n)
y = rgamma(n,shape=2/th[2]^2*th[3]^((x-125)/100),scale=th[1]*th[2]^2)
fitgammamodel(y,x,DEG=TRUE,niter=10,plott=TRUE,alpha=0.05)
fitgammamodel(y,x,DEG=FALSE,niter=10,plott=TRUE,alpha=0.05)

[Package euroformix version 1.11.3 Index]