# Statistics

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

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

**Page:** 14

---

## [Diagnosing "Fixed-effects matrix is rank-deficient"](https://discourse.julialang.org/t/diagnosing-fixed-effects-matrix-is-rank-deficient/63471)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [June 24, 2021, 2:32pm UTC](https://discourse.julialang.org/t/diagnosing-fixed-effects-matrix-is-rank-deficient/63471 "2021-06-24T14:32:57Z")

</div>

I am using MixedModels fit(@formula(y ~ a + b + c + d + e), data) and it says “Warning: Fixed-effects matrix is rank-deficient”. I want to diagnose the problem. Can I find out which combinations of columns are not full r…

---

## [Multivariate empirical characteristic function](https://discourse.julialang.org/t/multivariate-empirical-characteristic-function/63311)

<div class="topic-metadata">

**Author:** [@Neurosurg](https://discourse.julialang.org/u/Neurosurg)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 7:29pm UTC](https://discourse.julialang.org/t/multivariate-empirical-characteristic-function/63311 "2021-06-21T19:29:50Z")

</div>

Hi, I am a Pythonista, yet totally new to Julia though. Could someone, please, demonstrate an example on how to code an empirical characteristic function (ideally multivariate) in Julia-way? That is, let’s say, we’ve …

---

## [Uncertainty propagation](https://discourse.julialang.org/t/uncertainty-propagation/63024)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 3\
**Last updated:** [June 23, 2021, 2:54pm UTC](https://discourse.julialang.org/t/uncertainty-propagation/63024 "2021-06-23T14:54:58Z")

</div>

Hey, Consider a random dataset: using Distributions using Random using Statistics using StatsBase X = rand(LogNormal(0,1),10000) Consider a first function that ‘summarises’ the dataset into a simple vector of k statis…

---

## [Best practices for Speech-to-Text conversion?](https://discourse.julialang.org/t/best-practices-for-speech-to-text-conversion/37543)

<div class="topic-metadata">

**Author:** [@themadprogramer](https://discourse.julialang.org/u/themadprogramer)\
**Replies:** 5\
**Last updated:** [June 23, 2021, 6:29am UTC](https://discourse.julialang.org/t/best-practices-for-speech-to-text-conversion/37543 "2021-06-23T06:29:26Z")

</div>

I’m working on a project where I plan to convert speech into text to perform very basic NLP tasks. At first, I hoped to find a package in Julia for Speech-to-Text conversion myself, but that didn’t turn up anything. Ne…

---

## [Binning polar values with Julia](https://discourse.julialang.org/t/binning-polar-values-with-julia/62754)

<div class="topic-metadata">

**Author:** [@danrib07](https://discourse.julialang.org/u/danrib07)\
**Replies:** 7\
**Last updated:** [June 11, 2021, 10:53pm UTC](https://discourse.julialang.org/t/binning-polar-values-with-julia/62754 "2021-06-11T22:53:00Z")

</div>

Hello, I have to bin periodic data. I was wondering if there are packages that can deal with polar binning in Julia. I have not been able to find it online. Any help is appreciated! Thank you in advance!

---

## [How to sample from a truncated distribution given a certain known variance?](https://discourse.julialang.org/t/how-to-sample-from-a-truncated-distribution-given-a-certain-known-variance/62618)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [June 9, 2021, 3:43pm UTC](https://discourse.julialang.org/t/how-to-sample-from-a-truncated-distribution-given-a-certain-known-variance/62618 "2021-06-09T15:43:59Z")

</div>

I did notice that when I sample from a truncated distribution the sample variance I get is not the one that I would expect from the distribution, but one “corrected” by the truncation process: using Distributions, Stati…

---

## [Is there a Julia package that can decompose a time series data into trend, seasonality and random?](https://discourse.julialang.org/t/is-there-a-julia-package-that-can-decompose-a-time-series-data-into-trend-seasonality-and-random/9518)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 25\
**Last updated:** [June 8, 2021, 6:18pm UTC](https://discourse.julialang.org/t/is-there-a-julia-package-that-can-decompose-a-time-series-data-into-trend-seasonality-and-random/9518 "2021-06-08T18:18:32Z")

</div>

I was trying to do some time series analysis. In R, there is a decompose function that can decompose a time series into trend, seasonality, and random noise. Is there an equivalent in Julia?

---

## [Exponential smoothing](https://discourse.julialang.org/t/exponential-smoothing/41020)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 9\
**Last updated:** [June 8, 2021, 2:11pm UTC](https://discourse.julialang.org/t/exponential-smoothing/41020 "2021-06-08T14:11:36Z")

</div>

Is there any package in Julia to do exponential smoothing?

---

## [Remove identical columns from matrix](https://discourse.julialang.org/t/remove-identical-columns-from-matrix/62378)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 9\
**Last updated:** [June 4, 2021, 8:16am UTC](https://discourse.julialang.org/t/remove-identical-columns-from-matrix/62378 "2021-06-04T08:16:44Z")

</div>

Suppose I have a matrix with several columns. What’s an easy way to remove identical columns? To provide an example, I want to get matrix x below if I start from matrix xx. x = rand(10, 5) xx = \[x x\[:, 2\] x\[:, 5\]\]

---

## [Mann Kendall Test - Sen's Slope](https://discourse.julialang.org/t/mann-kendall-test-sens-slope/59038)

<div class="topic-metadata">

**Author:** [@mixstam1453](https://discourse.julialang.org/u/mixstam1453)\
**Replies:** 5\
**Last updated:** [June 1, 2021, 3:24pm UTC](https://discourse.julialang.org/t/mann-kendall-test-sens-slope/59038 "2021-06-01T15:24:06Z")

</div>

Hello to everyone, Let’s suppose we have 3-hourly fluxes of solar radiation at surface, for a period 1980-2020. I want to apply Mann Kendall Test to this time-series and find the Sen’s slope, intercept, p\_value and tau…

---

## [Hoeffding Dependence measure and test](https://discourse.julialang.org/t/hoeffding-dependence-measure-and-test/61987)

<div class="topic-metadata">

**Author:** [@Eric](https://discourse.julialang.org/u/Eric)\
**Replies:** 0\
**Last updated:** [May 28, 2021, 12:52pm UTC](https://discourse.julialang.org/t/hoeffding-dependence-measure-and-test/61987 "2021-05-28T12:52:45Z")

</div>

Hello there, I put together a Julia package implementing the Hoeffding Dependence measure for the ones that could be interested. There are some Matlab, R, Python, and SAS implementations, but I could not find one in Ju…

---

## [Factors for regression models in julia](https://discourse.julialang.org/t/factors-for-regression-models-in-julia/61836)

<div class="topic-metadata">

**Author:** [@Babou](https://discourse.julialang.org/u/Babou)\
**Replies:** 5\
**Last updated:** [May 26, 2021, 8:35pm UTC](https://discourse.julialang.org/t/factors-for-regression-models-in-julia/61836 "2021-05-26T20:35:50Z")

</div>

I want to build a linear mixed model in Julia but the R code I am basing it on requires the use of factors for the model. I came across a stackoverflow post on just this topic but it was from 2017 and I am hoping ther…

---

## [How to obtain the critical value F0 of a F-distribution?](https://discourse.julialang.org/t/how-to-obtain-the-critical-value-f0-of-a-f-distribution/36448)

<div class="topic-metadata">

**Author:** [@Fred](https://discourse.julialang.org/u/Fred)\
**Replies:** 3\
**Last updated:** [May 26, 2021, 12:16pm UTC](https://discourse.julialang.org/t/how-to-obtain-the-critical-value-f0-of-a-f-distribution/36448 "2021-05-26T12:16:50Z")

</div>

Hi, I am not statistician and I need some advises to do a statistical test in Julia. I would like to obtain the critical value F0 of a F-distribution available for example in these tables I read the Distributions.jl d…

---

## [A comparison of common distributions in Julia, Python and R](https://discourse.julialang.org/t/a-comparison-of-common-distributions-in-julia-python-and-r/61604)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [May 21, 2021, 9:06pm UTC](https://discourse.julialang.org/t/a-comparison-of-common-distributions-in-julia-python-and-r/61604 "2021-05-21T21:06:41Z")

</div>

Common distributions in Julia, Python and R Please report errors on GitHub - sylvaticus/commonDistributionsInJuliaPythonR: Common probability distributions in Julia, Python and R Loading packages Julia: using Distri…

---

## [GaussianMixtures question](https://discourse.julialang.org/t/gaussianmixtures-question/61526)

<div class="topic-metadata">

**Author:** [@SergeantMike67](https://discourse.julialang.org/u/SergeantMike67)\
**Replies:** 8\
**Last updated:** [May 21, 2021, 7:11pm UTC](https://discourse.julialang.org/t/gaussianmixtures-question/61526 "2021-05-21T19:11:20Z")

</div>

I have a dataset that results from calculating the CpG observed over expected (an estimation of cytosine methylation in the genome) and I am trying to fit the data into a two mean, 1D Gaussian Mixture model using Gaussia…

---

## [Multivariate noncentral hypergeometric distributions](https://discourse.julialang.org/t/multivariate-noncentral-hypergeometric-distributions/58450)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 5\
**Last updated:** [May 21, 2021, 9:59am UTC](https://discourse.julialang.org/t/multivariate-noncentral-hypergeometric-distributions/58450 "2021-05-21T09:59:49Z")

</div>

Hi there Just wondering if there are plans for the inclusion of multivariate noncentral hypergeometric distributions in Distributions.jl? In particular, I need to make use of Wallenius’ version. If it’s not on the card…

---

## [Jointly simulate high, low, and terminal value of Brownian motion](https://discourse.julialang.org/t/jointly-simulate-high-low-and-terminal-value-of-brownian-motion/61075)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://discourse.julialang.org/u/Beliavsky)\
**Replies:** 3\
**Last updated:** [May 17, 2021, 4:00pm UTC](https://discourse.julialang.org/t/jointly-simulate-high-low-and-terminal-value-of-brownian-motion/61075 "2021-05-17T16:00:43Z")

</div>

You can simulate the terminal value of a 1D Brownian motion using a Gaussian random number generator, randn in Julia. For some problems you would like to simulate the maximum and minimum in addition to the terminal value…

---

## [Fitting normalizing flows with Bijectors.jl](https://discourse.julialang.org/t/fitting-normalizing-flows-with-bijectors-jl/60383)

<div class="topic-metadata">

**Author:** [@mateuszbaran](https://discourse.julialang.org/u/mateuszbaran)\
**Replies:** 6\
**Last updated:** [May 12, 2021, 9:42pm UTC](https://discourse.julialang.org/t/fitting-normalizing-flows-with-bijectors-jl/60383 "2021-05-12T21:42:05Z")

</div>

Hi! I’d like to fit a normalizing flow to some data using Bijectors.jl. I’m a bit lost because I couldn’t find any complete examples. This is what I managed to do so far: using Bijectors using KernelDensity using Stats…

---

## [Bayes Testing](https://discourse.julialang.org/t/bayes-testing/60373)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 27\
**Last updated:** [May 12, 2021, 3:05am UTC](https://discourse.julialang.org/t/bayes-testing/60373 "2021-05-12T03:05:17Z")

</div>

I tried to add BayesTesting.jl , but apparently it’s gone from GitHub. Is there a packages that does Bayesian t-tests or other hypothesis testsing?

---

## [Problems with tuples in Statistics function](https://discourse.julialang.org/t/problems-with-tuples-in-statistics-function/60754)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 28\
**Last updated:** [May 11, 2021, 5:31pm UTC](https://discourse.julialang.org/t/problems-with-tuples-in-statistics-function/60754 "2021-05-11T17:31:21Z")

</div>

using Statistics using Distributions x=\[1,2,3,4,5,6,7,8\] y=\[8,4,5,5,6,5,6,5\] function TwoSampleT2Test(X,Y) nx, p = size(X) ny, \_ = size(Y) δ = mean(X, dims=1) - mean(Y, dims=1) Sx = cov(X) Sy = cov(Y)…

---

## [Reaching bounds of Distributions.Uniform()](https://discourse.julialang.org/t/reaching-bounds-of-distributions-uniform/60956)

<div class="topic-metadata">

**Author:** [@goualard-f](https://discourse.julialang.org/u/goualard-f)\
**Replies:** 4\
**Last updated:** [May 11, 2021, 4:05pm UTC](https://discourse.julialang.org/t/reaching-bounds-of-distributions-uniform/60956 "2021-05-11T16:05:07Z")

</div>

The documentation for Distributions.Uniform() states that it allows to draw a value in \[a,b\] (bounds included). Looking into the code, it seems that the rand() function from Base is used along with some affine transforma…

---

## [Repeated measures ANOVA](https://discourse.julialang.org/t/repeated-measures-anova/60765)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 11\
**Last updated:** [May 8, 2021, 7:36pm UTC](https://discourse.julialang.org/t/repeated-measures-anova/60765 "2021-05-08T19:36:29Z")

</div>

I’m trying to do a repeated measures ANOVA. Lets say the data is as follows julia\> using CategoricalArrays, DataFrames, Random julia\> Random.seed!(1) julia\> df = DataFrame( id = categorical(repeat(1:2; inner…

---

## [How do I find a p value with HypothesisTests.jl?](https://discourse.julialang.org/t/how-do-i-find-a-p-value-with-hypothesistests-jl/60758)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 8\
**Last updated:** [May 8, 2021, 4:26pm UTC](https://discourse.julialang.org/t/how-do-i-find-a-p-value-with-hypothesistests-jl/60758 "2021-05-08T16:26:31Z")

</div>

The documentation provides the example: pvalue(test::HypothesisTest; tail = :both) but how do I enter this ie. using HypothesisTests pvalue(pvalue(ApproximateTwoSampleKSTest(x,y); :both) isn’t accepted, so how do i p…

---

## [Using MeasureTheory.jl with Distributions.jl](https://discourse.julialang.org/t/using-measuretheory-jl-with-distributions-jl/60737)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 0\
**Last updated:** [May 7, 2021, 6:06pm UTC](https://discourse.julialang.org/t/using-measuretheory-jl-with-distributions-jl/60737 "2021-05-07T18:06:05Z")

</div>

I’ve heard there may be some perception that to use MeasureTheory, you need to entirely drop Distributions.jl. That’s not true! Calling Distributions from MeasureTheory MeasureTheory actually has Distributions as a depe…

---

## [Get list of columns from formula](https://discourse.julialang.org/t/get-list-of-columns-from-formula/60611)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [May 6, 2021, 6:33pm UTC](https://discourse.julialang.org/t/get-list-of-columns-from-formula/60611 "2021-05-06T18:33:09Z")

</div>

I want to make a dataframe that has only the columns that appear in the formula. How can I get the list of terms from a formula? @formula(y ~ a + b + c \* d + e + e ^ 2) cc @dave.f.kleinschmidt

---

## [Bayesian Model Selection](https://discourse.julialang.org/t/bayesian-model-selection/55725)

<div class="topic-metadata">

**Author:** [@ANasc](https://discourse.julialang.org/u/ANasc)\
**Replies:** 18\
**Last updated:** [May 2, 2021, 8:58pm UTC](https://discourse.julialang.org/t/bayesian-model-selection/55725 "2021-05-02T20:58:15Z")

</div>

Hi All, This question might reveal my limited knowledge of Bayesian estimation, but I am having difficulty figuring out how to perform basic Bayesian model selection in Turing. The documentation for MCMCChains.jl has a …

---

## [How to do multiple imputation on Julia?](https://discourse.julialang.org/t/how-to-do-multiple-imputation-on-julia/17713)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 15\
**Last updated:** [May 2, 2021, 7:46am UTC](https://discourse.julialang.org/t/how-to-do-multiple-imputation-on-julia/17713 "2021-05-02T07:46:02Z")

</div>

I’ve found the package Impute.jl but it seems it’s only able to use these simple methods: drop - remove missing locf - last observation carried forward nocb - next observation carried backward interp - linear interpola…

---

## [Help with Gaussian Mixer Model in Turing.jl](https://discourse.julialang.org/t/help-with-gaussian-mixer-model-in-turing-jl/60396)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 0\
**Last updated:** [May 1, 2021, 8:10pm UTC](https://discourse.julialang.org/t/help-with-gaussian-mixer-model-in-turing-jl/60396 "2021-05-01T20:10:28Z")

</div>

Random.seed!(3) N = 30 μs = \[-3.5, 0.0\] x = mapreduce(c -\> rand(MvNormal(\[μs\[c\], μs\[c\]\], 1.), N), hcat, 1:2) using Turing, MCMCChains model GaussianMixtureModel(x) = begin D, N = size(x) # Draw the pa…

---

## [In BAT.jl I'm unable to find the Log Denstiy Value](https://discourse.julialang.org/t/in-bat-jl-im-unable-to-find-the-log-denstiy-value/60390)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 0\
**Last updated:** [May 1, 2021, 5:53pm UTC](https://discourse.julialang.org/t/in-bat-jl-im-unable-to-find-the-log-denstiy-value/60390 "2021-05-01T17:53:27Z")

</div>

data = vcat( rand(Normal(-1.0, 0.5), 500), rand(Normal( 2.0, 0.5), 1000) ) hist = append!(Histogram(-2:0.1:4), data) function fit\_function(p::NamedTuple{(:a, :mu, :sigma)}, x::Real) p.a\[1\] \* pdf(Normal(p.mu\[…

---

## [Can someone replicate this GLM problem with linear regression on your computer?](https://discourse.julialang.org/t/can-someone-replicate-this-glm-problem-with-linear-regression-on-your-computer/60098)

<div class="topic-metadata">

**Author:** [@Chen](https://discourse.julialang.org/u/Chen)\
**Replies:** 13\
**Last updated:** [April 27, 2021, 1:31pm UTC](https://discourse.julialang.org/t/can-someone-replicate-this-glm-problem-with-linear-regression-on-your-computer/60098 "2021-04-27T13:31:59Z")

</div>

The CSV file is here: https://github.com/JuliaStats/GLM.jl/files/6384056/Car-Training.csv The GLM issue that I reported is here: https://github.com/JuliaStats/GLM.jl/issues/426 The codes are very simple: using GLM usi…

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

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