You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functions {
marchenko_pastur_pdf(real x, real Q, real sigma) {
real q =inv_sqrt(Q);
real b =square(sigma * (1+ q)) # Largest eigenvaluereal a =square(sigma * (1- q)) # Smallest eigenvalueif (x > b || x < a) return0;
elsereturn ( Q *sqrt((b - x) * (x - a)) ) / ( 2*pi() *square(sigma) * x );
}
marchenko_pastur_lpdf(real x, real Q, real sigma) {
real q =inv_sqrt(Q);
real b =square(sigma * (1+ q)) # Largest eigenvaluereal a =square(sigma * (1- q)) # Smallest eigenvalueif (x > b || x < a) returnnegative_infinity();
elsereturnlog(Q) +0.5* ( (b - x) * (x - a) ) -2* sigma -log(x); // -log(2) - log(pi()) constants removed
}
marchenko_pastur_cdf(real x, real Q, real sigma) {
real b =square(sigma * (1+ q)) # Largest eigenvaluereal a =square(sigma * (1- q)) # Smallest eigenvaluereal R = (b - x) * (x - a);
returnsqrt(R) +0.5* (a + b) *asin( (2* x - a - b) / (b - a) ) -
( a * b /sqrt(a * b) ) *asin( (a + b) * x - (2* a * b) / (x * (b - a)) );
}
}
The text was updated successfully, but these errors were encountered:
Also see https://www.wolframalpha.com/input/?i=MarchenkoPasturDistribution
https://github.com/JuliaStats/Distributions.jl/pull/1288/files
The text was updated successfully, but these errors were encountered: