Determining normalizing constant for Weibull distribution I am fitting a Weibull distribution to some data in Stan. I am trying to reproduce some published values of parameters from a paper. However I am running into problems because I believe the normalizing constant does not match. The paper gives the pdf equation as follows:
$p(x|\mu,\nu) = \frac{1}{K} (\frac{x}{\nu})^{\mu - 1} exp(-(\frac{x}{\nu})^{\mu})$
However the Weibull pdf in Stan is:
$p(x|\mu,\nu) = \frac{\mu}{\nu} (\frac{x}{\nu})^{\mu - 1} exp(-(\frac{x}{\nu})^{\mu})$
When I fit the distribution to the same data as the paper, I get different fitted values for the shape and scale parameters ($\mu$ and $\nu$) than the ones in the paper, but the paper gives no indication of how to find the normalizing constant K. Is there a way to determine the correct value for the constant so that I can get the correct values of shape and scale parameters?
Here is the (very simple) Stan model I fit:
data {
    int<lower=0> N;
    vector<lower=0>[N] x;
}

parameters {
    // Weibull density
    real<lower=0> mu;
    real<lower=0> nu;
}

model {
    // Priors: Weibull density
    mu ~ lognormal(1, 1);
    nu ~ lognormal(1, 1);

    // Likelihood: Weibull density
    x ~ weibull(mu, nu);
}

 A: Perhaps the answer you are looking for is to change your likelihood statement to
for (i in 1:N) x[i] ~ weibull(mu, nu) T[L, ];

where L is the lower truncation point. But you should not actually do it that way. Stan arrives at that answer by subtracting the logarithm of the complimentary CDF evaluated at L. Thus, it is equivalent (and faster) to write
target += weibull_lpdf(x | mu, nu) - N * weibull_lccdf(L | mu, nu);

presuming that L is a scalar truncation point that applies to all N observations. Chapter 12 of the Stan User Manual has more examples.
If you actually want to see the math, you can use the Mathematica syntax
PowerExpand[Log[FullSimplify[ PDF[WeibullDistribution[\[Mu],\[Nu]], x] / (1 - CDF[WeibullDistribution[\[Mu],\[Nu]], L]), Assumptions->{x>0, L>0}]]]

which evaluates to
(L^\[Mu]-x^\[Mu]) \[Nu]^-\[Mu]-Log[x]+Log[\[Mu]]+\[Mu] (Log[x]-Log[\[Nu]])

A: If you can get easy access to it the book The Weibull Distribution: A Handbook by Horst Rinne covers the general three parameter Weibull down to the one. There is also a section on the truncated Weibull distributions. You may want to consult it for how different parameterizations are derived.
