# Statistics

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

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

**Page:** 3

---

## [Do we need separate package for OwensQ function (power calk)?](https://discourse.julialang.org/t/do-we-need-separate-package-for-owensq-function-power-calk/120346)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 0\
**Last updated:** [September 28, 2024, 1:06pm UTC](https://discourse.julialang.org/t/do-we-need-separate-package-for-owensq-function-power-calk/120346 "2024-09-28T13:06:40Z")

</div>

Do we need separate package for OwensQ function (power calk) ? So this is the question. I’m using OwensQ function for sample size estimation for BE study in ClinicalTrialUtilities.jl , but this package was made when I …

---

## [Turing models, vectors, and type stability?](https://discourse.julialang.org/t/turing-models-vectors-and-type-stability/119928)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 0\
**Last updated:** [September 26, 2024, 7:04pm UTC](https://discourse.julialang.org/t/turing-models-vectors-and-type-stability/119928 "2024-09-26T19:04:06Z")

</div>

Hi, I’m puzzled by a type instability issue in the Turing model below. When the model defines the vector p2 before iterating, the model is type stable. When using the \[...\] notation, the model is unstable. using Linear…

---

## [Multivariate Student's T distribution?](https://discourse.julialang.org/t/multivariate-students-t-distribution/119676)

<div class="topic-metadata">

**Author:** [@rsenne](https://discourse.julialang.org/u/rsenne)\
**Replies:** 5\
**Last updated:** [September 23, 2024, 4:05pm UTC](https://discourse.julialang.org/t/multivariate-students-t-distribution/119676 "2024-09-23T16:05:47Z")

</div>

Does there exist any active implementations of a multivariate Student’s T distribution? I need one for a model I am implementing but the only information I could find was from a multi year old issue on the Distributions.…

---

## [Training Bijectors.jl on samples](https://discourse.julialang.org/t/training-bijectors-jl-on-samples/119661)

<div class="topic-metadata">

**Author:** [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Replies:** 3\
**Last updated:** [September 21, 2024, 2:45am UTC](https://discourse.julialang.org/t/training-bijectors-jl-on-samples/119661 "2024-09-21T02:45:40Z")

</div>

I need to train a Normalizing flow on some samples and then use it as a distribution. @Red-Portal suggested me to use Bijectors.jl. However, when trying to follow the example in the documentation, I noticed there is an …

---

## [WAIC computation](https://discourse.julialang.org/t/waic-computation/119553)

<div class="topic-metadata">

**Author:** [@alexten](https://discourse.julialang.org/u/alexten)\
**Replies:** 1\
**Last updated:** [September 18, 2024, 4:04pm UTC](https://discourse.julialang.org/t/waic-computation/119553 "2024-09-18T16:04:53Z")

</div>

I am trying to fill in some gaps left from trying implement model comparison of a model fitted in Turing. Following McElreath’s Statistical Rethinking (2nd ed) and getting help from Claude.ai, I have come up with a funct…

---

## [Truncate a distribution using draws of a random variable as bound](https://discourse.julialang.org/t/truncate-a-distribution-using-draws-of-a-random-variable-as-bound/117683)

<div class="topic-metadata">

**Author:** [@Tobias-Thomas](https://discourse.julialang.org/u/Tobias-Thomas)\
**Replies:** 1\
**Last updated:** [September 2, 2024, 7:52am UTC](https://discourse.julialang.org/t/truncate-a-distribution-using-draws-of-a-random-variable-as-bound/117683 "2024-09-02T07:52:27Z")

</div>

Hi, Is it possible to use the draw of one random variable as the bound for another one? In my example, I have a simple linear relationship with x-values in the interval \[0,1\] and I want to bound the resulting y-value to…

---

## [Matrix inverse and multivariate normal distribution](https://discourse.julialang.org/t/matrix-inverse-and-multivariate-normal-distribution/118724)

<div class="topic-metadata">

**Author:** [@fmor](https://discourse.julialang.org/u/fmor)\
**Replies:** 2\
**Last updated:** [August 28, 2024, 6:07pm UTC](https://discourse.julialang.org/t/matrix-inverse-and-multivariate-normal-distribution/118724 "2024-08-28T18:07:09Z")

</div>

Hello, I am fitting a spatio-temporal-and-informed-with-covariates bayesian model in Julia. I have a regression vector with prior distribution \\vec{\\beta}\_t \\sim \\mathcal{N}\_p(\\vec{b\_0},s^2I) (where p is the number of c…

---

## [Misspecified Turing.jl model?](https://discourse.julialang.org/t/misspecified-turing-jl-model/118451)

<div class="topic-metadata">

**Author:** [@Domenic\_Di\_Francesco](https://discourse.julialang.org/u/Domenic_Di_Francesco)\
**Replies:** 2\
**Last updated:** [August 28, 2024, 3:22pm UTC](https://discourse.julialang.org/t/misspecified-turing-jl-model/118451 "2024-08-28T15:22:16Z")

</div>

hi everyone - I’m thinking I may have miss-specified a Turing model :thinking: I want to combine measurements of X, from 2 tests: test A, has a known precision (test\_A\_error) test B has an unknown precision (test\_B\_er…

---

## [How to efficiently generate a distribution for every element in matrix](https://discourse.julialang.org/t/how-to-efficiently-generate-a-distribution-for-every-element-in-matrix/118695)

<div class="topic-metadata">

**Author:** [@ZC\_H](https://discourse.julialang.org/u/ZC_H)\
**Replies:** 2\
**Last updated:** [August 28, 2024, 7:23am UTC](https://discourse.julialang.org/t/how-to-efficiently-generate-a-distribution-for-every-element-in-matrix/118695 "2024-08-28T07:23:21Z")

</div>

for example, I have two matrix which separately represent mu and std: mu = \[1.0 2.0; 3.0 4.0\] std = \[0.1 0.2; 0.3 0.4\] I want to generate a matrix Normal Distribution like this: dist = \[Normal(1.0, 0.1) Normal(2.0, 0.…

---

## [CustomMean with AbstractGPs](https://discourse.julialang.org/t/custommean-with-abstractgps/118406)

<div class="topic-metadata">

**Author:** [@stefanocovino](https://discourse.julialang.org/u/stefanocovino)\
**Replies:** 0\
**Last updated:** [August 20, 2024, 9:02am UTC](https://discourse.julialang.org/t/custommean-with-abstractgps/118406 "2024-08-20T09:02:09Z")

</div>

Hello, I’m trying to write a CustomMean with AbstractGPs using a function with parameters, i.e. f(x,a,b,c), typically x has dimension 1. However, I can’t understand how I can manage the parameters. Has anyone a working…

---

## [Isposdef and eigvals do not agree](https://discourse.julialang.org/t/isposdef-and-eigvals-do-not-agree/118191)

<div class="topic-metadata">

**Author:** [@fmor](https://discourse.julialang.org/u/fmor)\
**Replies:** 9\
**Last updated:** [August 16, 2024, 2:27pm UTC](https://discourse.julialang.org/t/isposdef-and-eigvals-do-not-agree/118191 "2024-08-16T14:27:33Z")

</div>

Hello, I was dealing with some matrices (for a statistical model), when I came across this case which raised an error during the fitting. I was trying to compute beta\_iter\[t\] = rand(MvNormal(b\_star, inv(A\_star))) but a…

---

## [Multiple fixed effects using FixedEffects.jl](https://discourse.julialang.org/t/multiple-fixed-effects-using-fixedeffects-jl/117113)

<div class="topic-metadata">

**Author:** [@shilong-sun](https://discourse.julialang.org/u/shilong-sun)\
**Replies:** 2\
**Last updated:** [July 17, 2024, 2:16am UTC](https://discourse.julialang.org/t/multiple-fixed-effects-using-fixedeffects-jl/117113 "2024-07-17T02:16:30Z")

</div>

Hi I’m using FixedEffects.jl to residualize matrices with fixed effects. I might be missing something with the syntax, but I couldn’t get the same results using a simple regression approach. Below is the code from the r…

---

## [Continuous versions of Poisson, Binomial, NegativeBinomial](https://discourse.julialang.org/t/continuous-versions-of-poisson-binomial-negativebinomial/115781)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 5\
**Last updated:** [July 4, 2024, 8:44am UTC](https://discourse.julialang.org/t/continuous-versions-of-poisson-binomial-negativebinomial/115781 "2024-07-04T08:44:08Z")

</div>

Dear All, For one of my projects, I need to have continuous versions of the Poisson, Binomial and NegativeBinomial distributions, along the lines of Padellini and Rue. Before I start the tedious task of porting these ov…

---

## [Multi-step prediction of autoregressive model from StatsModels](https://discourse.julialang.org/t/multi-step-prediction-of-autoregressive-model-from-statsmodels/113089)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 4\
**Last updated:** [July 3, 2024, 7:43pm UTC](https://discourse.julialang.org/t/multi-step-prediction-of-autoregressive-model-from-statsmodels/113089 "2024-07-03T19:43:50Z")

</div>

If I have some electricity demand, it is reasonable to assume that it will be similar to the day before. So with hourly data, 24 steps before. Additional influences are also present: using StatsModels, DataFrames, GLM N…

---

## [Does MixedModels assume a normal distribution on coefficient estimates?](https://discourse.julialang.org/t/does-mixedmodels-assume-a-normal-distribution-on-coefficient-estimates/116152)

<div class="topic-metadata">

**Author:** [@ergative](https://discourse.julialang.org/u/ergative)\
**Replies:** 1\
**Last updated:** [June 26, 2024, 3:44pm UTC](https://discourse.julialang.org/t/does-mixedmodels-assume-a-normal-distribution-on-coefficient-estimates/116152 "2024-06-26T15:44:10Z")

</div>

Hi–new to Julia here, sorry if this has been answered. I came over from lme4 in R-land, where you get p-values from lmers from the lmerTest package, which uses the Satterthwaite method for estimating degrees of freedom a…

---

## [StatsBase crosscor standard deviation does not have lags applied](https://discourse.julialang.org/t/statsbase-crosscor-standard-deviation-does-not-have-lags-applied/116182)

<div class="topic-metadata">

**Author:** [@BG-marine](https://discourse.julialang.org/u/BG-marine)\
**Replies:** 1\
**Last updated:** [June 25, 2024, 5:47am UTC](https://discourse.julialang.org/t/statsbase-crosscor-standard-deviation-does-not-have-lags-applied/116182 "2024-06-25T05:47:57Z")

</div>

In StatsBase.crosscor!() why is the standard deviation for normalisation calculated before the lag is applied to the input vectors, rather than after? This doesn’t appear to follow a standard correlation formula. Cross…

---

## [Transfer ClusteringAPI.jl to JuliaStats](https://discourse.julialang.org/t/transfer-clusteringapi-jl-to-juliastats/114187)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 7\
**Last updated:** [June 18, 2024, 7:46pm UTC](https://discourse.julialang.org/t/transfer-clusteringapi-jl-to-juliastats/114187 "2024-06-18T19:46:06Z")

</div>

Hi, I’ve tried to find a JuliaStats org admin on Slack, but was unsuccessful. The GitHub website also doesn’t tell me who to reach out to in private, so I hope someone can see this in this post instead! I would like to…

---

## [Fitting values in a vector to separate Onlinestats Univariate statistics](https://discourse.julialang.org/t/fitting-values-in-a-vector-to-separate-onlinestats-univariate-statistics/115664)

<div class="topic-metadata">

**Author:** [@Dario\_Sarra](https://discourse.julialang.org/u/Dario_Sarra)\
**Replies:** 1\
**Last updated:** [June 15, 2024, 11:16am UTC](https://discourse.julialang.org/t/fitting-values-in-a-vector-to-separate-onlinestats-univariate-statistics/115664 "2024-06-15T11:16:22Z")

</div>

My final goal was to compute N separate Means after vectorizing a CircularBuffer Matrix and update the means after a certain number of steps of the Circular buffer. I know how to get separate calculations using LinearAlg…

---

## [Kullback-Leibler divergence for vector and normal distribution](https://discourse.julialang.org/t/kullback-leibler-divergence-for-vector-and-normal-distribution/58246)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 7\
**Last updated:** [June 8, 2024, 6:22am UTC](https://discourse.julialang.org/t/kullback-leibler-divergence-for-vector-and-normal-distribution/58246 "2024-06-08T06:22:10Z")

</div>

I want to calculate the Kullback-Leibler divergence of data I collected in a vector x, which I interpret as samples from an unknown distribution, and the standard normal distribution. The maths behind the KL divergence a…

---

## [Variable sized windows for moving average](https://discourse.julialang.org/t/variable-sized-windows-for-moving-average/115078)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 8\
**Last updated:** [June 4, 2024, 6:19am UTC](https://discourse.julialang.org/t/variable-sized-windows-for-moving-average/115078 "2024-06-04T06:19:56Z")

</div>

Hi, I saw some libraries for moving averages (RollingFunctions.jl), but I did not find one with the option to make the window size variable. My specific case would be a moving average over a “time series”, averaging the…

---

## [Approximating the inverse of an expensive CDF function](https://discourse.julialang.org/t/approximating-the-inverse-of-an-expensive-cdf-function/114809)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 2\
**Last updated:** [May 28, 2024, 4:32am UTC](https://discourse.julialang.org/t/approximating-the-inverse-of-an-expensive-cdf-function/114809 "2024-05-28T04:32:32Z")

</div>

I have a CDF for a real-valued random variable that is relatively expensive to compute and I require an approximate inverse to implement sampling. There exist techniques adapted to this use case. One technique, implemen…

---

## [Time-series analysis - Probabilistic inference on RQA ( SymbolicInference.jl)](https://discourse.julialang.org/t/time-series-analysis-probabilistic-inference-on-rqa-symbolicinference-jl/114701)

<div class="topic-metadata">

**Author:** [@fargolo](https://discourse.julialang.org/u/fargolo)\
**Replies:** 0\
**Last updated:** [May 24, 2024, 8:15pm UTC](https://discourse.julialang.org/t/time-series-analysis-probabilistic-inference-on-rqa-symbolicinference-jl/114701 "2024-05-24T20:15:40Z")

</div>

How it started The SymbolicInference.jl package uses Analytic Combinatorics to perform probabilistic inference over certain combinatorial classes. The first application is explained in this white paper Probabilistic in…

---

## [Why does rand(Complex{Float64},N,N) always host a large eigenvalue?](https://discourse.julialang.org/t/why-does-rand-complex-float64-n-n-always-host-a-large-eigenvalue/114402)

<div class="topic-metadata">

**Author:** [@yosuga](https://discourse.julialang.org/u/yosuga)\
**Replies:** 5\
**Last updated:** [May 17, 2024, 5:17pm UTC](https://discourse.julialang.org/t/why-does-rand-complex-float64-n-n-always-host-a-large-eigenvalue/114402 "2024-05-17T17:17:36Z")

</div>

rand(Complex{Float64},N,N) has a single huge eigenvalue: 1000-element Vector{ComplexF64}: -12.783541578066096 + 0.3846555290226826im -12.640629292870221 + 0.3298358788214941im -12.532390460903775 - 0.46833512398154803im…

---

## [Extracting the loglikelihood function from GLM?](https://discourse.julialang.org/t/extracting-the-loglikelihood-function-from-glm/113849)

<div class="topic-metadata">

**Author:** [@alexfakos](https://discourse.julialang.org/u/alexfakos)\
**Replies:** 6\
**Last updated:** [May 9, 2024, 8:54pm UTC](https://discourse.julialang.org/t/extracting-the-loglikelihood-function-from-glm/113849 "2024-05-09T20:54:49Z")

</div>

I am trying to extract the loglikelihood function that maps the parameter vector to each observation. The goal is to use the likelihood function to generate the score and hessian for each observation to use for inference…

---

## [LASSO or step-wise regression for Julia](https://discourse.julialang.org/t/lasso-or-step-wise-regression-for-julia/62061)

<div class="topic-metadata">

**Author:** [@Babou](https://discourse.julialang.org/u/Babou)\
**Replies:** 7\
**Last updated:** [May 6, 2024, 2:29pm UTC](https://discourse.julialang.org/t/lasso-or-step-wise-regression-for-julia/62061 "2024-05-06T14:29:26Z")

</div>

I want to write a julia script to run a linear mixed model with a lasso regression as my code in R is quite slow. Is there a package that works with the mixed models package that implements lasso or stepwise regression? …

---

## [Get smooth CDF from OnlineStats's Quantile](https://discourse.julialang.org/t/get-smooth-cdf-from-onlinestatss-quantile/113886)

<div class="topic-metadata">

**Author:** [@disberd](https://discourse.julialang.org/u/disberd)\
**Replies:** 6\
**Last updated:** [May 6, 2024, 1:41pm UTC](https://discourse.julialang.org/t/get-smooth-cdf-from-onlinestatss-quantile/113886 "2024-05-06T13:41:44Z")

</div>

Hello, I am tracking statistics of some simulations using the Quantile object from the amazing OnlineStats.jl I am also interested in being able to plot the CDF of the variable being observed with the Quantile but tryi…

---

## [Classical Hypothesis tests: Wald, LR, LM](https://discourse.julialang.org/t/classical-hypothesis-tests-wald-lr-lm/39575)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 10\
**Last updated:** [May 4, 2024, 6:34pm UTC](https://discourse.julialang.org/t/classical-hypothesis-tests-wald-lr-lm/39575 "2024-05-04T18:34:35Z")

</div>

I was able to code up the LR & Wald tests. I need help w/ the score test. Does anyone know how to obtain the loglik functions after glm? using DataFrames, GLM, Distributions n=7; k=1; X=randn(n,k); β=\[2 ;-4\]; σ\_e = 10…

---

## [How to extract the Std. Error of a linear regression model by GLM?](https://discourse.julialang.org/t/how-to-extract-the-std-error-of-a-linear-regression-model-by-glm/113793)

<div class="topic-metadata">

**Author:** [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Replies:** 3\
**Last updated:** [May 3, 2024, 3:10pm UTC](https://discourse.julialang.org/t/how-to-extract-the-std-error-of-a-linear-regression-model-by-glm/113793 "2024-05-03T15:10:39Z")

</div>

How to extract the Std. Error of a linear regression model by GLM.jl? julia\> using GLM julia\> x = rand(10); y = rand(10); julia\> lr = lm(@formula(y~x), (;x, y)) StatsModels.TableRegressionModel{LinearModel{GLM.LmResp{…

---

## [Turing: Non informative improper prior](https://discourse.julialang.org/t/turing-non-informative-improper-prior/88069)

<div class="topic-metadata">

**Author:** [@Sourish](https://discourse.julialang.org/u/Sourish)\
**Replies:** 14\
**Last updated:** [May 2, 2024, 5:10pm UTC](https://discourse.julialang.org/t/turing-non-informative-improper-prior/88069 "2024-05-02T17:10:15Z")

</div>

Hi I am looking for an example of how to assign non-informative improper prior using Turing.jl? So far all example that I have seen uses proper prior. Thanks and regards, Sourish

---

## [Looking for Julia implementations of online clustering algorithms](https://discourse.julialang.org/t/looking-for-julia-implementations-of-online-clustering-algorithms/113649)

<div class="topic-metadata">

**Author:** [@vvbond](https://discourse.julialang.org/u/vvbond)\
**Replies:** 4\
**Last updated:** [May 1, 2024, 10:28am UTC](https://discourse.julialang.org/t/looking-for-julia-implementations-of-online-clustering-algorithms/113649 "2024-05-01T10:28:41Z")

</div>

… to no avail. The use case is quite common: real time clustering of streamed data. I envision a fusion between functionalities of the excellent OnlineStats.jl and Clustering.jl, but so far couldn’t find any ready imp…

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

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