pdf_gaussmodel {dsdp} | R Documentation |
Probability density function of Gaussian-based model
Description
A probability density function(PDF) of a Gaussian model.
It is an underlying routine for plot.gaussmodel
to compute the values
of PDF.
To access parameters and coefficients in an object gmodel
of a class gaussmodel
, use gmodel$result[k, "mu1"]
,
gmodel$result[k, "sig1"]
, gmodel$coeffs[[k]]
for some index k
.
This index appears in the leftmost column of estimation table generated by
summary(gmodel)
.
Usage
pdf_gaussmodel(coeff, mu, sig, x)
Arguments
coeff |
A coefficient vector in increasing order of degrees; the first element is 0th degree, ..., and last element is the largest degree of coefficients. |
mu |
A mean of Gaussian distribution. |
sig |
A standard deviation of Gaussian distribution, which is positive. |
x |
A numeric input vector. |
Value
A numeric vector of PDF of Gaussian-based distribution.
See Also
gaussmodel()
summary.gaussmodel()
estimate.gaussmodel()
func.gaussmodel()
plot.gaussmodel()
cdf_gaussmodel()
Examples
## Create an object of `gaussmodel`
gmodel <- gaussmodel(mix2gauss$n200)
## Estimate with a degree 6, a mean 0, and standard deviations 0.5
gmodel <- estimate(gmodel, 6, 0, 0.5)
## Input vector
x <- seq(-3, 3, 0.1)
## Output of PDF in above estimation
yv <- pdf_gaussmodel(gmodel$coeffs[[1]], gmodel$result[1, "mu1"],
gmodel$result[1, "sig1"], x)