# Statistics

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

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

**Page:** 12

---

## [Using multiple index variables in Turing model](https://discourse.julialang.org/t/using-multiple-index-variables-in-turing-model/75743)

<div class="topic-metadata">

**Author:** [@ewcrombe](https://discourse.julialang.org/u/ewcrombe)\
**Replies:** 0\
**Last updated:** [February 3, 2022, 5:33pm UTC](https://discourse.julialang.org/t/using-multiple-index-variables-in-turing-model/75743 "2022-02-03T17:33:40Z")

</div>

Hello everyone, I would like to use two index variables in a model, but I don’t know how to do it… I would like to do something like this: @model function m2(A, G, D) α ~ MvNormal(\[\[0 0\] \[0 0\]\], …

---

## [Packages defining functional data types](https://discourse.julialang.org/t/packages-defining-functional-data-types/73539)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 8:50pm UTC](https://discourse.julialang.org/t/packages-defining-functional-data-types/73539 "2022-02-02T20:50:41Z")

</div>

Any package out there defining a function type with inner product? In functional data analysis we often define the inner product between two functions as \\langle f, g \\rangle = \\int\_a^b f(t)\\bar{g(t)} dt More formally,…

---

## [Implementing model where data is a function of random variables](https://discourse.julialang.org/t/implementing-model-where-data-is-a-function-of-random-variables/75354)

<div class="topic-metadata">

**Author:** [@Pablo\_Marchant](https://discourse.julialang.org/u/Pablo_Marchant)\
**Replies:** 5\
**Last updated:** [January 31, 2022, 8:00pm UTC](https://discourse.julialang.org/t/implementing-model-where-data-is-a-function-of-random-variables/75354 "2022-01-31T20:00:22Z")

</div>

Hi, I’ve got a question regarding implementation of a model where an observed variable can be described as a function of other random variables. My issues here are perhaps just due to my inexperience in using probabilis…

---

## [Fitting Mixed Effects Models - Python, Julia or R?](https://discourse.julialang.org/t/fitting-mixed-effects-models-python-julia-or-r/74955)

<div class="topic-metadata">

**Author:** [@dm13450](https://discourse.julialang.org/u/dm13450)\
**Replies:** 0\
**Last updated:** [January 20, 2022, 8:13pm UTC](https://discourse.julialang.org/t/fitting-mixed-effects-models-python-julia-or-r/74955 "2022-01-20T20:13:36Z")

</div>

I’ve written a blog post bench-marking Julia, Python and R when fitting a mixed effects model. Julia comes out top (by quite a bit!), so if you ever need to convince someone, hopefully this will help!

---

## [How do I fit generalised linear multilevel models including offsets?](https://discourse.julialang.org/t/how-do-i-fit-generalised-linear-multilevel-models-including-offsets/74286)

<div class="topic-metadata">

**Author:** [@timbp](https://discourse.julialang.org/u/timbp)\
**Replies:** 9\
**Last updated:** [January 10, 2022, 6:00am UTC](https://discourse.julialang.org/t/how-do-i-fit-generalised-linear-multilevel-models-including-offsets/74286 "2022-01-10T06:00:16Z")

</div>

I first heard of Julia a couple of years ago. It was presented as an alternative to R, SAS, and Stata. I had a look and I really liked it.The syntax just made sense. I could see where I might need to go to other languag…

---

## [\[ANN\] MuseInference.jl (drop-in replacement for HMC / VI, try it on your problem!)](https://discourse.julialang.org/t/ann-museinference-jl-drop-in-replacement-for-hmc-vi-try-it-on-your-problem/73468)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 4\
**Last updated:** [January 3, 2022, 7:40am UTC](https://discourse.julialang.org/t/ann-museinference-jl-drop-in-replacement-for-hmc-vi-try-it-on-your-problem/73468 "2022-01-03T07:40:28Z")

</div>

Earlier this week we put out a paper describing a new method for hierarchical Bayesian inference we dubbed the Marginal Unbiased Score Expansion (MUSE), which can pretty drastically outperform HMC / VI for a wide class o…

---

## [LogNormal-Distribution - how to set mu and sigma](https://discourse.julialang.org/t/lognormal-distribution-how-to-set-mu-and-sigma/7101)

<div class="topic-metadata">

**Author:** [@LotteVictor](https://discourse.julialang.org/u/LotteVictor)\
**Replies:** 17\
**Last updated:** [December 30, 2021, 3:20pm UTC](https://discourse.julialang.org/t/lognormal-distribution-how-to-set-mu-and-sigma/7101 "2021-12-30T15:20:08Z")

</div>

Hey there! I’m trying to draw random numbers from a Log-Normal distribution with a given mean and standard-deviation. As far as i know, the LogNormal(\\mu \\sigma) lets you set the mean and standard deviation of the distri…

---

## [New: WildBootTests for wild-bootstrap-based inference on linear models](https://discourse.julialang.org/t/new-wildboottests-for-wild-bootstrap-based-inference-on-linear-models/73567)

<div class="topic-metadata">

**Author:** [@droodman](https://discourse.julialang.org/u/droodman)\
**Replies:** 1\
**Last updated:** [December 24, 2021, 10:49pm UTC](https://discourse.julialang.org/t/new-wildboottests-for-wild-bootstrap-based-inference-on-linear-models/73567 "2021-12-24T22:49:38Z")

</div>

WildBootTests.jl is a Julia translation of the Stata package boottest, which is the most developed program for performing inference on linear models using the wild bootstrap. So it is algorithmically mature, but not quit…

---

## [New package DependentBootstrap](https://discourse.julialang.org/t/new-package-dependentbootstrap/312)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 3\
**Last updated:** [December 17, 2021, 4:09am UTC](https://discourse.julialang.org/t/new-package-dependentbootstrap/312 "2021-12-17T04:09:47Z")

</div>

Hi all, A little under a year ago I wrote a package that implements various dependent bootstrap and block length selection methodologies in Julia, but didn’t register it. I’ve been using it for the past year, and based …

---

## [How to interpret 2nd order Sobol global sensitivity analysis result?](https://discourse.julialang.org/t/how-to-interpret-2nd-order-sobol-global-sensitivity-analysis-result/47804)

<div class="topic-metadata">

**Author:** [@Janssena](https://discourse.julialang.org/u/Janssena)\
**Replies:** 16\
**Last updated:** [December 15, 2021, 9:20am UTC](https://discourse.julialang.org/t/how-to-interpret-2nd-order-sobol-global-sensitivity-analysis-result/47804 "2021-12-15T09:20:06Z")

</div>

Hey All, I used DiffeqSensitivity’s global sensitivity analysis using the Sobol method in order to explain the influence of specific input parameters of a model I’m building. I’m already getting some exciting results fr…

---

## [Normalization and Linear Model NaN error?](https://discourse.julialang.org/t/normalization-and-linear-model-nan-error/72150)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 3\
**Last updated:** [December 3, 2021, 12:11pm UTC](https://discourse.julialang.org/t/normalization-and-linear-model-nan-error/72150 "2021-12-03T12:11:52Z")

</div>

Good Day Julians: I am attempting to pass an interpolated (imputed) and normalized DF into a GLM.jl function (lm(@formula …). Under what circumstances would the Stats.Models TableRegression… return NaN such as: A…

---

## [Plotting a distribution](https://discourse.julialang.org/t/plotting-a-distribution/25356)

<div class="topic-metadata">

**Author:** [@stene](https://discourse.julialang.org/u/stene)\
**Replies:** 6\
**Last updated:** [December 1, 2021, 10:04am UTC](https://discourse.julialang.org/t/plotting-a-distribution/25356 "2021-12-01T10:04:36Z")

</div>

Trying to plot normal distributions from the Distributions package. How do I do this? julia\> normalDist = fit(Normal, data) Normal{Float64}(μ=100.3434334, σ=0.05) julia\> plot(normalDist) ERROR: No user recipe defined…

---

## [Distributions.loglikelihood](https://discourse.julialang.org/t/distributions-loglikelihood/71732)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 16\
**Last updated:** [November 19, 2021, 4:38pm UTC](https://discourse.julialang.org/t/distributions-loglikelihood/71732 "2021-11-19T16:38:59Z")

</div>

Can someone please explain Distributions.loglikelihood? A likelihood is a function of the parameters, but here it seems to be just another name for a broadcasted logpdf, a function of the data. Maybe there’s a history be…

---

## [Find max value in density plot](https://discourse.julialang.org/t/find-max-value-in-density-plot/48950)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [November 19, 2021, 4:31am UTC](https://discourse.julialang.org/t/find-max-value-in-density-plot/48950 "2021-11-19T04:31:48Z")

</div>

How do I get the max value of the graph in density(data?) (I want to plot a line on the plot to mark the mean value, as well as two other values. So I need to figure out about how big the plot area is in y-direction, s…

---

## [Applying weights to Randomized Arrays In a Dataframe](https://discourse.julialang.org/t/applying-weights-to-randomized-arrays-in-a-dataframe/65514)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 1\
**Last updated:** [November 12, 2021, 4:32pm UTC](https://discourse.julialang.org/t/applying-weights-to-randomized-arrays-in-a-dataframe/65514 "2021-11-12T16:32:36Z")

</div>

Hello Everyone: Is there a way to apply weights to arrays in a data such as: DF = DataFrame(Id = 1:10, Tablets = (rand(1:02:50),10), Desktops =(rand(1:02:50),10), Mobiles = (rand(1:01:50), 10)) If I wanted to apply …

---

## [Multicollinearity and GLM](https://discourse.julialang.org/t/multicollinearity-and-glm/71340)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 5\
**Last updated:** [November 11, 2021, 9:29pm UTC](https://discourse.julialang.org/t/multicollinearity-and-glm/71340 "2021-11-11T21:29:44Z")

</div>

Below, I show some generated data for a linear regression. With these features (also known as variables, covariates or predictors) A, B, C, D and E, I aim to predict an outcome Y. Would the data shown below be considered…

---

## [Learning statistics: seeking advice on how to model a 2d-size distribution of clothing items](https://discourse.julialang.org/t/learning-statistics-seeking-advice-on-how-to-model-a-2d-size-distribution-of-clothing-items/71152)

<div class="topic-metadata">

**Author:** [@tim\_pi](https://discourse.julialang.org/u/tim_pi)\
**Replies:** 25\
**Last updated:** [November 11, 2021, 1:47pm UTC](https://discourse.julialang.org/t/learning-statistics-seeking-advice-on-how-to-model-a-2d-size-distribution-of-clothing-items/71152 "2021-11-11T13:47:13Z")

</div>

Hi everyone, I’m new to Julia and have been trying it out for the past few weeks. As I’m still only beginning to (re)learn statistics as well, I’ve set out to get some insight into the following problem (I didn’t want t…

---

## [\[Turing\] Using a random variable as an index](https://discourse.julialang.org/t/turing-using-a-random-variable-as-an-index/66756)

<div class="topic-metadata">

**Author:** [@a\_garval](https://discourse.julialang.org/u/a_garval)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 11:46am UTC](https://discourse.julialang.org/t/turing-using-a-random-variable-as-an-index/66756 "2021-11-08T11:46:21Z")

</div>

Hey everyone, I’m trying to run some examples from Bayesian Methods for Hackers. The example I’m working on is a simple Poisson model. I want to go further and investigate if we could find different a specific day on whi…

---

## [DomainError in TemporalGPs](https://discourse.julialang.org/t/domainerror-in-temporalgps/70708)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 7\
**Last updated:** [November 8, 2021, 11:32am UTC](https://discourse.julialang.org/t/domainerror-in-temporalgps/70708 "2021-11-08T11:32:54Z")

</div>

I’m trying to fit a GP with TemporalGPs. Sometimes I get a DomainError when it attempts to sqrt a negative number. When that happens I usually just guess again at some initial parameters and re-run it. Sometimes that doe…

---

## [MultivariateStats - Factor Analysis - transform/reconstruct not working?](https://discourse.julialang.org/t/multivariatestats-factor-analysis-transform-reconstruct-not-working/70505)

<div class="topic-metadata">

**Author:** [@julio.ca2020](https://discourse.julialang.org/u/julio.ca2020)\
**Replies:** 1\
**Last updated:** [November 7, 2021, 3:42pm UTC](https://discourse.julialang.org/t/multivariatestats-factor-analysis-transform-reconstruct-not-working/70505 "2021-11-07T15:42:24Z")

</div>

In factor analysis transforming observations into latent variables or reconstructing observations from latent variables seem to be not working? (Factor Analysis — MultivariateStats 0.1.0 documentation) using Multivariat…

---

## [Weights in gaussian process](https://discourse.julialang.org/t/weights-in-gaussian-process/70646)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 7\
**Last updated:** [November 4, 2021, 1:51pm UTC](https://discourse.julialang.org/t/weights-in-gaussian-process/70646 "2021-11-04T13:51:07Z")

</div>

I have a model like @willtebbutt’s TemporalGPs example https://github.com/JuliaGaussianProcesses/TemporalGPs.jl#learning-kernel-parameters-with-optimjl-parameterhandlingjl-and-zygotejl In my dataset, different observati…

---

## [MultivariateStats - Factor Analysis not working for the :cm method?](https://discourse.julialang.org/t/multivariatestats-factor-analysis-not-working-for-the-cm-method/70418)

<div class="topic-metadata">

**Author:** [@julio.ca2020](https://discourse.julialang.org/u/julio.ca2020)\
**Replies:** 1\
**Last updated:** [November 3, 2021, 10:48pm UTC](https://discourse.julialang.org/t/multivariatestats-factor-analysis-not-working-for-the-cm-method/70418 "2021-11-03T22:48:08Z")

</div>

I am doing a factor analysis and I’ve noticed that the method :em works in all cases but not the :cm (default). Why this? This works for example: using MultivariateStats X = \[0.635098 0.548183 0.211851 0.171408 0…

---

## [StatsModels ArgumentError: collection must be non-empty](https://discourse.julialang.org/t/statsmodels-argumenterror-collection-must-be-non-empty/69604)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [October 29, 2021, 4:37pm UTC](https://discourse.julialang.org/t/statsmodels-argumenterror-collection-must-be-non-empty/69604 "2021-10-29T16:37:24Z")

</div>

ERROR: LoadError: LoadError: ArgumentError: collection must be non-empty Stacktrace: \[1\] \_extrema\_itr(f::typeof(identity), itr::Vector{Float64}) @ Base ./operators.jl:483 \[2\] \_extrema\_dims @ ./multidimensiona…

---

## [Using splines in a likelihood](https://discourse.julialang.org/t/using-splines-in-a-likelihood/49340)

<div class="topic-metadata">

**Author:** [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Replies:** 0\
**Last updated:** [October 30, 2020, 10:47pm UTC](https://discourse.julialang.org/t/using-splines-in-a-likelihood/49340 "2020-10-30T22:47:27Z")

</div>

I am looking to add splines to the type of functions that can go in @formula to support a conditional likelihood model I’ve developed. Once that is working I plan to add automatic smoothing parameter selection. The pac…

---

## [Weird PRNG behavior](https://discourse.julialang.org/t/weird-prng-behavior/63186)

<div class="topic-metadata">

**Author:** [@palday](https://discourse.julialang.org/u/palday)\
**Replies:** 4\
**Last updated:** [October 19, 2021, 8:01am UTC](https://discourse.julialang.org/t/weird-prng-behavior/63186 "2021-10-19T08:01:30Z")

</div>

It looks like randn!(rng, v) gives different values depending on the type not the eltype of v: julia\> using Random julia\> v1 = Vector{Float64}(undef, 200) julia\> m = Matrix{Float64}(undef, 200, 3) julia\> v2 = view(m, :,…

---

## [Julia stats, data, ML: expanding usability](https://discourse.julialang.org/t/julia-stats-data-ml-expanding-usability/67948)

<div class="topic-metadata">

**Author:** [@mit.edelman](https://discourse.julialang.org/u/mit.edelman)\
**Replies:** 84\
**Last updated:** [October 14, 2021, 3:03pm UTC](https://discourse.julialang.org/t/julia-stats-data-ml-expanding-usability/67948 "2021-10-14T15:03:55Z")

</div>

I’d like to share a presentation that was shared with me by a colleague interested in making Julia’s ecosystem more widely used. His conjecture is that Julia has remarkable capabilities, but if we only increased the usab…

---

## [Corrections for juliadatascience book](https://discourse.julialang.org/t/corrections-for-juliadatascience-book/69204)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 23\
**Last updated:** [October 14, 2021, 12:25pm UTC](https://discourse.julialang.org/t/corrections-for-juliadatascience-book/69204 "2021-10-14T12:25:30Z")

</div>

It’s incredible what wrong definitions the authors of the juliadatascience give in their online book, accessible at: https://juliadatascience.io/. There are so many scientists on this forum and no one has read what th…

---

## [Nested cross-validation](https://discourse.julialang.org/t/nested-cross-validation/65089)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 3\
**Last updated:** [October 13, 2021, 9:45am UTC](https://discourse.julialang.org/t/nested-cross-validation/65089 "2021-10-13T09:45:21Z")

</div>

For my PhD, I’m mainly dealing with data containing 10 to 20 features and sample sizes of about 100 to 500. According to quite some literature, cross-validation (CV) is biased and should be replaced by nested cross-valid…

---

## [Unbalanced One-way ANOVA](https://discourse.julialang.org/t/unbalanced-one-way-anova/69489)

<div class="topic-metadata">

**Author:** [@AerospaceMark](https://discourse.julialang.org/u/AerospaceMark)\
**Replies:** 4\
**Last updated:** [October 12, 2021, 12:46pm UTC](https://discourse.julialang.org/t/unbalanced-one-way-anova/69489 "2021-10-12T12:46:55Z")

</div>

I’m a graduate student seeking to learn how to do statistics in Julia. From my internet searching and working with the SimpleANOVA package, I’ve been able to perform ANOVA tests on data where each group has the same numb…

---

## [Parameter estimation and model inadequacy](https://discourse.julialang.org/t/parameter-estimation-and-model-inadequacy/69407)

<div class="topic-metadata">

**Author:** [@GregCoyle](https://discourse.julialang.org/u/GregCoyle)\
**Replies:** 2\
**Last updated:** [October 8, 2021, 3:51pm UTC](https://discourse.julialang.org/t/parameter-estimation-and-model-inadequacy/69407 "2021-10-08T15:51:46Z")

</div>

Are there any packages associated with Bayesian inference that provide methods to take on model inadequacy, AKA structural error, model bias, etc.? I’m particularly interested in applications to Bayesian parameter estima…

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

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