public Tuple!(T, "shape", T, "scale") generalizedGammaFixedPowerEstimate(T)(
in T power,
in T[] sample)
if(isFloatingPoint!T)
Estimates parameters of the generalized gamma distribution.
Example
import std.range;
import std.random;
import atmosphere.random;
import atmosphere.likelihood;
size_t length = 1000;
auto shape = 2.0, power = 1.4, scale = 2.3;
auto rng = Random(1234);
auto sample = GeneralizedGammaSRNG!double(rng, shape, power, scale).take(length).array;
auto params = generalizedGammaFixedPowerEstimate!double(power, sample);
auto lh0 = generalizedGammaLikelihood(shape, power, scale, sample);
auto lh1 = generalizedGammaLikelihood(params.shape, power, params.scale, sample);
assert(lh0 <= lh1);
public Tuple!(T, "shape", T, "scale") generalizedGammaFixedPowerEstimate(T)(
in T power,
in T[] sample,
in T[] weights)
if(isFloatingPoint!T)
Estimates parameters of the generalized gamma distribution.
Example
import std.range;
import std.random;
import atmosphere.random;
import atmosphere.likelihood;
size_t length = 1000;
auto shape = 2.0, power = 1.4, scale = 2.3;
auto rng = Random(1234);
auto sample = GeneralizedGammaSRNG!double(rng, shape, power, scale).take(length).array;
auto weights = iota(1.0, length + 1.0).array;
auto params = generalizedGammaFixedPowerEstimate!double(power, sample, weights);
auto lh0 = generalizedGammaLikelihood(shape, power, scale, sample, weights);
auto lh1 = generalizedGammaLikelihood(params.shape, power, params.scale, sample, weights);
assert(lh0 <= lh1);
public Tuple!(T, "shape", T, "scale") generalizedGammaFixedPowerEstimate(T)(
in T power,
in GeneralizedGammaFixedPowerStatistic!T stat)
if(isFloatingPoint!T)
Estimates parameters of the generalized gamma distribution.
Functions
generalizedGammaFixedPowerEstimate | Estimates parameters of the generalized gamma distribution. | |
generalizedGammaFixedPowerEstimate | Estimates parameters of the generalized gamma distribution. | |
generalizedGammaFixedPowerEstimate | Estimates parameters of the generalized gamma distribution. |