cdf_trim | R Documentation |
Evaluate the cdf of a trimmed distribution.
cdf_trim(d, x, trim = c(-Inf, Inf), doTrunc = FALSE)
d |
distributions3 object |
x |
Numeric vector, values at which the cdf is evaluated |
trim |
Numeric vector of size 2, trimming bounds. |
doTrunc |
Logical, do truncation? default FALSE, i.e. rectification is used. |
a numeric vector containing the cdf values.
# Define Normal distribution
norm <- Normal(mu=0.75,sigma=0.5)
# Define a grid of values x
x=seq(-1,2,,100)
# Compare cdf of basic / rectified / truncated Gaussian distributions
y0=cdf_trim(norm,x)
yr=cdf_trim(norm,x,trim=c(0,1))
yt=cdf_trim(norm,x,trim=c(0,1),doTrunc=TRUE)
plot(x,y0,type='l',ylim=c(0,1))
points(x,yr,col='red')
points(x,yt,col='blue',pch=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.