View source: R/fitgammamodel.R
fitgammamodel | R Documentation |
A function to fit sumPH of the observed peak heights to a gamma model
fitgammamodel(
y,
x = NULL,
niter = 10,
delta = 1,
plott = FALSE,
alpha = 0.05,
offset = 125,
scale = 100,
restrictDeg = TRUE
)
y |
Vector with sum peak heights (per loci) |
x |
Vector with fragment lengths (base pair) (only provided for degradation) |
niter |
Number of random samples |
delta |
Standard deviation of normal distribution when drawing random startpoints. Default is 1. |
plott |
Whether plotting fitted model along with data |
alpha |
The alpha/2 and 1-alpha/2 percentiles will be plotted if x is provided |
offset |
The shift of bp in degradation model. |
scale |
The scaling of shifted bp in degradation model |
restrictDeg |
Whether to restrict degradation param to be less than 1 |
This function is used for fitting a gamma regression model
Estimated parameters (mean,coefVar,slopePara)
Oyvind Bleka
## Not run:
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,plott=TRUE,alpha=0.05)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.