getStartValue: Calculate the start values to be passed to the optimizer.

View source: R/getStartValue.R

getStartValueR 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 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.

Value

Vector of estimated parameters for the distribution.

Examples


x <- rnorm(100,10,5)

getStartValue(x,'norm')
mean(x)
sd(x)



windAC documentation built on March 31, 2023, 9:30 p.m.

Related to getStartValue in windAC...