func_fraserSuzuki: Calculate Fraser-Suzuki Peak Model

Description Usage Arguments Value Examples

View source: R/PeakFunctions_func_fraserSuzuki.R

Description

Calculates either a probability density function using the Fraser-Suzuki model with an integrated area of 1 or a peak with amplitude k

Usage

1
func_fraserSuzuki(x, mu, sigma, a, probDensity = TRUE, k)

Arguments

x

a vector of x-coordinates from which the corrisponding y-coordinates are calculated

mu

location of apex

sigma

the standard deviation

a

parameter controling tailing. If a > 0, model produces peak tails. If a < 0, model produces fronting peaks

probDensity

Should the function produce a probability density function 'TRUE' or a gaussian peak 'FALSE' with amplitude k? default is 'TRUE'.

k

Amplitude of the peak. Only used when 'probDensity == FALSE'

Value

a vector of y-coordinates the same length as x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Probability Density
xVec <- seq(from = 1, to = 100, by = 0.1)
pdensity <- func_fraserSuzuki(x = xVec, mu = 10, sigma = 1, a = 1, probDensity = TRUE)
p1 <- plot(x = xVec, y = pdensity)

#Fraser-Suzuki peak
gpeak <- func_fraserSuzuki(x = xVec, mu = 10, sigma = 1, a = -1, probDensity = TRUE)
p2 <- plot(x = xVec, y = gpeak)

#See also: dnorm()

pmbrophy/SummitR documentation built on May 20, 2020, 12:36 a.m.