# Statistics

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

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

**Page:** 2

---

## [Time-series in Julia (working list)](https://discourse.julialang.org/t/time-series-in-julia-working-list/62539)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 41\
**Last updated:** [August 14, 2025, 12:14pm UTC](https://discourse.julialang.org/t/time-series-in-julia-working-list/62539 "2025-08-14T12:14:28Z")

</div>

Here is a summary of time series in Julia. (Ported from this thread.) This is a Julia version of CRAN Task View: Time Series Analysis . TL;DR ARCHModels is the most developed volatility model pkg in Julia (it also…

---

## [Comparing distribution with KS-test](https://discourse.julialang.org/t/comparing-distribution-with-ks-test/131589)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 1\
**Last updated:** [August 13, 2025, 4:53pm UTC](https://discourse.julialang.org/t/comparing-distribution-with-ks-test/131589 "2025-08-13T16:53:24Z")

</div>

Hello all! I have a vector of local maximum spikes extracted from a time series. I also have the probability density function (PDF) for these local maxima. I need to compare my distribution with the Weibull distributio…

---

## [Maxwell-Boltzmann Distribution using Distributions.jl](https://discourse.julialang.org/t/maxwell-boltzmann-distribution-using-distributions-jl/131210)

<div class="topic-metadata">

**Author:** [@prconlin](https://discourse.julialang.org/u/prconlin)\
**Replies:** 1\
**Last updated:** [July 30, 2025, 5:13pm UTC](https://discourse.julialang.org/t/maxwell-boltzmann-distribution-using-distributions-jl/131210 "2025-07-30T17:13:01Z")

</div>

Hello, Distributions.jl does not have an implementation of the Maxwell-Boltzmann distribution, but it does have the Chi distribution, which is a more general form of the Maxwell-Boltzmann case. I’m hoping to simply app…

---

## [Skew Student T Distr? (Hansen or Fernandes Steel)](https://discourse.julialang.org/t/skew-student-t-distr-hansen-or-fernandes-steel/131041)

<div class="topic-metadata">

**Author:** [@Alex1](https://discourse.julialang.org/u/Alex1)\
**Replies:** 6\
**Last updated:** [July 26, 2025, 7:32pm UTC](https://discourse.julialang.org/t/skew-student-t-distr-hansen-or-fernandes-steel/131041 "2025-07-26T19:32:13Z")

</div>

Hi, is there a Skew Student T implementation in Julia? Hansen or Fernandes-Steel variants, with analytical pdf, cdf, quantile?

---

## [Generalized Chi-squared distribution](https://discourse.julialang.org/t/generalized-chi-squared-distribution/106055)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 5\
**Last updated:** [July 26, 2025, 7:37am UTC](https://discourse.julialang.org/t/generalized-chi-squared-distribution/106055 "2025-07-26T07:37:25Z")

</div>

Does anybody know some attempt to implement the Generalized Chi-squared distribution in Julia? (First I looked for it in Distributions.jl, but I have not found it there or anywhere else.)

---

## [Set distribution for function parameters](https://discourse.julialang.org/t/set-distribution-for-function-parameters/130963)

<div class="topic-metadata">

**Author:** [@Cyan](https://discourse.julialang.org/u/Cyan)\
**Replies:** 2\
**Last updated:** [July 23, 2025, 2:18pm UTC](https://discourse.julialang.org/t/set-distribution-for-function-parameters/130963 "2025-07-23T14:18:24Z")

</div>

Hi, all. I am stucked by the problems of building a @model for a parameters of a function when using Turing. Such as for function f(x; b, c), I want to obtain a model like @model fuction(x,y) b ~ truncated(Normal(1., 1)…

---

## [User defined ELBO in AdvancedVI or Turing](https://discourse.julialang.org/t/user-defined-elbo-in-advancedvi-or-turing/130833)

<div class="topic-metadata">

**Author:** [@Garren\_Hermanus](https://discourse.julialang.org/u/Garren_Hermanus)\
**Replies:** 1\
**Last updated:** [July 19, 2025, 4:40pm UTC](https://discourse.julialang.org/t/user-defined-elbo-in-advancedvi-or-turing/130833 "2025-07-19T16:40:57Z")

</div>

Hi all, I am fairly new to ADVI and Turing (and sub-packages in general). I get the general idea of ADVI in that we make a set of parameter transformations to obtain an estimator to the intractable expectation \\mathbb{…

---

## [Fitting a distribution not supported by Distributions.jl](https://discourse.julialang.org/t/fitting-a-distribution-not-supported-by-distributions-jl/130818)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 6\
**Last updated:** [July 18, 2025, 1:14am UTC](https://discourse.julialang.org/t/fitting-a-distribution-not-supported-by-distributions-jl/130818 "2025-07-18T01:14:42Z")

</div>

Hi, I want to fit an analytical distribution in Julia from discrete points. For instance, this specific Levy distribution is listed in Distributions.jl, but the fit method is not supported for this type: Distribution Fi…

---

## [Minimum and maximum for OnlineStats.OrderStats](https://discourse.julialang.org/t/minimum-and-maximum-for-onlinestats-orderstats/129989)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 4\
**Last updated:** [June 20, 2025, 11:00pm UTC](https://discourse.julialang.org/t/minimum-and-maximum-for-onlinestats-orderstats/129989 "2025-06-20T23:00:30Z")

</div>

Would these definitions make sense for OnlineStats.OrderStats from OnlineStats.jl? Base.minimum(o::OrderStats) = minimum(o.ex) Base.maximum(o::OrderStats) = maximum(o.ex) Base.extrema(o::OrderStats) = extrema(o.ex)

---

## [Package for Graphical Models and Graphical Lasso](https://discourse.julialang.org/t/package-for-graphical-models-and-graphical-lasso/41107)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 2\
**Last updated:** [June 1, 2025, 8:11pm UTC](https://discourse.julialang.org/t/package-for-graphical-models-and-graphical-lasso/41107 "2025-06-01T20:11:13Z")

</div>

Hello, Is there a Julia package for probabilitistic graphical models, in particular an implementation of the Graphical Lasso to identify sparse precision matrix (https://statweb.stanford.edu/~jhf/ftp/glasso-bio.pdf)

---

## [Turing with both Poisson and Gaussian noise](https://discourse.julialang.org/t/turing-with-both-poisson-and-gaussian-noise/129369)

<div class="topic-metadata">

**Author:** [@Cyan](https://discourse.julialang.org/u/Cyan)\
**Replies:** 3\
**Last updated:** [May 30, 2025, 7:54am UTC](https://discourse.julialang.org/t/turing-with-both-poisson-and-gaussian-noise/129369 "2025-05-30T07:54:18Z")

</div>

I have a set of data with both Poisson and Gaussian noise, which distribution I should choose in likelihood? My dataset looks like obs = data + Poisson + Gaussian PS My data is a series of images, it contains Gaussia…

---

## [AR(1) correlation structure on errors with MixedModels.jl](https://discourse.julialang.org/t/ar-1-correlation-structure-on-errors-with-mixedmodels-jl/128066)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 5\
**Last updated:** [May 21, 2025, 4:34pm UTC](https://discourse.julialang.org/t/ar-1-correlation-structure-on-errors-with-mixedmodels-jl/128066 "2025-05-21T16:34:07Z")

</div>

Hi all, I’m looking at the MixedModels.jl package and I’m curious if it (or something similar in Julia) can fit the following type of model I used nlme to fit in R. The part I can’t figure out is if there is a simple way…

---

## [Predict values using multinomial logistic regression?](https://discourse.julialang.org/t/predict-values-using-multinomial-logistic-regression/128621)

<div class="topic-metadata">

**Author:** [@Paulogcd](https://discourse.julialang.org/u/Paulogcd)\
**Replies:** 1\
**Last updated:** [May 2, 2025, 11:39am UTC](https://discourse.julialang.org/t/predict-values-using-multinomial-logistic-regression/128621 "2025-05-02T11:39:16Z")

</div>

Dear Julia community :slightly\_smiling\_face:, I have been trying to run a Multinomial logistic regression and to get the estimated results from a certain set of values. I managed to run the regression, but fail to get …

---

## [\[ANN\] NumericalDistributions.jl: user-defined distributions](https://discourse.julialang.org/t/ann-numericaldistributions-jl-user-defined-distributions/128025)

<div class="topic-metadata">

**Author:** [@misha\_mikhasenko](https://discourse.julialang.org/u/misha_mikhasenko)\
**Replies:** 1\
**Last updated:** [April 13, 2025, 3:54pm UTC](https://discourse.julialang.org/t/ann-numericaldistributions-jl-user-defined-distributions/128025 "2025-04-13T15:54:50Z")

</div>

I’m happy to share NumericalDistributions.jl, a package for working with numerically defined univariate continuous distributions in Julia. It wraps user-defined PDF functions, numerically normalizes them, and provides sa…

---

## [Having trouble with StatsModels.jl \`modelmatrix\` to replicate R results](https://discourse.julialang.org/t/having-trouble-with-statsmodels-jl-modelmatrix-to-replicate-r-results/127981)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 1\
**Last updated:** [April 11, 2025, 4:07pm UTC](https://discourse.julialang.org/t/having-trouble-with-statsmodels-jl-modelmatrix-to-replicate-r-results/127981 "2025-04-11T16:07:49Z")

</div>

Hi all, I’m trying to generate a model matrix to replicate R results, I’d appreciate some guidance. The input data is the Rail data from the nlme package in R, it has the format below: \> library(nlme) \> data(Rail) \> Rai…

---

## [Parallelism in NestedSamplers.jl \`Proposals\`](https://discourse.julialang.org/t/parallelism-in-nestedsamplers-jl-proposals/126933)

<div class="topic-metadata">

**Author:** [@Riccardo\_Buscicchio](https://discourse.julialang.org/u/Riccardo_Buscicchio)\
**Replies:** 0\
**Last updated:** [March 13, 2025, 8:00pm UTC](https://discourse.julialang.org/t/parallelism-in-nestedsamplers-jl-proposals/126933 "2025-03-13T20:00:30Z")

</div>

Hi all, I would be interested in extending the Proposals available in NestedSamplers.jl to allow for parallel evaluation of multiple proposals. Has anyone ever attempted to do so?

---

## [Causal inference in Julia 2025?](https://discourse.julialang.org/t/causal-inference-in-julia-2025/126001)

<div class="topic-metadata">

**Author:** [@eteppo](https://discourse.julialang.org/u/eteppo)\
**Replies:** 9\
**Last updated:** [March 11, 2025, 11:36pm UTC](https://discourse.julialang.org/t/causal-inference-in-julia-2025/126001 "2025-03-11T23:36:57Z")

</div>

Hey! I’ve been reading about causal inference recently and trying to incorporate those methods into my research as much as I can. My impression is that many others are trying to do the same in various fields. I thought …

---

## [Interpreting TuringBenchmarking.jl output?](https://discourse.julialang.org/t/interpreting-turingbenchmarking-jl-output/119356)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 1\
**Last updated:** [February 15, 2025, 6:13pm UTC](https://discourse.julialang.org/t/interpreting-turingbenchmarking-jl-output/119356 "2025-02-15T18:13:01Z")

</div>

Hi, I’m trying to benchmark a turing model as described here and it’s not really clear to me what the output means: 2-element BenchmarkTools.BenchmarkGroup: tags: \[\] "evaluation" =\> 2-element BenchmarkTools.Benchma…

---

## [Two years experience in biostatistics and data management for NCA using Julia](https://discourse.julialang.org/t/two-years-experience-in-biostatistics-and-data-management-for-nca-using-julia/96345)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 9\
**Last updated:** [February 13, 2025, 1:57pm UTC](https://discourse.julialang.org/t/two-years-experience-in-biostatistics-and-data-management-for-nca-using-julia/96345 "2025-02-13T13:57:08Z")

</div>

Hi! I’m working on bioequivalence and clinical trials and try to include Julia in my pipeline since 2 years. And now want to tell what problems I had and what problems exist now. Usually I used R project, IBM SPSS and …

---

## [Four-parameter beta distribution](https://discourse.julialang.org/t/four-parameter-beta-distribution/90280)

<div class="topic-metadata">

**Author:** [@Igor\_Douven](https://discourse.julialang.org/u/Igor_Douven)\
**Replies:** 6\
**Last updated:** [February 12, 2025, 11:21am UTC](https://discourse.julialang.org/t/four-parameter-beta-distribution/90280 "2025-02-12T11:21:57Z")

</div>

Hi all, The standard Beta distribution has as support the \[0, 1\] interval. However, there is also a four-parameter version, which allows one to specify an arbitrary minimum and maximum. R has the function Beta\_ab for th…

---

## [Developing an R package using Julia for a statistical model](https://discourse.julialang.org/t/developing-an-r-package-using-julia-for-a-statistical-model/121320)

<div class="topic-metadata">

**Author:** [@Mateus\_Maia](https://discourse.julialang.org/u/Mateus_Maia)\
**Replies:** 21\
**Last updated:** [December 23, 2024, 3:35pm UTC](https://discourse.julialang.org/t/developing-an-r-package-using-julia-for-a-statistical-model/121320 "2024-12-23T15:35:42Z")

</div>

Hi all, I would like to know what is the current state of using Julia as a backend for an R package. I writing a code for a statistical model, but I aware that most of the people will use R to run those analysis so I wo…

---

## [Similar Function to Excel's T.Dist.2T()](https://discourse.julialang.org/t/similar-function-to-excels-t-dist-2t/123514)

<div class="topic-metadata">

**Author:** [@SergeantMike67](https://discourse.julialang.org/u/SergeantMike67)\
**Replies:** 4\
**Last updated:** [December 5, 2024, 9:09pm UTC](https://discourse.julialang.org/t/similar-function-to-excels-t-dist-2t/123514 "2024-12-05T21:09:27Z")

</div>

Seems straight forward but how would I get a p value if I have calculated the test statistic and have the degrees of freedom. This example uses the method in Zar(1996) for comparing regression equations (Chapter 17) th…

---

## [Turing's negative binomial regression with horseshoe prior failing sometimes](https://discourse.julialang.org/t/turings-negative-binomial-regression-with-horseshoe-prior-failing-sometimes/121574)

<div class="topic-metadata">

**Author:** [@ayushpatnaikgit](https://discourse.julialang.org/u/ayushpatnaikgit)\
**Replies:** 1\
**Last updated:** [November 18, 2024, 6:46am UTC](https://discourse.julialang.org/t/turings-negative-binomial-regression-with-horseshoe-prior-failing-sometimes/121574 "2024-11-18T06:46:32Z")

</div>

Hi, I am trying to do a negative binomial regression using Turing. I am using the horseshoe prior. Here is my code: using Turing, StatsModels, RDatasets, Random sanction = dataset("Zelig", "sanction") function Negati…

---

## [Autodiff with Zygote: issues with setting seeds](https://discourse.julialang.org/t/autodiff-with-zygote-issues-with-setting-seeds/121957)

<div class="topic-metadata">

**Author:** [@weltenbummler](https://discourse.julialang.org/u/weltenbummler)\
**Replies:** 9\
**Last updated:** [November 11, 2024, 9:08am UTC](https://discourse.julialang.org/t/autodiff-with-zygote-issues-with-setting-seeds/121957 "2024-11-11T09:08:34Z")

</div>

Hello all, I would like to differentiate a function with fixed seed but obtain a “can’t differentiate foreign call” error when using Zygote. Any advise would be appreciated. The following is a minimal working example …

---

## [Sampling from a KDE object](https://discourse.julialang.org/t/sampling-from-a-kde-object/121604)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 4\
**Last updated:** [October 23, 2024, 8:54pm UTC](https://discourse.julialang.org/t/sampling-from-a-kde-object/121604 "2024-10-23T20:54:06Z")

</div>

Hi there, I estimated the density for a variable of interest using the kde() function from KernelDensity.jl package. Is there not a built-in/efficient function that samples from this estimated density? Thanks a lot!

---

## [How to use the second method of GLM.lm?](https://discourse.julialang.org/t/how-to-use-the-second-method-of-glm-lm/121139)

<div class="topic-metadata">

**Author:** [@MJulia](https://discourse.julialang.org/u/MJulia)\
**Replies:** 2\
**Last updated:** [October 11, 2024, 12:59am UTC](https://discourse.julialang.org/t/how-to-use-the-second-method-of-glm-lm/121139 "2024-10-11T00:59:38Z")

</div>

In the documents of GLM.lm, it says: “In the second method, X must be a matrix holding values of the independent variable(s) in columns (including if appropriate the intercept), and y must be a vector holding values of …

---

## [Help with slow Turing.jl inference speeds for large number of observations](https://discourse.julialang.org/t/help-with-slow-turing-jl-inference-speeds-for-large-number-of-observations/119332)

<div class="topic-metadata">

**Author:** [@hbooth](https://discourse.julialang.org/u/hbooth)\
**Replies:** 3\
**Last updated:** [October 9, 2024, 10:06pm UTC](https://discourse.julialang.org/t/help-with-slow-turing-jl-inference-speeds-for-large-number-of-observations/119332 "2024-10-09T22:06:11Z")

</div>

Hi all, I am new to Turing.jl and bayesian inference in general. I have specified the following model: @model function switch\_model(r, m, n) hm ~ Uniform(1, 10) am ~ Uniform(0, 10) κm ~ Uniform(0, 1) Δ…

---

## [The box problem](https://discourse.julialang.org/t/the-box-problem/120794)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 10\
**Last updated:** [October 8, 2024, 10:43pm UTC](https://discourse.julialang.org/t/the-box-problem/120794 "2024-10-08T22:43:39Z")

</div>

I just read this article: and I am not arriving at the same conclusion. Here’s the quick and dirty code I came up with to test it: using StatsBase function row\_wise() boxes = zeros(3,5) for \_ in 1:2 b…

---

## [How do I extract more than a pvalue HypothesisTests.jl?](https://discourse.julialang.org/t/how-do-i-extract-more-than-a-pvalue-hypothesistests-jl/120703)

<div class="topic-metadata">

**Author:** [@Rosejoycrocker](https://discourse.julialang.org/u/Rosejoycrocker)\
**Replies:** 1\
**Last updated:** [September 30, 2024, 7:50am UTC](https://discourse.julialang.org/t/how-do-i-extract-more-than-a-pvalue-hypothesistests-jl/120703 "2024-09-30T07:50:29Z")

</div>

Hi, I’m using HypothesisTests.jl to do a series of 2 Sample Kolmogorov Smirnov tests. This means I’m looping through a large series of data sets and applying the test KS\_object = ApproximateTwoSampleKSTest(data\_set1, da…

---

## [Plot the confidence interval for a model fit](https://discourse.julialang.org/t/plot-the-confidence-interval-for-a-model-fit/37767)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 20\
**Last updated:** [September 24, 2021, 12:43pm UTC](https://discourse.julialang.org/t/plot-the-confidence-interval-for-a-model-fit/37767 "2021-09-24T12:43:53Z")

</div>

I’m no data scientist, so it’s likely that my question does not make much sense… But here goes: I recently tried to do some data analysis that involved fitting models. I’m able to fit the model, compute represent a pred…

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

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