# Statistics

**URL:** https://discourse.julialang.org/c/domain/stats/12.md?page=5

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 6

---

## [Testing whether data come from a Generalized Pareto Distribution](https://discourse.julialang.org/t/testing-whether-data-come-from-a-generalized-pareto-distribution/102008)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 6\
**Last updated:** [July 25, 2023, 8:17am UTC](https://discourse.julialang.org/t/testing-whether-data-come-from-a-generalized-pareto-distribution/102008 "2023-07-25T08:17:00Z")

</div>

Hi all, I am trying to perform a hypothesis test of whether some observed data X are coming from a Generalized Pareto Distribution or not. Naturally, tests from HypothesisTests.jl like the Kolmogorov Smirnov or the Ande…

---

## [Bayesian inference in a subset of parameters using Turing.jl](https://discourse.julialang.org/t/bayesian-inference-in-a-subset-of-parameters-using-turing-jl/101944)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 5\
**Last updated:** [July 25, 2023, 3:30am UTC](https://discourse.julialang.org/t/bayesian-inference-in-a-subset-of-parameters-using-turing-jl/101944 "2023-07-25T03:30:45Z")

</div>

Hi everyone. I am working on a large system of ODEs with ~100 parameters. I identified the sensitive parameters with Sobol method, and I would be interested in performing Bayesian inference on them, while keeping the non…

---

## [How can I substitute NaN in a GLM model with zeroes?](https://discourse.julialang.org/t/how-can-i-substitute-nan-in-a-glm-model-with-zeroes/102038)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 0\
**Last updated:** [July 24, 2023, 7:44pm UTC](https://discourse.julialang.org/t/how-can-i-substitute-nan-in-a-glm-model-with-zeroes/102038 "2023-07-24T19:44:03Z")

</div>

Hi all! I have a linear model, created with GLM.jl. Since I correlated some variables with a categorical one, I have lots of NaN as coefficients, when the data are provided for only some of the categorical values: juli…

---

## [Problem fitting density function data](https://discourse.julialang.org/t/problem-fitting-density-function-data/97085)

<div class="topic-metadata">

**Author:** [@daro.slai](https://discourse.julialang.org/u/daro.slai)\
**Replies:** 4\
**Last updated:** [July 20, 2023, 1:43pm UTC](https://discourse.julialang.org/t/problem-fitting-density-function-data/97085 "2023-07-20T13:43:33Z")

</div>

I have a dataset from Elaad. Which looks like this: the idea is to fit a given Distribution::D to the data. I wanted to try a couple of ideas but the fit needs to handle both the bins and the probability data. I´ve…

---

## [ANN: SimulatedNeuralMoments v2.0.0](https://discourse.julialang.org/t/ann-simulatedneuralmoments-v2-0-0/101627)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 1\
**Last updated:** [July 19, 2023, 3:32pm UTC](https://discourse.julialang.org/t/ann-simulatedneuralmoments-v2-0-0/101627 "2023-07-19T15:32:52Z")

</div>

v2.0.0 is out. Fixes a bug that slipped in somewhere in the 1.0.x series, which led to sub-par results. :japanese\_goblin: Performance is now back to what it should be. There is some restructuring and minor API changes. …

---

## [How to express this repeated measures model with dummy variables?](https://discourse.julialang.org/t/how-to-express-this-repeated-measures-model-with-dummy-variables/101164)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 0\
**Last updated:** [July 4, 2023, 10:38am UTC](https://discourse.julialang.org/t/how-to-express-this-repeated-measures-model-with-dummy-variables/101164 "2023-07-04T10:38:50Z")

</div>

I would like to fit a model to predict a future outcome from a given time (t=1 in the attached plot) using covariates X. But I have many missings at that time, and I’ve thought about also using past information of X. …

---

## [ForwardDiff on CDF for Beta distribution](https://discourse.julialang.org/t/forwarddiff-on-cdf-for-beta-distribution/101110)

<div class="topic-metadata">

**Author:** [@matvil](https://discourse.julialang.org/u/matvil)\
**Replies:** 3\
**Last updated:** [July 3, 2023, 1:44pm UTC](https://discourse.julialang.org/t/forwarddiff-on-cdf-for-beta-distribution/101110 "2023-07-03T13:44:04Z")

</div>

I am trying to autodiff a function that depends on the CDF for a Beta distribution, but I get an error since this function depends on rmath, which only accepts Float64, not Reals, which I understand is required for Dual …

---

## [Building random generator for custom type to generate a specific number of variates](https://discourse.julialang.org/t/building-random-generator-for-custom-type-to-generate-a-specific-number-of-variates/100199)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 2\
**Last updated:** [June 12, 2023, 2:14pm UTC](https://discourse.julialang.org/t/building-random-generator-for-custom-type-to-generate-a-specific-number-of-variates/100199 "2023-06-12T14:14:02Z")

</div>

I’m writing a random generator for a custom type and, for this type, it is important to know the number of variates being generated for efficient generation. My thought is to generalize Random.Repitition to allow Val{n}…

---

## [Change the number of particles in the PF dynamically](https://discourse.julialang.org/t/change-the-number-of-particles-in-the-pf-dynamically/100195)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 0\
**Last updated:** [June 11, 2023, 5:55pm UTC](https://discourse.julialang.org/t/change-the-number-of-particles-in-the-pf-dynamically/100195 "2023-06-11T17:55:29Z")

</div>

I am trying to create a particle filter method where the number of particles is adaptive, meaning it changes dynamically depending on whether the method is converging or not. I want to take inspiration from the repositor…

---

## [Truncated chi-square returning NaNs](https://discourse.julialang.org/t/truncated-chi-square-returning-nans/100187)

<div class="topic-metadata">

**Author:** [@Jad\_Zeitouni](https://discourse.julialang.org/u/Jad_Zeitouni)\
**Replies:** 0\
**Last updated:** [June 11, 2023, 2:48pm UTC](https://discourse.julialang.org/t/truncated-chi-square-returning-nans/100187 "2023-06-11T14:48:42Z")

</div>

I’m trying to sample from a truncated chi-square distribution, defined over \[0, a\], by using the following line of code. rand(Truncated(Chisq(n), 0, a)) This does alright most of the time, but sometimes it returns NaNs…

---

## [MCMC Sampling Method Overview/Comparison?](https://discourse.julialang.org/t/mcmc-sampling-method-overview-comparison/88496)

<div class="topic-metadata">

**Author:** [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Replies:** 7\
**Last updated:** [June 10, 2023, 5:50am UTC](https://discourse.julialang.org/t/mcmc-sampling-method-overview-comparison/88496 "2023-06-10T05:50:19Z")

</div>

Is there a reference that compares the different sampling techniques available for Turing.jl? I don’t see a consistently preferred chain and it’s not clear to me (a beginner bayesian) why one would prefer a given sampler…

---

## [Very large performance difference between Turing and Stan \[Gaussian Process\]](https://discourse.julialang.org/t/very-large-performance-difference-between-turing-and-stan-gaussian-process/93663)

<div class="topic-metadata">

**Author:** [@jdossgollin](https://discourse.julialang.org/u/jdossgollin)\
**Replies:** 9\
**Last updated:** [June 10, 2023, 5:42am UTC](https://discourse.julialang.org/t/very-large-performance-difference-between-turing-and-stan-gaussian-process/93663 "2023-06-10T05:42:59Z")

</div>

A student I’m working with is working on a Gaussian Process model in Turing, but it was very slow. Out of frustration, they reimplemented in stan and it’s much faster. For context, it fits (1000 samples from 1 chain) in …

---

## [Bug in AlphaStableDistributions?](https://discourse.julialang.org/t/bug-in-alphastabledistributions/99868)

<div class="topic-metadata">

**Author:** [@chrhum](https://discourse.julialang.org/u/chrhum)\
**Replies:** 6\
**Last updated:** [June 7, 2023, 10:00am UTC](https://discourse.julialang.org/t/bug-in-alphastabledistributions/99868 "2023-06-07T10:00:09Z")

</div>

I could not reconcile the output of a classical sampling algorithm for the Gumbel Copula when using AlphaStableDistributions.jl. I wonder if there is a bug in its simulation algorithm or if I have overseen something? A …

---

## [How to use regularization in Mixed-effects models and Survival models with Julia?](https://discourse.julialang.org/t/how-to-use-regularization-in-mixed-effects-models-and-survival-models-with-julia/99858)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 3\
**Last updated:** [June 6, 2023, 11:32pm UTC](https://discourse.julialang.org/t/how-to-use-regularization-in-mixed-effects-models-and-survival-models-with-julia/99858 "2023-06-06T23:32:24Z")

</div>

I would like to perform a regression model with random effects and a Cox model, both with many covariates (20000). Then I need to include some kind of regularization such as lasso. But I haven’t found that option in Mi…

---

## [Can we use logistic regression directly in a case control study?](https://discourse.julialang.org/t/can-we-use-logistic-regression-directly-in-a-case-control-study/99046)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 2\
**Last updated:** [June 6, 2023, 12:32am UTC](https://discourse.julialang.org/t/can-we-use-logistic-regression-directly-in-a-case-control-study/99046 "2023-06-06T00:32:33Z")

</div>

Hello. Say I have a very imbalanced dataset, so I decide to do a case-control study. For example, we have 1 million healthy people and 300 people with cancer. I take 300 people from each group and I want to fit a logi…

---

## [Kolmogorov-Smirnov test for PDF](https://discourse.julialang.org/t/kolmogorov-smirnov-test-for-pdf/99771)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 5\
**Last updated:** [June 2, 2023, 7:46pm UTC](https://discourse.julialang.org/t/kolmogorov-smirnov-test-for-pdf/99771 "2023-06-02T19:46:07Z")

</div>

Hello! I have probability density function(PDF) for my data. I need use Kolmogorov-Smirnov test to check which distribution corresponds PDF. I have not dealt with statistics before, is it possible to throw off some ex…

---

## [How to extract priors from a Turing model](https://discourse.julialang.org/t/how-to-extract-priors-from-a-turing-model/99568)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 0\
**Last updated:** [May 29, 2023, 2:29pm UTC](https://discourse.julialang.org/t/how-to-extract-priors-from-a-turing-model/99568 "2023-05-29T14:29:26Z")

</div>

Assuming the following model: # Bayesian linear regression. @model function linear\_regression(x, y) # Set variance prior. σ² ~ truncated(Normal(0, 100); lower=0) # Set intercept prior. intercept ~ Norma…

---

## [Normalizing Values and Floating Point Error](https://discourse.julialang.org/t/normalizing-values-and-floating-point-error/99213)

<div class="topic-metadata">

**Author:** [@ianroddis](https://discourse.julialang.org/u/ianroddis)\
**Replies:** 6\
**Last updated:** [May 22, 2023, 12:04pm UTC](https://discourse.julialang.org/t/normalizing-values-and-floating-point-error/99213 "2023-05-22T12:04:46Z")

</div>

Sorry if this isn’t the right place to post this question, but it was as close as I could think for the intersection of concerns. Most sources I’ve read on data modelling suggest that, when required, values be normalize…

---

## [Implementation of graphical lasso with Cholesky factor](https://discourse.julialang.org/t/implementation-of-graphical-lasso-with-cholesky-factor/99016)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 3:47pm UTC](https://discourse.julialang.org/t/implementation-of-graphical-lasso-with-cholesky-factor/99016 "2023-05-20T15:47:02Z")

</div>

Hello, I am working on an implementation of the graphical Lasso (Glasso) (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3019769/pdf/kxm045.pdf) in pure Julia. In the algorithm, we have to use a square root of sample cova…

---

## [Workflow for MCMC parameter estimation](https://discourse.julialang.org/t/workflow-for-mcmc-parameter-estimation/98960)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 3\
**Last updated:** [May 18, 2023, 3:04am UTC](https://discourse.julialang.org/t/workflow-for-mcmc-parameter-estimation/98960 "2023-05-18T03:04:20Z")

</div>

Hi, I would like to use Julia for the parameter estimation of an ODE system using MCMC. I have empirical data sets and ODE model that I can successfully solve using DifferentialEquations.jl. What packages/ workflow I …

---

## [Using DifffEqBayes.jl for fitting y(x) instead of time series](https://discourse.julialang.org/t/using-difffeqbayes-jl-for-fitting-y-x-instead-of-time-series/99026)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 0\
**Last updated:** [May 17, 2023, 11:32pm UTC](https://discourse.julialang.org/t/using-difffeqbayes-jl-for-fitting-y-x-instead-of-time-series/99026 "2023-05-17T23:32:09Z")

</div>

I was wondering if there is an option in DiffEqBayes.jl or another package to make MCMC parameter estimation that fits one of the variables as a function of the other, rather than the time series of each. Let’s say I ha…

---

## [Do we need to use weights in imbalanced survival models?](https://discourse.julialang.org/t/do-we-need-to-use-weights-in-imbalanced-survival-models/99008)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 0\
**Last updated:** [May 17, 2023, 5:08pm UTC](https://discourse.julialang.org/t/do-we-need-to-use-weights-in-imbalanced-survival-models/99008 "2023-05-17T17:08:40Z")

</div>

Hello. Say I am using a Cox model to predict cancer, but my dataset has 10000 healthy patients and just 10 with cancer during the studied interval. Do we need to use weights to compensate imbalance with these kind of m…

---

## [How to specify weights (wts) in MixedModels.jl?](https://discourse.julialang.org/t/how-to-specify-weights-wts-in-mixedmodels-jl/98707)

<div class="topic-metadata">

**Author:** [@Rscho314](https://discourse.julialang.org/u/Rscho314)\
**Replies:** 0\
**Last updated:** [May 11, 2023, 11:22pm UTC](https://discourse.julialang.org/t/how-to-specify-weights-wts-in-mixedmodels-jl/98707 "2023-05-11T23:22:44Z")

</div>

Hi, I specified a multilevel longitudinal model in MixedModels.jl. I am having a heteroscedasticity issue, for which I’d like to try to weight observations. So, the unweighted model: fit(MixedModel,@formula(maxtrop~1+…

---

## [Kernel density estimation status](https://discourse.julialang.org/t/kernel-density-estimation-status/5928)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 30\
**Last updated:** [May 7, 2023, 6:42pm UTC](https://discourse.julialang.org/t/kernel-density-estimation-status/5928 "2023-05-07T18:42:46Z")

</div>

What is the de facto standard package for KDE in Julia? KernelDensity.jl KernelDensityEstimate.jl KernelEstimator.jl My attempts with the packages listed above were not very successful.

---

## [Robust Mahalanobis distance in high-dimensions with limited samples](https://discourse.julialang.org/t/robust-mahalanobis-distance-in-high-dimensions-with-limited-samples/98089)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 2\
**Last updated:** [April 29, 2023, 9:15pm UTC](https://discourse.julialang.org/t/robust-mahalanobis-distance-in-high-dimensions-with-limited-samples/98089 "2023-04-29T21:15:51Z")

</div>

Hello, I would like to use an iterative algorithm to estimate the parameters of a t-distribution \\pi\_X characterized by a mean \\mu \\in \\mathbb{R}^n, a PSD scale matrix C \\in \\mathbb{R}^{Nx \\times Nx}, and a degree of fr…

---

## [Package for KPCA](https://discourse.julialang.org/t/package-for-kpca/74248)

<div class="topic-metadata">

**Author:** [@roh\_codeur](https://discourse.julialang.org/u/roh_codeur)\
**Replies:** 3\
**Last updated:** [April 29, 2023, 9:17pm UTC](https://discourse.julialang.org/t/package-for-kpca/74248 "2023-04-29T21:17:18Z")

</div>

Hi, I am a newbie to Julia. I am looking for a package for KPCA please. I tried using MultivariateStats, unfortunately, ran into the below issue https://github.com/JuliaStats/MultivariateStats.jl/issues/164 I couldn’t …

---

## [Maximum likelihood for t-distribution by gradient descent](https://discourse.julialang.org/t/maximum-likelihood-for-t-distribution-by-gradient-descent/97954)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 24\
**Last updated:** [April 28, 2023, 5:37pm UTC](https://discourse.julialang.org/t/maximum-likelihood-for-t-distribution-by-gradient-descent/97954 "2023-04-28T17:37:38Z")

</div>

Hello, I am interested in the estimation of parameters of a multivariate t-distribution from samples. A multivariate random variable X \\in \\mathbb{R}^n with density \\pi\_X is characterized by a mean vector \\mu \\in \\math…

---

## [Multiple independent random number streams](https://discourse.julialang.org/t/multiple-independent-random-number-streams/98004)

<div class="topic-metadata">

**Author:** [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Replies:** 4\
**Last updated:** [April 27, 2023, 7:33pm UTC](https://discourse.julialang.org/t/multiple-independent-random-number-streams/98004 "2023-04-27T19:33:45Z")

</div>

Goal Across many, e.g., 10,000, simulations, generate random data. Each simulation should be independent of the others. Must be able to recreate a particular simulation s without first running previous s-1 simulations. …

---

## [Cdf of multivariate normal in distributions.jl](https://discourse.julialang.org/t/cdf-of-multivariate-normal-in-distributions-jl/4773)

<div class="topic-metadata">

**Author:** [@newb\_gk](https://discourse.julialang.org/u/newb_gk)\
**Replies:** 24\
**Last updated:** [April 24, 2023, 8:27am UTC](https://discourse.julialang.org/t/cdf-of-multivariate-normal-in-distributions-jl/4773 "2023-04-24T08:27:22Z")

</div>

I’m trying to use the cdf of a multivariate normal distribution using Distributions.jl. While d = Normal(0,1) d2 = MvNormal(\[0.;0.\], \[1. 0.;0. 1.\]) x = \[1. ; 2.\] e1 = cdf(d,x\[1\]) e2 = cdf(d,x\[2\]) works (as long as the…

---

## [Tweedie distribution / Tweedie GLM](https://discourse.julialang.org/t/tweedie-distribution-tweedie-glm/44091)

<div class="topic-metadata">

**Author:** [@m-a](https://discourse.julialang.org/u/m-a)\
**Replies:** 2\
**Last updated:** [April 9, 2023, 2:15pm UTC](https://discourse.julialang.org/t/tweedie-distribution-tweedie-glm/44091 "2023-04-09T14:15:05Z")

</div>

I’m interested in fitting a GLM via GLM.jl with a Tweedie distribution (Tweedie distribution - Wikipedia), particularly when the domain of the index parameter is not a special case that’s already available. Something lik…

[Previous page](https://discourse.julialang.org/c/domain/stats/12.md?page=4)

[Next page](https://discourse.julialang.org/c/domain/stats/12.md?page=6)
