getStartValue: 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)), ...)
Value
Vector of estimated parameters for the distribution.
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 x. Default is a vector of ones the same length as x.
...
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.