Search found 14 matches

by med151991
Tue Mar 08, 2022 9:18 am
Forum: R2MLwiN user forum
Topic: how to extract credible intervals
Replies: 1
Views: 3777

how to extract credible intervals

Hello, using this sqrt(coef(modelstim)[c("RP2_var_Intercept")]) I'm able to get the variance for level two, but wondered is there a way to do this for the credible interval? and if not, how is it possible to calculate this myself? As this returns the variance directly, does the standard er...
by med151991
Tue Oct 05, 2021 11:26 am
Forum: R2MLwiN user forum
Topic: extracting variance coefficient
Replies: 7
Views: 6525

Re: extracting variance coefficient

Thanks so much Chris thats much clearer to me thank you
by med151991
Mon Oct 04, 2021 8:30 am
Forum: R2MLwiN user forum
Topic: extracting variance coefficient
Replies: 7
Views: 6525

Re: extracting variance coefficient

Hi Chris sorry to bother you again! I am getting myself a little confused about the IGLS starting values. From everything I have read, it seems to indicate that when running the model if you have EstM=1, this generates starting values from IGLS, is this right? But I have seen some comments about put...
by med151991
Mon Sep 27, 2021 8:10 am
Forum: R2MLwiN user forum
Topic: variance increasing
Replies: 1
Views: 3925

variance increasing

Hello, When I run a null or basic adjusted model by age and sex only the variance is low, but when I fully adjust the model including adding area level variables, the variance (random intercept) increases? Does this incidate a problem somewhere as I thought that it should decrease when adjusting the...
by med151991
Wed Sep 22, 2021 1:42 pm
Forum: R2MLwiN user forum
Topic: extracting variance coefficient
Replies: 7
Views: 6525

Re: extracting variance coefficient

Thats great thanks so much!
by med151991
Wed Sep 22, 2021 12:51 pm
Forum: R2MLwiN user forum
Topic: extracting variance coefficient
Replies: 7
Views: 6525

Re: extracting variance coefficient

Hi Chris, Thank you so much thats so helpful! I have a couple other questions too. Firstly, how do you build up a model from previous values in R? And also if you run the model initially in IGLS do you have to specificy something when running then in MCMC about using those starting values or is it a...
by med151991
Thu Sep 16, 2021 1:55 pm
Forum: R2MLwiN user forum
Topic: extracting variance coefficient
Replies: 7
Views: 6525

extracting variance coefficient

Hello, I am trying to calculate the median incidence rate ratio for my poisson three level model. I have a calculation and code to do this, however its based on either the glmer or brm package in R. I was wondering if someone might help me apply this to the functions/terms in MLwiN? this is the code...
by med151991
Wed Sep 08, 2021 12:39 pm
Forum: R2MLwiN user forum
Topic: mcmc model stops running
Replies: 2
Views: 4306

Re: mcmc model stops running

Hi Chris,

You are right thank you, i didn't notice that it had finished, I had used multiple chains so that makes sense thank you. The < was a mistake in writing out the code I used. Thanks for your help and quick reply!
by med151991
Tue Sep 07, 2021 5:43 pm
Forum: R2MLwiN user forum
Topic: mcmc model stops running
Replies: 2
Views: 4306

mcmc model stops running

Hello, So my code worked with running this model<-log(death)~1+gender+education+parentdeath+offset(log(personyears))+(1|region)+(1|household) model1<-runMLwiN(Formula=model, D="Poisson", data=dataset, estoptions=list(EstM=1)) however, when I add the iterations and burn in, it says 'MLwiN i...
by med151991
Tue Sep 07, 2021 7:10 am
Forum: R2MLwiN user forum
Topic: level 1 variance poisson model
Replies: 7
Views: 5548

Re: level 1 variance poisson model

Sorting the data with that code worked! My model is now running, thank you! :)