Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
bdilday committed Mar 11, 2018
1 parent 6819276 commit bfb963f
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,27 @@ Multinomial Random Effects

This code solves multinomial mixed effects models.

A minimal example is:
## Installing

fit a binomial model
```
devtools::install_github('bdilday/mnre')
```

## Binomial Example

fit a binomial model using a formula interface

```
library(mnre)
ev = mnre_simulate_multinomial_data_factors(nfct=2, K_class = 2, nlev=50, nobs=20000)
mnre_mod = mnre_fit(y ~ 1 + (1|fct01) + (1|fct02), data=ev$fr, verbose=0)
mnre_mod$theta
[1] 0.9926043 0.9537682
```

fit a binomial model using lower-level `nd_min_fun`

```
devtools::install_github('bdilday/mnre')
library(mnre)
ev = mnre_simulate_multinomial_data_factors(nfct=2, K_class = 2, nlev=50, nobs=20000)
nf = mnre::nd_min_fun(ev)
Expand All @@ -28,6 +43,8 @@ glmer_mod@theta
[1] 0.9925264 0.9537615
```

## Multinomial model

Fit a multinomial model

```
Expand Down

0 comments on commit bfb963f

Please sign in to comment.