# Statistics

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

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

**Page:** 23

---

## [SubDataFrame to DataFrame](https://discourse.julialang.org/t/subdataframe-to-dataframe/2241)

<div class="topic-metadata">

**Author:** [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)\
**Replies:** 4\
**Last updated:** [August 29, 2018, 9:47am UTC](https://discourse.julialang.org/t/subdataframe-to-dataframe/2241 "2018-08-29T09:47:21Z")

</div>

Hi! I was trying to use a function that not accept SubDataFrames inside by() (in particular https://github.com/JuliaInterop/RCall.jl/issues/167). I found that there is not way to get a DataFrame from a SubDataFrame. It …

---

## [The equivalent of R's var() for matrix?](https://discourse.julialang.org/t/the-equivalent-of-rs-var-for-matrix/14148)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 2\
**Last updated:** [August 27, 2018, 6:35pm UTC](https://discourse.julialang.org/t/the-equivalent-of-rs-var-for-matrix/14148 "2018-08-27T18:35:10Z")

</div>

I am trying to reproduce the following R code in Julia: simdata\_correlation \<- function(coefs=c(0.2, 0.5), n=100){ # Generate outcome y \<- rnorm(n, 0, 1) n\_var \<- length(coefs) X \<- scale(matrix(rnorm(n\*(n\_var…

---

## [\[ANN\] MixedDistributions.jl to manipulate mixed discrete-continuous variables](https://discourse.julialang.org/t/ann-mixeddistributions-jl-to-manipulate-mixed-discrete-continuous-variables/13935)

<div class="topic-metadata">

**Author:** [@mbesancon](https://discourse.julialang.org/u/mbesancon)\
**Replies:** 0\
**Last updated:** [August 23, 2018, 12:17pm UTC](https://discourse.julialang.org/t/ann-mixeddistributions-jl-to-manipulate-mixed-discrete-continuous-variables/13935 "2018-08-23T12:17:00Z")

</div>

Built on top of Distributions.jl, the goal of MixedDistributions is to represent and manipulate discrete-continuous variables. An informal definition of such variable is a continuous distribution with mass points (the C…

---

## [Discrete variables over continuous](https://discourse.julialang.org/t/discrete-variables-over-continuous/13934)

<div class="topic-metadata">

**Author:** [@mbesancon](https://discourse.julialang.org/u/mbesancon)\
**Replies:** 0\
**Last updated:** [August 23, 2018, 12:07pm UTC](https://discourse.julialang.org/t/discrete-variables-over-continuous/13934 "2018-08-23T12:07:23Z")

</div>

From Distributions.jl source: https://github.com/JuliaStats/Distributions.jl/blob/9b7a3483ae5e96a77d406cdce8aa9de0180484f0/src/common.jl#L12 Can’t a discrete distribution have a support over real numbers outside of int…

---

## [Probabilistic programming with source transformations](https://discourse.julialang.org/t/probabilistic-programming-with-source-transformations/8047)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 66\
**Last updated:** [July 2, 2018, 1:59pm UTC](https://discourse.julialang.org/t/probabilistic-programming-with-source-transformations/8047 "2018-07-02T13:59:52Z")

</div>

I have the very beginnings of a probabilistic programming language: Here’s a link to the gist The high-level idea is to represent a model by a quoted expression, and to express inference in terms of macros to transform…

---

## [Simple model not working in Turing](https://discourse.julialang.org/t/simple-model-not-working-in-turing/11305)

<div class="topic-metadata">

**Author:** [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Replies:** 3\
**Last updated:** [June 25, 2018, 6:27pm UTC](https://discourse.julialang.org/t/simple-model-not-working-in-turing/11305 "2018-06-25T18:27:18Z")

</div>

I’ve been exploring Turing, but so far haven’t had much luck. I’ve written the following very simple model using Distributions, Turing import Mamba: describe xs = rand(Normal(3.4, 1.0), 1000) @model gaussian(xs) = be…

---

## [Beta Distribution - full precision may not have been achieved](https://discourse.julialang.org/t/beta-distribution-full-precision-may-not-have-been-achieved/11621)

<div class="topic-metadata">

**Author:** [@acunningham](https://discourse.julialang.org/u/acunningham)\
**Replies:** 7\
**Last updated:** [June 13, 2018, 10:32am UTC](https://discourse.julialang.org/t/beta-distribution-full-precision-may-not-have-been-achieved/11621 "2018-06-13T10:32:29Z")

</div>

Hi, I’m upgrading my code to use Julia 0.6 and all of the libraries along with and working through the code to fix any deprecation warnings / errors. However, since I update the Distributions library (v0.15.0) I seem t…

---

## [Distributions 0.7 RangeGeneratorInt not defined](https://discourse.julialang.org/t/distributions-0-7-rangegeneratorint-not-defined/11577)

<div class="topic-metadata">

**Author:** [@TAJD](https://discourse.julialang.org/u/TAJD)\
**Replies:** 4\
**Last updated:** [June 11, 2018, 12:33pm UTC](https://discourse.julialang.org/t/distributions-0-7-rangegeneratorint-not-defined/11577 "2018-06-11T12:33:56Z")

</div>

Hi, I’m updating my work to use Julia 0.7 and I come up with this error. I see there have been a few issues raised on the repo for updating Distributions to work with 0.7. What is the current status of Distributions and …

---

## [Testing if data is Gamma Distributed](https://discourse.julialang.org/t/testing-if-data-is-gamma-distributed/11198)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [June 5, 2018, 10:55am UTC](https://discourse.julialang.org/t/testing-if-data-is-gamma-distributed/11198 "2018-06-05T10:55:57Z")

</div>

I have a (large) array of data points. When plotting the histogram it looks somewhat gamma distributed. Exactly what would be the procedure for testing whenever this is the case, using Julia? I think I could fit the dat…

---

## [\[ANN\] EmpiricalCDFs.jl registered and documented](https://discourse.julialang.org/t/ann-empiricalcdfs-jl-registered-and-documented/11127)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 0\
**Last updated:** [May 24, 2018, 12:36pm UTC](https://discourse.julialang.org/t/ann-empiricalcdfs-jl-registered-and-documented/11127 "2018-05-24T12:36:40Z")

</div>

I have just registered EmpiricalCDFs.jl and documented it with Documenter.jl. I gave a brief description of the package a few weeks ago: I have used it in conjunction with the following, as yet unregistered, package …

---

## [GLM.jl, error on Binomial distribution, fixed number of trials](https://discourse.julialang.org/t/glm-jl-error-on-binomial-distribution-fixed-number-of-trials/10767)

<div class="topic-metadata">

**Author:** [@hung-q-ngo](https://discourse.julialang.org/u/hung-q-ngo)\
**Replies:** 4\
**Last updated:** [May 8, 2018, 12:03am UTC](https://discourse.julialang.org/t/glm-jl-error-on-binomial-distribution-fixed-number-of-trials/10767 "2018-05-08T00:03:12Z")

</div>

Hello: the following gives an error data = DataFrame(Y = \[0,3,1,7,1,0,7,5,1\], X1 = \[1,2,3,1,2,3,1,2,3\], X2 = \[1,1,1,2,2,2,3,3,3\]) model = glm(@formula(Y ~ X1 + X2), data, Binomial(10)) Error msg: ERROR: LoadError: Dom…

---

## [Fisher's test p-value results appear to differ from matlab, R](https://discourse.julialang.org/t/fishers-test-p-value-results-appear-to-differ-from-matlab-r/10630)

<div class="topic-metadata">

**Author:** [@ScottWatkins](https://discourse.julialang.org/u/ScottWatkins)\
**Replies:** 6\
**Last updated:** [May 1, 2018, 4:25pm UTC](https://discourse.julialang.org/t/fishers-test-p-value-results-appear-to-differ-from-matlab-r/10630 "2018-05-01T16:25:48Z")

</div>

Hi, I was using HypothesisTests.jl and noticed minor, but possibly important differences in the p-value estimate between julia and two other packages when using Fisher’s exact test. In this example, matlab and R users …

---

## [GLM.jl module : 1 test failed](https://discourse.julialang.org/t/glm-jl-module-1-test-failed/10567)

<div class="topic-metadata">

**Author:** [@hung-q-ngo](https://discourse.julialang.org/u/hung-q-ngo)\
**Replies:** 3\
**Last updated:** [April 28, 2018, 8:05am UTC](https://discourse.julialang.org/t/glm-jl-module-1-test-failed/10567 "2018-04-28T08:05:57Z")

</div>

Hello, any idea what I did wrong here? (I have julia version 0.6.2, and latest GLM.jl package). I was running ~/repos/git/GLM.jl/test$ julia runtests.jl and got WARNING: Method definition ==(Base.Nullable{S}, Base.Nul…

---

## [Sampling Multiple samples from NormalInverseGamma distribution](https://discourse.julialang.org/t/sampling-multiple-samples-from-normalinversegamma-distribution/10575)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 2\
**Last updated:** [April 27, 2018, 4:26pm UTC](https://discourse.julialang.org/t/sampling-multiple-samples-from-normalinversegamma-distribution/10575 "2018-04-27T16:26:25Z")

</div>

Hi, I’m trying to sample multiple samples from a NormalInversaGamma distribution. I was using rand() function with two arguments, but is getting the following error: julia\> using ConjugatePriors julia\> D = ConjugatePri…

---

## [Using Survey/Inverse Probability Weights in Regression](https://discourse.julialang.org/t/using-survey-inverse-probability-weights-in-regression/10444)

<div class="topic-metadata">

**Author:** [@jhartma](https://discourse.julialang.org/u/jhartma)\
**Replies:** 3\
**Last updated:** [April 19, 2018, 8:45pm UTC](https://discourse.julialang.org/t/using-survey-inverse-probability-weights-in-regression/10444 "2018-04-19T20:45:57Z")

</div>

Hi, I hope the answer is not too obvious as I am new to Julia. I want to do some regressions with a weighted sample. At the moment I use the GLM package and I saw there are ProbabilityWeights, but I haven’t figured out …

---

## [When should a package be added to JuliaStats](https://discourse.julialang.org/t/when-should-a-package-be-added-to-juliastats/10380)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 10\
**Last updated:** [April 19, 2018, 11:53am UTC](https://discourse.julialang.org/t/when-should-a-package-be-added-to-juliastats/10380 "2018-04-19T11:53:03Z")

</div>

Hi all, I was wondering what the procedure is for deciding if a package should be added to JuliaStats, and, if so, how it is done. I’ve got two packages that are possibly suitable, DependentBootstrap, and ForecastEval. …

---

## [ANN: EmpiricalCDFs.jl](https://discourse.julialang.org/t/ann-empiricalcdfs-jl/10411)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 0\
**Last updated:** [April 18, 2018, 11:04am UTC](https://discourse.julialang.org/t/ann-empiricalcdfs-jl/10411 "2018-04-18T11:04:43Z")

</div>

EmpiricalCDFs.jl EmpiricalCDFs implements empirical CDFs; building, evaluating, random sampling, evaluating the inverse, etc. It is useful especially for examining the tail of the CDF obtained from streaming a large num…

---

## [Efficient IRLS](https://discourse.julialang.org/t/efficient-irls/9936)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 2\
**Last updated:** [April 4, 2018, 10:58pm UTC](https://discourse.julialang.org/t/efficient-irls/9936 "2018-04-04T22:58:27Z")

</div>

I was inspecting GLM.jl IRLS implementation, but haven’t figured out from the code how many matrix decompositions it performs. For any given, A::AbstractMatrix{\<:Real}, b::AbstractVector{\<:Real}, and wts::AbstractWeight…

---

## [Has anyone noticed numerical instability in Base.LinAlg.cholfact or Base.LinAlg.ishermitian?](https://discourse.julialang.org/t/has-anyone-noticed-numerical-instability-in-base-linalg-cholfact-or-base-linalg-ishermitian/10163)

<div class="topic-metadata">

**Author:** [@krylea](https://discourse.julialang.org/u/krylea)\
**Replies:** 3\
**Last updated:** [April 4, 2018, 10:00pm UTC](https://discourse.julialang.org/t/has-anyone-noticed-numerical-instability-in-base-linalg-cholfact-or-base-linalg-ishermitian/10163 "2018-04-04T22:00:45Z")

</div>

I have been using some stuff from Distributions.jl and ConjugatePriors.jl to (amongst other things) sample from a NormalWishart distribution. I am getting a whole bunch of problems that trace back to Base.LinAlg.ishermit…

---

## [Cross-correlation function in Julia vs. Python](https://discourse.julialang.org/t/cross-correlation-function-in-julia-vs-python/7573)

<div class="topic-metadata">

**Author:** [@Duls91](https://discourse.julialang.org/u/Duls91)\
**Replies:** 12\
**Last updated:** [March 21, 2018, 7:29pm UTC](https://discourse.julialang.org/t/cross-correlation-function-in-julia-vs-python/7573 "2018-03-21T19:29:49Z")

</div>

Hi there, I am new to Julia. I want to perform a cross-correlation with two 2d arrays (both 5X5). Using crosscor() (StatsBase.jl) returns a 9x5x5 array. What I would like is the cross-correlation matrix of dims M+N-1, s…

---

## [Package for deseasonalizing](https://discourse.julialang.org/t/package-for-deseasonalizing/9275)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [February 23, 2018, 12:49pm UTC](https://discourse.julialang.org/t/package-for-deseasonalizing/9275 "2018-02-23T12:49:19Z")

</div>

Is there a Julia package that has some functionality for deseasonalizing time series data (eg monthly)? I can implement a naive approach (regress, remove) very quickly, looking for something more sophisticated. If there…

---

## [Product of univariate distributions](https://discourse.julialang.org/t/product-of-univariate-distributions/1350)

<div class="topic-metadata">

**Author:** [@nbren12](https://discourse.julialang.org/u/nbren12)\
**Replies:** 13\
**Last updated:** [February 18, 2018, 6:27pm UTC](https://discourse.julialang.org/t/product-of-univariate-distributions/1350 "2018-02-18T18:27:27Z")

</div>

In Distributions.jl is it possible to create a cartesian product distribution, given two univariate random variables? I want to do this to make a multivariate uniform distribution supported over \[0,1\]\\times\[0,1\]

---

## [Gentleman's AS75 (+ Miller AS 274) Incremental WLS Algorithms](https://discourse.julialang.org/t/gentlemans-as75-miller-as-274-incremental-wls-algorithms/8822)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 7\
**Last updated:** [February 5, 2018, 9:14pm UTC](https://discourse.julialang.org/t/gentlemans-as75-miller-as-274-incremental-wls-algorithms/8822 "2018-02-05T21:14:12Z")

</div>

Has someone already implemented Gentleman’s AS75 WLS code in Julia? It is not only fast and robust, but works nicely with adding single obs, one at a time. https://www.jstor.org/stable/2347147 https://www.jstor.org/st…

---

## [Error when passing long array of data to Turing.jl](https://discourse.julialang.org/t/error-when-passing-long-array-of-data-to-turing-jl/8098)

<div class="topic-metadata">

**Author:** [@EricChameroy](https://discourse.julialang.org/u/EricChameroy)\
**Replies:** 0\
**Last updated:** [January 1, 2018, 10:05pm UTC](https://discourse.julialang.org/t/error-when-passing-long-array-of-data-to-turing-jl/8098 "2018-01-01T22:05:17Z")

</div>

Hi everyone, I’m trying to pass an array of data through a model I’ve created using Turing.jl. The model looks like this: @model howell1(height) = begin mu ~ Normal(178, 20) sigma ~ Uniform(0, 50) \[height\[i\] ~ Norma…

---

## [Compositional data analysis](https://discourse.julialang.org/t/compositional-data-analysis/7863)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 1\
**Last updated:** [December 20, 2017, 3:56pm UTC](https://discourse.julialang.org/t/compositional-data-analysis/7863 "2017-12-20T15:56:47Z")

</div>

Any package for compositional data analysis? I may start one if there is no work already on the way.

---

## [Generate random value from a given function, out of box](https://discourse.julialang.org/t/generate-random-value-from-a-given-function-out-of-box/5793)

<div class="topic-metadata">

**Author:** [@misha\_mikhasenko](https://discourse.julialang.org/u/misha_mikhasenko)\
**Replies:** 17\
**Last updated:** [December 20, 2017, 3:50pm UTC](https://discourse.julialang.org/t/generate-random-value-from-a-given-function-out-of-box/5793 "2017-12-20T15:50:49Z")

</div>

Hi, I am looking for a simple way to generate a random number according to a given distribution. The function is not easy to invert and I do not want to do it. I will be happy to find a numerical method. It could digi…

---

## [Range for core function rand()](https://discourse.julialang.org/t/range-for-core-function-rand/7685)

<div class="topic-metadata">

**Author:** [@zlon](https://discourse.julialang.org/u/zlon)\
**Replies:** 1\
**Last updated:** [December 10, 2017, 10:01pm UTC](https://discourse.julialang.org/t/range-for-core-function-rand/7685 "2017-12-10T22:01:23Z")

</div>

I couldn’t find it in docs. If X=rand(), then X comes from \[0 1\] or \[0 1) or some other variance?

---

## [(Integrated) autocorrelation time](https://discourse.julialang.org/t/integrated-autocorrelation-time/7403)

<div class="topic-metadata">

**Author:** [@Sleort](https://discourse.julialang.org/u/Sleort)\
**Replies:** 6\
**Last updated:** [December 1, 2017, 3:34am UTC](https://discourse.julialang.org/t/integrated-autocorrelation-time/7403 "2017-12-01T03:34:36Z")

</div>

I could not find any (integrated) autocorrelation time estimator in the basic statistics packages\*, so I made a crude implementation myself based on StatsBase.autocor and the tips given in http://www.stat.unc.edu/faculty…

---

## [Weighted covariance, how to compute?](https://discourse.julialang.org/t/weighted-covariance-how-to-compute/7282)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 9\
**Last updated:** [November 25, 2017, 9:02am UTC](https://discourse.julialang.org/t/weighted-covariance-how-to-compute/7282 "2017-11-25T09:02:23Z")

</div>

If d is data set and k,l=size(d) cov = d’\*d/k-mean(d,1)'\*mean(d,1) It is nice formula , But how to compute the cov if any row is weighted by vector w ? Paul

---

## [Http://juliastats.org domain seems to have expired?](https://discourse.julialang.org/t/http-juliastats-org-domain-seems-to-have-expired/7192)

<div class="topic-metadata">

**Author:** [@NaOH](https://discourse.julialang.org/u/NaOH)\
**Replies:** 9\
**Last updated:** [November 21, 2017, 1:19pm UTC](https://discourse.julialang.org/t/http-juliastats-org-domain-seems-to-have-expired/7192 "2017-11-21T13:19:22Z")

</div>

Dear JuliaStats team, I just wanted to let you know that it seems the jluiastats.org domain name seems to have expired: http://www.juliastats.org And now it redirects to some random page. Is there somewhere I can d…

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

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