# Statistics

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

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

**Page:** 17

---

## [Implementing one-class SVM for Novelty Detection](https://discourse.julialang.org/t/implementing-one-class-svm-for-novelty-detection/1357)

<div class="topic-metadata">

**Author:** [@KrishnaKanhaiya](https://discourse.julialang.org/u/KrishnaKanhaiya)\
**Replies:** 11\
**Last updated:** [July 28, 2020, 10:58am UTC](https://discourse.julialang.org/t/implementing-one-class-svm-for-novelty-detection/1357 "2020-07-28T10:58:50Z")

</div>

Hi, I want to implement one-class SVM in Julia(SVM.jl) very similar to scikit-learn in python (here). I see that SVM.jl is unmaintained and will be removed from the metadata shortly. Is it going to be removed for sure?…

---

## [Building some Data analysis Tutorials](https://discourse.julialang.org/t/building-some-data-analysis-tutorials/40455)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 35\
**Last updated:** [July 24, 2020, 11:46pm UTC](https://discourse.julialang.org/t/building-some-data-analysis-tutorials/40455 "2020-07-24T23:46:44Z")

</div>

For several years I’ve wanted to jump into Julia. I tried last summer but wound up with no time because my wife was teaching a course and I had the kids full time. Now I have got a couple projects where I’m using Julia a…

---

## [Generate Covariance Matrix with Pre-Specified Restrictions](https://discourse.julialang.org/t/generate-covariance-matrix-with-pre-specified-restrictions/43439)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 6\
**Last updated:** [July 23, 2020, 4:50pm UTC](https://discourse.julialang.org/t/generate-covariance-matrix-with-pre-specified-restrictions/43439 "2020-07-23T16:50:25Z")

</div>

I have a 3 by 3 matrix of random variables and I would like to generate the covariance matrix of these 9 random variables. The restrictions are as follows: \\begin{aligned} \\operatorname{Corr}\\left(b\_{u\_{1}, d\_{1}}, b\_{…

---

## [\[ANN(s)\] HalfSpectral.jl: a convenient interface for half-spectral covariance functions, and GPMaxlik.jl: trust-region based maximum likelihood estimation for Gaussian Processes](https://discourse.julialang.org/t/ann-s-halfspectral-jl-a-convenient-interface-for-half-spectral-covariance-functions-and-gpmaxlik-jl-trust-region-based-maximum-likelihood-estimation-for-gaussian-processes/43565)

<div class="topic-metadata">

**Author:** [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Replies:** 0\
**Last updated:** [July 23, 2020, 4:18pm UTC](https://discourse.julialang.org/t/ann-s-halfspectral-jl-a-convenient-interface-for-half-spectral-covariance-functions-and-gpmaxlik-jl-trust-region-based-maximum-likelihood-estimation-for-gaussian-processes/43565 "2020-07-23T16:18:13Z")

</div>

Hey all— Just a quick announcement of a couple little pieces of software that some of you may find useful or interesting. HalfSpectral.jl is a simple little package that implements half spectral covariance functions in…

---

## [Extending the \`@formula\` syntax to generate functions](https://discourse.julialang.org/t/extending-the-formula-syntax-to-generate-functions/42882)

<div class="topic-metadata">

**Author:** [@BrendonChau](https://discourse.julialang.org/u/BrendonChau)\
**Replies:** 3\
**Last updated:** [July 20, 2020, 6:23pm UTC](https://discourse.julialang.org/t/extending-the-formula-syntax-to-generate-functions/42882 "2020-07-20T18:23:42Z")

</div>

I’m working on a project trying to use @formula in a fairly novel way, for example, if I wanted to use GLM.jl to fit a linear model with two predictors and their interaction I would use something like this: f = @formula…

---

## [Need help with Implementing a simple planner in Julia in the context of the blocks world](https://discourse.julialang.org/t/need-help-with-implementing-a-simple-planner-in-julia-in-the-context-of-the-blocks-world/42928)

<div class="topic-metadata">

**Author:** [@Moreno](https://discourse.julialang.org/u/Moreno)\
**Replies:** 17\
**Last updated:** [July 16, 2020, 10:25am UTC](https://discourse.julialang.org/t/need-help-with-implementing-a-simple-planner-in-julia-in-the-context-of-the-blocks-world/42928 "2020-07-16T10:25:02Z")

</div>

Consider a collection of blocks and several tables. A block A can be in the box or on one of the tables at a given time. While on a table, a block A can be on the surface of the table or on top of another block B. The …

---

## [Add column names to a GLM.LinearModel estimated in matrix form](https://discourse.julialang.org/t/add-column-names-to-a-glm-linearmodel-estimated-in-matrix-form/40676)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 11\
**Last updated:** [July 1, 2020, 6:20pm UTC](https://discourse.julialang.org/t/add-column-names-to-a-glm-linearmodel-estimated-in-matrix-form/40676 "2020-07-01T18:20:33Z")

</div>

I am estimating a bunch of linear models using GLM.lm(X, y), where X is a matrix. I have column names for X from a database, and I would like to have the result from fit/lm to include them. MWE: using GLM X = hcat(ones(…

---

## [Nested random effects in MixedModels](https://discourse.julialang.org/t/nested-random-effects-in-mixedmodels/40290)

<div class="topic-metadata">

**Author:** [@talat](https://discourse.julialang.org/u/talat)\
**Replies:** 1\
**Last updated:** [June 30, 2020, 3:50pm UTC](https://discourse.julialang.org/t/nested-random-effects-in-mixedmodels/40290 "2020-06-30T15:50:40Z")

</div>

What is the correct specification of nested random effects in julia’s MixedModels package? What I’m trying to model can be done in R using lme4: y ~ x + (1 | site / block) so that blocks are nested in sites. How would…

---

## [Contributing to packages](https://discourse.julialang.org/t/contributing-to-packages/42216)

<div class="topic-metadata">

**Author:** [@bojohnson02](https://discourse.julialang.org/u/bojohnson02)\
**Replies:** 5\
**Last updated:** [June 29, 2020, 1:43pm UTC](https://discourse.julialang.org/t/contributing-to-packages/42216 "2020-06-29T13:43:05Z")

</div>

I’m working on adding a distribution to Distributions.jl and am curious how to get a good workflow for making contributions. I first created a new environment with \]activate MyDist, added Distributions.jl and the other n…

---

## [Mixed multi-membership models in Julia](https://discourse.julialang.org/t/mixed-multi-membership-models-in-julia/42005)

<div class="topic-metadata">

**Author:** [@dhalpern](https://discourse.julialang.org/u/dhalpern)\
**Replies:** 4\
**Last updated:** [June 24, 2020, 10:23pm UTC](https://discourse.julialang.org/t/mixed-multi-membership-models-in-julia/42005 "2020-06-24T22:23:27Z")

</div>

I was wondering if it was possible to fit a multi-membership model with MixedModels in Julia, as described by Ben Bolker for lme4 here. It seems like it should be in principle possible by editing the random effects matri…

---

## [How to add weights parameter to Generalized Mixed Model](https://discourse.julialang.org/t/how-to-add-weights-parameter-to-generalized-mixed-model/41984)

<div class="topic-metadata">

**Author:** [@laut](https://discourse.julialang.org/u/laut)\
**Replies:** 33\
**Last updated:** [June 24, 2020, 8:51pm UTC](https://discourse.julialang.org/t/how-to-add-weights-parameter-to-generalized-mixed-model/41984 "2020-06-24T20:51:48Z")

</div>

How do you add the weight of an observation to a Mixed Model? I thought I could add the Freq column to wt argument, but apparently not. using RDatasets MixedModels titanic = RDatasets.dataset("datasets", "Titanic") tita…

---

## [Finding MAP estimate in Turing?](https://discourse.julialang.org/t/finding-map-estimate-in-turing/41761)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 1\
**Last updated:** [June 20, 2020, 4:07am UTC](https://discourse.julialang.org/t/finding-map-estimate-in-turing/41761 "2020-06-20T04:07:19Z")

</div>

I’m working on one of my Data Analysis tutorials. This one involves fitting a nonlinear function to an economic time series. The basic idea is that I have a radial basis function + some annual periodicity + a step funct…

---

## [Questions about contributing to Distributions.jl](https://discourse.julialang.org/t/questions-about-contributing-to-distributions-jl/41530)

<div class="topic-metadata">

**Author:** [@matvil](https://discourse.julialang.org/u/matvil)\
**Replies:** 41\
**Last updated:** [June 19, 2020, 11:25am UTC](https://discourse.julialang.org/t/questions-about-contributing-to-distributions-jl/41530 "2020-06-19T11:25:17Z")

</div>

Hi all, I am thinking about contributing to Distributions.jl. Two questions: Is it of interest to contribute yet another distribution, or is the philosophy of that package to only include the most widely used distribu…

---

## [Packages to determine confidence intervals](https://discourse.julialang.org/t/packages-to-determine-confidence-intervals/41233)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 1\
**Last updated:** [June 12, 2020, 11:16am UTC](https://discourse.julialang.org/t/packages-to-determine-confidence-intervals/41233 "2020-06-12T11:16:34Z")

</div>

As LsqFit.jl only calculates the standard error by using the Jacobian at the best-fit position I thought I try to write a small package for determining the confidence interval by data exploration. https://github.com/fea…

---

## [How to obtain numeric arrays from a linear mixed model formula?](https://discourse.julialang.org/t/how-to-obtain-numeric-arrays-from-a-linear-mixed-model-formula/31633)

<div class="topic-metadata">

**Author:** [@kai](https://discourse.julialang.org/u/kai)\
**Replies:** 11\
**Last updated:** [June 11, 2020, 1:54pm UTC](https://discourse.julialang.org/t/how-to-obtain-numeric-arrays-from-a-linear-mixed-model-formula/31633 "2020-06-11T13:54:18Z")

</div>

Hello. I have a data frame (“dat”, with variables x1, y, and id) and a formula (@formula(y ~ 1 + x1 + (1 | id))). I want to obtain the following numeric arrays: y: response vector X: design matrix for fixed effect, wit…

---

## [Distribution in 1.4.2?](https://discourse.julialang.org/t/distribution-in-1-4-2/41113)

<div class="topic-metadata">

**Author:** [@janrpeters](https://discourse.julialang.org/u/janrpeters)\
**Replies:** 2\
**Last updated:** [June 11, 2020, 1:11pm UTC](https://discourse.julialang.org/t/distribution-in-1-4-2/41113 "2020-06-11T13:11:34Z")

</div>

I am converting a lot between distributions. In Julia 1.2 , this code worked perfectly: Logistic(p::Logistic) = p; Normal(p::Normal) = p; Gumbel(p::Gumbel) = p; Logistic(p::Gumbel) = (ξ=0.68; Logistic(p.μ-p.θ\*log(log(2…

---

## [Implementing a custom Sampler in Distributions.jl](https://discourse.julialang.org/t/implementing-a-custom-sampler-in-distributions-jl/41066)

<div class="topic-metadata">

**Author:** [@nluetts](https://discourse.julialang.org/u/nluetts)\
**Replies:** 5\
**Last updated:** [June 11, 2020, 5:53am UTC](https://discourse.julialang.org/t/implementing-a-custom-sampler-in-distributions-jl/41066 "2020-06-11T05:53:23Z")

</div>

I am trying to implement my own Sampler for a scaled and shifted Beta distribution with support in some arbitrary range \[a, b\]: using Distributions: Beta, Sampleable, Continuous, Univariate struct ScaledShiftedBetaSamp…

---

## [Calculating probability in normal distribution](https://discourse.julialang.org/t/calculating-probability-in-normal-distribution/40897)

<div class="topic-metadata">

**Author:** [@Chris\_Anderson](https://discourse.julialang.org/u/Chris_Anderson)\
**Replies:** 6\
**Last updated:** [June 10, 2020, 10:10am UTC](https://discourse.julialang.org/t/calculating-probability-in-normal-distribution/40897 "2020-06-10T10:10:58Z")

</div>

I want to calculate the probability of any particular value in a normal distribution. I suppose this is equivalent to calculating the percentile of a data point. Ideally some sort of function where I input a value and …

---

## [Statistics on random matrices](https://discourse.julialang.org/t/statistics-on-random-matrices/40776)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 6\
**Last updated:** [June 8, 2020, 3:46pm UTC](https://discourse.julialang.org/t/statistics-on-random-matrices/40776 "2020-06-08T15:46:25Z")

</div>

Hi, I am generating a lot of random matrices and want to study their statistical properties. Right now I am storing them in a 3-dimensional array, where the first two dimensions are the matrix sizes, let’s say square ma…

---

## [Custom Sampler in Turing.jl](https://discourse.julialang.org/t/custom-sampler-in-turing-jl/40629)

<div class="topic-metadata">

**Author:** [@bdeonovic](https://discourse.julialang.org/u/bdeonovic)\
**Replies:** 2\
**Last updated:** [June 3, 2020, 4:04pm UTC](https://discourse.julialang.org/t/custom-sampler-in-turing-jl/40629 "2020-06-03T16:04:12Z")

</div>

Lets say I have some Bayesian model for which the full conditional distributions of some of the variables are known in closed form. How can I write the appropriate Gibbs sampler for these variables in Turing.jl? Lets sa…

---

## [ChisqTest parameter theta0 not recognized](https://discourse.julialang.org/t/chisqtest-parameter-theta0-not-recognized/40348)

<div class="topic-metadata">

**Author:** [@leclere](https://discourse.julialang.org/u/leclere)\
**Replies:** 2\
**Last updated:** [May 29, 2020, 9:47am UTC](https://discourse.julialang.org/t/chisqtest-parameter-theta0-not-recognized/40348 "2020-05-29T09:47:42Z")

</div>

I am trying to use the ChisqTest function to check adequation between my empirical repartition and a theoretical probability distribution. Unfortunately it seems that parameter theta0 is not recognized. MWE: ChisqTest(…

---

## [Customize quantile in DataFrames Combine summary](https://discourse.julialang.org/t/customize-quantile-in-dataframes-combine-summary/39774)

<div class="topic-metadata">

**Author:** [@Nelain](https://discourse.julialang.org/u/Nelain)\
**Replies:** 2\
**Last updated:** [May 19, 2020, 7:32pm UTC](https://discourse.julialang.org/t/customize-quantile-in-dataframes-combine-summary/39774 "2020-05-19T19:32:15Z")

</div>

Hello, I am trying to summarize a GroupedDataFrame: df2 = CSV.read(raw"\_Q\\Test.csv"); gd = groupby(df2, :Age\_Catg) print( combine(gd, nrow ,:Income =\> mean ,:Income =\> middle ,:Income =\> …

---

## [Lend a hand on the Hessian of ordinal logistic regression](https://discourse.julialang.org/t/lend-a-hand-on-the-hessian-of-ordinal-logistic-regression/18842)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 13\
**Last updated:** [May 16, 2020, 2:47pm UTC](https://discourse.julialang.org/t/lend-a-hand-on-the-hessian-of-ordinal-logistic-regression/18842 "2020-05-16T14:47:51Z")

</div>

I am trying to port the ordinal logistic regression to a Fisher Scoring implementation. I need to validate the objective function, gradient, and hessian for these purposes. I am struggling with the Hessian and would appr…

---

## [Calculate λ with known cdf](https://discourse.julialang.org/t/calculate-with-known-cdf/39463)

<div class="topic-metadata">

**Author:** [@Stephen](https://discourse.julialang.org/u/Stephen)\
**Replies:** 2\
**Last updated:** [May 14, 2020, 1:19pm UTC](https://discourse.julialang.org/t/calculate-with-known-cdf/39463 "2020-05-14T13:19:55Z")

</div>

X follows Poisson distribution, X = Poisson(λ) , how to calculate λ if we know the probability of x being 3 or less is 0.82, that is cdf(X,3) = 0.82 . is there any syntax or solver?

---

## [Help with first non-trivial Turing example](https://discourse.julialang.org/t/help-with-first-non-trivial-turing-example/38964)

<div class="topic-metadata">

**Author:** [@bdeonovic](https://discourse.julialang.org/u/bdeonovic)\
**Replies:** 17\
**Last updated:** [May 7, 2020, 8:29pm UTC](https://discourse.julialang.org/t/help-with-first-non-trivial-turing-example/38964 "2020-05-07T20:29:10Z")

</div>

I’d like some help with writing my first example in Turing.jl. I’m not even sure if this model is possible to be expressed in the Turing modeling framework. Below is the code I have so far and the current error: # Impor…

---

## [Distributions.jl structure](https://discourse.julialang.org/t/distributions-jl-structure/38214)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 5\
**Last updated:** [May 5, 2020, 8:38pm UTC](https://discourse.julialang.org/t/distributions-jl-structure/38214 "2020-05-05T20:38:38Z")

</div>

How can I automatically find all univariate continuous cdfs in Distributions.jl? I believe this can make a lot of tasks much easier including maintaining Distributions.jl. Eg MLJ.jl: using MLJ; X, y = @load\_boston; …

---

## [Skew normal distribution?](https://discourse.julialang.org/t/skew-normal-distribution/21549)

<div class="topic-metadata">

**Author:** [@bsprung](https://discourse.julialang.org/u/bsprung)\
**Replies:** 9\
**Last updated:** [May 4, 2020, 10:32pm UTC](https://discourse.julialang.org/t/skew-normal-distribution/21549 "2020-05-04T22:32:39Z")

</div>

Hi, does anyone know if there is an implementation in any package of the skew normal distribution? There doesn’t appear to be one in Distributions.jl. Thank you!

---

## [Reworking Distributions.jl](https://discourse.julialang.org/t/reworking-distributions-jl/32339)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 51\
**Last updated:** [April 27, 2020, 2:33am UTC](https://discourse.julialang.org/t/reworking-distributions-jl/32339 "2020-04-27T02:33:35Z")

</div>

Hello all, I’ve been thinking some more about a refactoring of Distributions.jl, and I’d like to ask for feedback on a proof of concept. First, the abstract types: abstract type Sampleable{P,X} end abstract type Dist…

---

## [Correct formula for MixedModels, lme4](https://discourse.julialang.org/t/correct-formula-for-mixedmodels-lme4/37343)

<div class="topic-metadata">

**Author:** [@Enrico\_Schulz](https://discourse.julialang.org/u/Enrico_Schulz)\
**Replies:** 0\
**Last updated:** [April 10, 2020, 1:59pm UTC](https://discourse.julialang.org/t/correct-formula-for-mixedmodels-lme4/37343 "2020-04-10T13:59:21Z")

</div>

Dear statistics experts, I am using MixedModels.jl in Julia with this formula: f2 = @formula(fmri~AMP+SLP+aSLP+(0+AMP|session)+(0+SLP|session)+(0+aSLP|session)); The toolbox in Julia is from Douglas Bates und the form…

---

## [Bimodal Gaussian Distribution](https://discourse.julialang.org/t/bimodal-gaussian-distribution/37274)

<div class="topic-metadata">

**Author:** [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Replies:** 1\
**Last updated:** [April 9, 2020, 12:46pm UTC](https://discourse.julialang.org/t/bimodal-gaussian-distribution/37274 "2020-04-09T12:46:46Z")

</div>

I am trying to generate random numbers using a Gaussian distribution with two means. I looked up the Distributions and StatsBase packages, but could not find functions in them to generate such a function. Can someone sug…

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

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