Skip to content

Commit

Permalink
Handle random-effects terms in coefnames.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmbates committed Jul 29, 2014
1 parent a845fbd commit 2dd4eb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/statsmodels/formula.jl
Expand Up @@ -254,7 +254,9 @@ function coefnames(fr::ModelFrame)
# Need to only include active levels
for term in fr.terms.terms
if isa(term, Expr)
if term.head == :call && term.args[1] == :&
if term.head == :call && term.args[1] == :|
continue # skip random-effects terms
elseif term.head == :call && term.args[1] == :&
a = term.args[2]
b = term.args[3]
for lev1 in termnames(a, fr.df[a]), lev2 in termnames(b, fr.df[b])
Expand Down

0 comments on commit 2dd4eb2

Please sign in to comment.