# How to add weights parameter to Generalized Mixed Model

**URL:** <https://discourse.julialang.org/t/how-to-add-weights-parameter-to-generalized-mixed-model/41984>\
**Category:** Statistics\
**Tags:** question\
**Created:** [June 24, 2020, 2:35pm UTC](https://discourse.julialang.org/t/how-to-add-weights-parameter-to-generalized-mixed-model/41984 "2020-06-24T14:35:11Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [June 24, 2020, 8:40pm UTC](https://discourse.julialang.org/t/how-to-add-weights-parameter-to-generalized-mixed-model/41984/31 "2020-06-24T20:40:19Z")

</div>

The reason that I used `RCall` instead of `RDatasets` to obtain the data set is to ensure that it is a more faithful copy of the R dataset. The factor level orders are the same as those in R. If you create a CSV file then read the CSV, which I believe is what happens in `RDatasets`, you can’t guarantee you will get the same ordering.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-add-weights-parameter-to-generalized-mixed-model/41984)._
