File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 213213 end
214214
215215 # # simulate some data ##
216- rng = MersenneTwister (42 );
216+ rng = StableRNG (42 );
217217 ng = 25
218218 ns = 500
219219 # random effect
@@ -223,16 +223,15 @@ end
223223 x = rand (rng, ns* ng);
224224
225225 @testset " inverse gaussian" begin
226- rng = MersenneTwister (42 );
227- y = map (d -> rand (rng, d), InverseGaussian .(1. ./ sqrt .(1. .+ u + x)));
228- dat = (u= u, id= id, x= x, y= y)
226+ rng = StableRNG (42 );
227+ l = GLM. canonicallink (InverseGaussian ())
229228 invgauss = GeneralizedLinearMixedModel (@formula (y ~ 1 + x + (1 | id)), dat, InverseGaussian ());
230229 # invgauss.optsum.optimizer = :LN_NELDERMEAD;
231230 # fit!(invgauss)
232231 end
233232
234233 @testset " gamma" begin
235- rng = MersenneTwister (42 );
234+ rng = StableRNG (42 );
236235 y = map (d -> rand (rng, d), Gamma .(1. ./ (1. .+ u + x)));
237236 dat = (u= u, id= id, x= x, y= y)
238237 gamma = GeneralizedLinearMixedModel (@formula (y ~ 1 + x + (1 | id)), dat, Gamma ());
You can’t perform that action at this time.
0 commit comments