# How to sample from a logistic regression model

**URL:** <https://discourse.julialang.org/t/how-to-sample-from-a-logistic-regression-model/20374>\
**Category:** New to Julia\
**Tags:** statistics\
**Created:** [February 2, 2019, 6:01am UTC](https://discourse.julialang.org/t/how-to-sample-from-a-logistic-regression-model/20374 "2019-02-02T06:01:20Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![murphyk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/murphyk/32/6891_2.png) [@murphyk](https://discourse.julialang.org/u/murphyk)\
**Post date:** [February 6, 2019, 1:15am UTC](https://discourse.julialang.org/t/how-to-sample-from-a-logistic-regression-model/20374/9 "2019-02-06T01:15:35Z")

</div>

I also found this related thread:

> [@About the convention for the design matrix (row-as-observation or column-as-observation)](https://discourse.julialang.org/t/about-the-convention-for-the-design-matrix-row-as-observation-or-column-as-observation/20080):
>
> At the risk of resucitating an old discussion… I was exploring some of the code in JuliaStats and Clustering and realised that a convention often used in these packages (and in similar ones like GaussianProcesses) is that if X is the design matrix then its columns are the observations (“p x n convention”). The choice seems to have been made some time back to align with the fact that Julia is column-major. Originally I thought that’s fine, I’ll just transpose the matrix and be done with it but …

---

_[View the full topic](https://discourse.julialang.org/t/how-to-sample-from-a-logistic-regression-model/20374)._
