getStartValue {windAC} | R Documentation |
Calculate the start values to be passed to the optimizer.
Description
Calculate start values for weightedLikelihood
or weightedDistribution
.
Usage
getStartValue(x, distribution, w = rep(1, length(x)), ...)
Arguments
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. |
Details
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.
Value
Vector of estimated parameters for the distribution.
Examples
x <- rnorm(100,10,5)
getStartValue(x,'norm')
mean(x)
sd(x)
[Package windAC version 1.2.10 Index]