Skip to content

Commit

Permalink
use macro to construct formula in test for StatsModels v0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinschmidt authored and andreasnoack committed May 9, 2018
1 parent 9ffb6c1 commit ab9a372
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ end
dfrm = DataFrame([categorical(repeat(string.('A':'D'), inner = 6)),
categorical(repeat(string.('a':'c'), inner = 2, outer = 4))],
[:G, :H])
X = ModelMatrix(ModelFrame(Formula(nothing, :(1+G*H)), dfrm)).m
f = @eval(@formula($nothing ~ 1+G*H))
X = ModelMatrix(ModelFrame(f, dfrm)).m
y = X * (1:size(X, 2)) + 0.1 * randn(MersenneTwister(1234321), size(X, 1))
inds = deleteat!(collect(1:length(y)), 7:8)
m1 = fit(LinearModel, X, y)
Expand Down

0 comments on commit ab9a372

Please sign in to comment.