# Statistics

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

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

**Page:** 13

---

## [Turing: no method matching MvNormal(::Matrix{Float64}, ::Float64)](https://discourse.julialang.org/t/turing-no-method-matching-mvnormal-matrix-float64-float64/69207)

<div class="topic-metadata">

**Author:** [@Tarotis](https://discourse.julialang.org/u/Tarotis)\
**Replies:** 4\
**Last updated:** [October 5, 2021, 8:06am UTC](https://discourse.julialang.org/t/turing-no-method-matching-mvnormal-matrix-float64-float64/69207 "2021-10-05T08:06:22Z")

</div>

Hello everybody, as I want to switch from R to Julia for my Bayesian modelling, tonight I run my first models in Turing. However, I encountered some problems, principally when trying to model a random-intercept model. T…

---

## [Return vector when broadcasting over mean vector to generate random numbers](https://discourse.julialang.org/t/return-vector-when-broadcasting-over-mean-vector-to-generate-random-numbers/68851)

<div class="topic-metadata">

**Author:** [@conorhassan](https://discourse.julialang.org/u/conorhassan)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 7:16am UTC](https://discourse.julialang.org/t/return-vector-when-broadcasting-over-mean-vector-to-generate-random-numbers/68851 "2021-09-28T07:16:39Z")

</div>

Hi there, I am wanting to use something like rand.(Normal.(\[5;10\],1),1) where we have two different mean values \\mu\_1=5, \\mu\_2=10 which we broadcast over to generate 2 random numbers total. I would like the output to …

---

## [How can I calculate different vcov matrices after FixedEffectModels.jl?](https://discourse.julialang.org/t/how-can-i-calculate-different-vcov-matrices-after-fixedeffectmodels-jl/23200)

<div class="topic-metadata">

**Author:** [@flxho](https://discourse.julialang.org/u/flxho)\
**Replies:** 6\
**Last updated:** [September 23, 2021, 11:12pm UTC](https://discourse.julialang.org/t/how-can-i-calculate-different-vcov-matrices-after-fixedeffectmodels-jl/23200 "2021-09-23T23:12:27Z")

</div>

Imagine that for some model we calculate standard errors clustered on one dimension, e.g. state: using DataFrames, RDatasets, FixedEffectModels df = dataset("plm", "Cigar") df\[:StateCategorical\] = categorical(df\[:State…

---

## [Comparison formula with random effect term \[StatsModels.jl\]](https://discourse.julialang.org/t/comparison-formula-with-random-effect-term-statsmodels-jl/68489)

<div class="topic-metadata">

**Author:** [@Yonghee\_Lee](https://discourse.julialang.org/u/Yonghee_Lee)\
**Replies:** 10\
**Last updated:** [September 21, 2021, 3:07pm UTC](https://discourse.julialang.org/t/comparison-formula-with-random-effect-term-statsmodels-jl/68489 "2021-09-21T15:07:07Z")

</div>

The follwing comparision between two formula with random effect term for MixedModels.jl gives false: @formula(y ~ 1 + x + (1 | z3) ) == @formula(y ~ 1 + x + (1 | z3) ) However, a comparision formula without random eff…

---

## [Assortativity coeficient in network analysis](https://discourse.julialang.org/t/assortativity-coeficient-in-network-analysis/68425)

<div class="topic-metadata">

**Author:** [@emchateau](https://discourse.julialang.org/u/emchateau)\
**Replies:** 2\
**Last updated:** [September 21, 2021, 12:48pm UTC](https://discourse.julialang.org/t/assortativity-coeficient-in-network-analysis/68425 "2021-09-21T12:48:22Z")

</div>

Hi, For a network analysis, we are looking to calculate an assortativity coefficient or assortative mixing coefficient of a graph to state the homophily between two categories of nodes. LightGraphs have a assortativity …

---

## [How to do non-centered parameterization in Turing](https://discourse.julialang.org/t/how-to-do-non-centered-parameterization-in-turing/44702)

<div class="topic-metadata">

**Author:** [@vkv](https://discourse.julialang.org/u/vkv)\
**Replies:** 13\
**Last updated:** [September 19, 2021, 9:38am UTC](https://discourse.julialang.org/t/how-to-do-non-centered-parameterization-in-turing/44702 "2021-09-19T09:38:50Z")

</div>

k is a random variable k ~ Normal(μ, σ), μ and σ have some other priors. I want to use a non-centered parameterization of the prior. I want to do something like this k\_ ~ Normal(0, 1) k = k\_ \* σ + μ Since the above doe…

---

## [Econometrics.jl vs. R's plm](https://discourse.julialang.org/t/econometrics-jl-vs-rs-plm/68345)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 2\
**Last updated:** [September 18, 2021, 3:24pm UTC](https://discourse.julialang.org/t/econometrics-jl-vs-rs-plm/68345 "2021-09-18T15:24:21Z")

</div>

I’m working through the Econometrics With R online book, specifically the example in 10.3 on fixed effects regression, but I’m trying to follow along with Econometrics.jl. Here’s the full code to reproduce the example: …

---

## [Materials to better understand Econometrics.jl absorb feature](https://discourse.julialang.org/t/materials-to-better-understand-econometrics-jl-absorb-feature/68276)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 3\
**Last updated:** [September 17, 2021, 5:02pm UTC](https://discourse.julialang.org/t/materials-to-better-understand-econometrics-jl-absorb-feature/68276 "2021-09-17T17:02:01Z")

</div>

This is only a little bit of a Julia question and mostly a question about where to find materials for learning econometrics, but: I’m wondering if anyone can suggest good materials for learning about modelling techniques…

---

## [Type instability of pdf of MixtureModel](https://discourse.julialang.org/t/type-instability-of-pdf-of-mixturemodel/68058)

<div class="topic-metadata">

**Author:** [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Replies:** 2\
**Last updated:** [September 12, 2021, 7:12pm UTC](https://discourse.julialang.org/t/type-instability-of-pdf-of-mixturemodel/68058 "2021-09-12T19:12:36Z")

</div>

When I create a Normal one-dimensional mixture as, d = MixtureModel(\[Normal(-1,1), Normal(1, 1)\], \[0.5,0.5\]) it turns out that the pdf is not type stable: julia\> @code\_warntype pdf(d,0.3) MethodInstance for Distrib…

---

## [ODE model in Turing](https://discourse.julialang.org/t/ode-model-in-turing/67929)

<div class="topic-metadata">

**Author:** [@yunus](https://discourse.julialang.org/u/yunus)\
**Replies:** 3\
**Last updated:** [September 9, 2021, 2:27pm UTC](https://discourse.julialang.org/t/ode-model-in-turing/67929 "2021-09-09T14:27:58Z")

</div>

Hi everyone, I’m new to Julia and would like to use the Turing package for Bayesian inference on high dimensional ordinary differential equations. With this in mind, efficiency is key. To get started I implemented a li…

---

## [Statistics in Julia good enough for my course?](https://discourse.julialang.org/t/statistics-in-julia-good-enough-for-my-course/67409)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 15\
**Last updated:** [September 7, 2021, 2:51pm UTC](https://discourse.julialang.org/t/statistics-in-julia-good-enough-for-my-course/67409 "2021-09-07T14:51:30Z")

</div>

I am starting a Statistics course tomorrow, as an undergrad. While prepping for class, I met the following statement: The faculty I am in at my school swears to MatLab for most things, and I have followed courses on …

---

## [Two questions about GLM](https://discourse.julialang.org/t/two-questions-about-glm/10376)

<div class="topic-metadata">

**Author:** [@mwsohn](https://discourse.julialang.org/u/mwsohn)\
**Replies:** 4\
**Last updated:** [September 7, 2021, 5:55am UTC](https://discourse.julialang.org/t/two-questions-about-glm/10376 "2021-09-07T05:55:59Z")

</div>

I have noticed that I could not use a CategoricalArray as the dependent variable for a logistic regression. When I convert the binary dependent variable into a Float64, then I can estimate the model without any problem. …

---

## [Store Random Number Generator outside Rand()](https://discourse.julialang.org/t/store-random-number-generator-outside-rand/67517)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 1\
**Last updated:** [September 1, 2021, 4:31pm UTC](https://discourse.julialang.org/t/store-random-number-generator-outside-rand/67517 "2021-09-01T16:31:26Z")

</div>

How can store an rng w/ seed outside of rand()? julia\> using Random, Distributions; julia\> rand(MersenneTwister(0), Normal()) 0.6791074260357777 julia\> rand(MersenneTwister(0), Normal()) 0.6791074260357777 julia\> rs=…

---

## [Truncated Poisson Distribution probs not adding up to one](https://discourse.julialang.org/t/truncated-poisson-distribution-probs-not-adding-up-to-one/61053)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 1\
**Last updated:** [August 28, 2021, 4:50am UTC](https://discourse.julialang.org/t/truncated-poisson-distribution-probs-not-adding-up-to-one/61053 "2021-08-28T04:50:39Z")

</div>

using Distributions λ = 2.0; #Poisson parameter zp = 0.4; #zero prob. dpoi = Poisson(λ) dzip = MixtureModel(\[Dirac(0.0), dpoi\], \[zp, 1.0-zp\]) #ZeroInflated ZIP dztp = Truncated(dpoi, 1, Inf) #Ze…

---

## [Bipartite networks](https://discourse.julialang.org/t/bipartite-networks/67065)

<div class="topic-metadata">

**Author:** [@emchateau](https://discourse.julialang.org/u/emchateau)\
**Replies:** 2\
**Last updated:** [August 26, 2021, 10:48pm UTC](https://discourse.julialang.org/t/bipartite-networks/67065 "2021-08-26T22:48:24Z")

</div>

Quite new to Julia but we enjoy it a lot. We are currently trying to use it for network analysis working with LightGraph. We were wondering if some of you could point us to exemple for bi-partite networks analysis done …

---

## [Help fitting linear probability model with GLM.jl](https://discourse.julialang.org/t/help-fitting-linear-probability-model-with-glm-jl/67004)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 4\
**Last updated:** [August 26, 2021, 7:25am UTC](https://discourse.julialang.org/t/help-fitting-linear-probability-model-with-glm-jl/67004 "2021-08-26T07:25:57Z")

</div>

I’m looking to fit a linear probability model of the form: y\_i = \\alpha X\_i + PT\_i \\beta + \\phi\_j + \\lambda\_r + \\epsilon\_i Where: y\_i is 1 if worker is independent contractor on main job, else 0 X\_i is a vector of pe…

---

## [No variability in xgboost outputs? (XGBoost.jl)](https://discourse.julialang.org/t/no-variability-in-xgboost-outputs-xgboost-jl/66211)

<div class="topic-metadata">

**Author:** [@matnbo](https://discourse.julialang.org/u/matnbo)\
**Replies:** 10\
**Last updated:** [August 25, 2021, 5:32pm UTC](https://discourse.julialang.org/t/no-variability-in-xgboost-outputs-xgboost-jl/66211 "2021-08-25T17:32:14Z")

</div>

Dear all I am using functions “xgboost” from the R packages “xgboost” and the Julia package “XGBoost.jl” that both interface the XGBoost library. May be I missed something but I observed surprising outputs from XGBo…

---

## [Landau distribution or something similar](https://discourse.julialang.org/t/landau-distribution-or-something-similar/66063)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 23\
**Last updated:** [August 12, 2021, 4:45pm UTC](https://discourse.julialang.org/t/landau-distribution-or-something-similar/66063 "2021-08-12T16:45:46Z")

</div>

Good day everyone! I need a tiny toss in the right direction since I am stuck with some statistics problems. I am investigating signals which are similar to a Landau distribution but I don’t have a good physical model …

---

## [Laplace approximation for mixed models in Julia (TMB-like functionality)](https://discourse.julialang.org/t/laplace-approximation-for-mixed-models-in-julia-tmb-like-functionality/61796)

<div class="topic-metadata">

**Author:** [@monnahc](https://discourse.julialang.org/u/monnahc)\
**Replies:** 35\
**Last updated:** [August 10, 2021, 10:26pm UTC](https://discourse.julialang.org/t/laplace-approximation-for-mixed-models-in-julia-tmb-like-functionality/61796 "2021-08-10T22:26:53Z")

</div>

Hello, \[Apologies for lack of URLs, I’m a new user so limited to only 2. I can provide more in a follow up as requested\] I’m writing to inquire about the current state of Julia with respect to the Laplace approximation…

---

## [StatsModels R-like formula for a general quadratic model](https://discourse.julialang.org/t/statsmodels-r-like-formula-for-a-general-quadratic-model/64441)

<div class="topic-metadata">

**Author:** [@joergbuchwald](https://discourse.julialang.org/u/joergbuchwald)\
**Replies:** 7\
**Last updated:** [August 7, 2021, 10:46pm UTC](https://discourse.julialang.org/t/statsmodels-r-like-formula-for-a-general-quadratic-model/64441 "2021-08-07T22:46:22Z")

</div>

Hi! I want to construct a regression formula for a general quadratic model without writing out each interaction term separately. I remember that for the python Statsmodels package I could do something like: y~np.power(…

---

## [Any packages for polychoric correlation?](https://discourse.julialang.org/t/any-packages-for-polychoric-correlation/36515)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 2\
**Last updated:** [August 6, 2021, 2:49am UTC](https://discourse.julialang.org/t/any-packages-for-polychoric-correlation/36515 "2021-08-06T02:49:21Z")

</div>

I’m analyzing a survey that has a lot of ratings scales. Is there a package to do polychoric correlations? If not would anyone be willing to take a crack at creating such a thing?

---

## [\[ANN\]¯SNM: simulated neural moments for ABC or Bayesian method of moments](https://discourse.julialang.org/t/ann-snm-simulated-neural-moments-for-abc-or-bayesian-method-of-moments/41592)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 2\
**Last updated:** [August 2, 2021, 9:06am UTC](https://discourse.julialang.org/t/ann-snm-simulated-neural-moments-for-abc-or-bayesian-method-of-moments/41592 "2021-08-02T09:06:11Z")

</div>

SNM is a project to reduce the dimension of statistics used for Approximate Bayesian Computing or the method of simulated moments though use of neural nets. The project allows for creation and training of the neural net,…

---

## [PosDefException: matrix is not positive definite; Cholesky factorization failed](https://discourse.julialang.org/t/posdefexception-matrix-is-not-positive-definite-cholesky-factorization-failed/65518)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 9\
**Last updated:** [July 30, 2021, 5:39pm UTC](https://discourse.julialang.org/t/posdefexception-matrix-is-not-positive-definite-cholesky-factorization-failed/65518 "2021-07-30T17:39:31Z")

</div>

Hello Julians: I am encountering the issue above when I am building a logistic regression model using the GLM package. I was able to catch a reply from @tim.holy that covered some functions that could potentially a…

---

## [@formula for Lathe.preprocess UndefVarError](https://discourse.julialang.org/t/formula-for-lathe-preprocess-undefvarerror/65504)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 12\
**Last updated:** [July 29, 2021, 6:11pm UTC](https://discourse.julialang.org/t/formula-for-lathe-preprocess-undefvarerror/65504 "2021-07-29T18:11:48Z")

</div>

Hello Everyone: I am attempting to perform a logistic regression and for some reason the @formula macro, is not reading. using GLM using Lathe: preprocess fm = @formula(Outcome ~ Sesh1 + Shes2 + Sesh3) logit = glm…

---

## [Probability distribution with complex object support (e.g. \`Tuple{Integer, Matrix}\`)](https://discourse.julialang.org/t/probability-distribution-with-complex-object-support-e-g-tuple-integer-matrix/64964)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 3\
**Last updated:** [July 23, 2021, 5:12pm UTC](https://discourse.julialang.org/t/probability-distribution-with-complex-object-support-e-g-tuple-integer-matrix/64964 "2021-07-23T17:12:59Z")

</div>

The Distributions.jl package has great support for continuous and discrete distributions over scalars, vectors, and matrices. Is it meant to support in any way probability distributions in which sampling would return a m…

---

## [Displaying (and formatting) optimal regression curve equation](https://discourse.julialang.org/t/displaying-and-formatting-optimal-regression-curve-equation/65143)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 0\
**Last updated:** [July 22, 2021, 10:50pm UTC](https://discourse.julialang.org/t/displaying-and-formatting-optimal-regression-curve-equation/65143 "2021-07-22T22:50:45Z")

</div>

Hello Everyone: Is there a way to display and format the regression curve equation when plotting? Step 1: using Lathe.preprocess: TrainTestSplit train, test =TestTrainSplit(MagicalCreatures, .80) Step 2: Informing …

---

## [Chi-Square test of a sample](https://discourse.julialang.org/t/chi-square-test-of-a-sample/63617)

<div class="topic-metadata">

**Author:** [@Mariana](https://discourse.julialang.org/u/Mariana)\
**Replies:** 19\
**Last updated:** [July 16, 2021, 8:50am UTC](https://discourse.julialang.org/t/chi-square-test-of-a-sample/63617 "2021-07-16T08:50:22Z")

</div>

Hello! I am working on a project in which I was given a random sample, and now I want to identify, among 3 distributions, which one created this sample. By plotting a histogram, it seems that the gamma distribution is …

---

## [What's wrong with my chi-squared goodness of fits tests?](https://discourse.julialang.org/t/whats-wrong-with-my-chi-squared-goodness-of-fits-tests/64334)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [July 10, 2021, 9:47am UTC](https://discourse.julialang.org/t/whats-wrong-with-my-chi-squared-goodness-of-fits-tests/64334 "2021-07-10T09:47:11Z")

</div>

Hi there. I am following a MOOC where I am learning goodness of fits tests, in particular the chi-square test for discrete rv and the Kolmogorov-Smirnov test for continuous rv. I implemented the tests in the following c…

---

## [Julia equivalent of scipy binned\_statistic\_dd](https://discourse.julialang.org/t/julia-equivalent-of-scipy-binned-statistic-dd/64260)

<div class="topic-metadata">

**Author:** [@jpmorr](https://discourse.julialang.org/u/jpmorr)\
**Replies:** 4\
**Last updated:** [July 9, 2021, 11:06am UTC](https://discourse.julialang.org/t/julia-equivalent-of-scipy-binned-statistic-dd/64260 "2021-07-09T11:06:23Z")

</div>

I’m a python user and I’ve just started experimenting with julia to see if it is as quick as I keep reading. I’m usually dealing with 3D data and one of the most frequently used functions in my workflow is SciPy’s (binn…

---

## [MCMC landscape](https://discourse.julialang.org/t/mcmc-landscape/25654)

<div class="topic-metadata">

**Author:** [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Replies:** 99\
**Last updated:** [July 2, 2021, 4:04pm UTC](https://discourse.julialang.org/t/mcmc-landscape/25654 "2021-07-02T16:04:16Z")

</div>

We have been using Klara.jl for some of our projects, and are looking for alternatives (due to that package no longer being maintained). My sense is that Mamba.jl, Turing.jl and DynamicHMC.jl are the actively maintained…

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

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