View source: R/getStartValue.R
getStartValue | R Documentation |
Calculate start values for weightedLikelihood
or weightedDistribution
.
getStartValue(x, distribution, w = rep(1, length(x)), ...)
x |
Numeric vector of the data observations. |
distribution |
String indicating which distribution to use. |
w |
Numeric Vector of weights. This is assumed to be in the same order as |
... |
Currently ignored. |
This function is intended for internal purposes only and is called by weightedLikelihood and weightedDistribution. The function calculates the weighted mean and weighted variance and performs a method of moments approach to obtain start values for the likelihood estimation.
Vector of estimated parameters for the distribution.
x <- rnorm(100,10,5)
getStartValue(x,'norm')
mean(x)
sd(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.