Skip to content

Commit 23ae4c1

Browse files
author
David Phillips
committed
Fix mixture model
1 parent 47b64d6 commit 23ae4c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mixture_model.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ggplot(NOdata, aes(y=Equivalence, x=NO)) +
3232
# Run analysis
3333

3434
# regress using EM algorithm
35-
em.out <- regmixEM(Equivalence, NO)
35+
em.out <- regmixEM(NOdata$Equivalence, NOdata$NO)
3636

3737
# display coefficients
3838
summary(em.out)
@@ -43,7 +43,7 @@ colnames(emfit) = c('comp.1_em','comp.2_em')
4343
NOdata = cbind(NOdata, emfit)
4444

4545
# regress using MH algorithm
46-
mh.out <- regmixMH(Equivalence, NO)
46+
mh.out <- regmixMH(NOdata$Equivalence, NOdata$NO)
4747

4848
# display coefficients
4949
summary(mh.out)

0 commit comments

Comments
 (0)