Search found 1242 matches

by ChrisCharlton
Tue May 04, 2021 12:29 pm
Forum: MLwiN user forum
Topic: Good-of-fit measure in poisson multilevel model
Replies: 1
Views: 121

Re: Good-of-fit measure in poisson multilevel model

If you're fitting with MCMC then you could compare the DIC statistics, otherwise we would normally suggest doing a Wald test.
by ChrisCharlton
Mon Apr 26, 2021 10:27 am
Forum: MLwiN user forum
Topic: Set up of equations
Replies: 1
Views: 87

Re: Set up of equations

If you open the Model->Hierarchy Viewer and click the Options button you can specify a 0/1 column with which to exclude rows from the model. This corresponds with the EXCL command.
by ChrisCharlton
Mon Apr 26, 2021 9:10 am
Forum: MLwiN user forum
Topic: Installing MLwiN on Mac
Replies: 1
Views: 95

Re: Installing MLwiN on Mac

The following page describes a variety of options for running the software on a Mac:
https://www.bristol.ac.uk/cmm/software/ ... ysreq.html
by ChrisCharlton
Tue Apr 20, 2021 6:41 pm
Forum: runmlwin user forum
Topic: Average Marginal Effects via runmlwin
Replies: 2
Views: 281

Re: Average Marginal Effects via runmlwin

My interpretation of this is that he is suggesting that you duplicate each row of your dataset 1000 times (presumably with https://www.stata.com/help.cgi?expand ) so that you have a copy for each MCMC iteration. You would then combine this with the parameter estimates for the corresponding iteration...
by ChrisCharlton
Fri Apr 09, 2021 3:43 pm
Forum: R2MLwiN user forum
Topic: Interaction plots for mlwinfitMCMC fixed effects
Replies: 2
Views: 384

Re: Interaction plots for mlwinfitMCMC fixed effects

You could manually create the data required for this plot by generating a chain of predictions and then calculating the mean and credible intervals from this. An example of this would be as follows: library(R2MLwiN) library(coda) data(tutorial, package = "R2MLwiN") (model1 <- runMLwiN(normexam ~ 1 +...
by ChrisCharlton
Thu Apr 08, 2021 3:58 pm
Forum: MLwiN user forum
Topic: Input columns have unequal length
Replies: 2
Views: 245

Re: Input columns have unequal length

I suspect that the command is complaining that your 'CNTSCHID' column is a different length to the others. All the input columns involved in this command need to be of the same length. c1500 is included in the command as this is temporary output column where it will put the short version of the ID c...
by ChrisCharlton
Wed Mar 31, 2021 2:43 pm
Forum: Realcom user forum
Topic: Error in Realcom
Replies: 1
Views: 1267

Re: Error in Realcom

Have you tried running this with fewer responses? You don't say how many rows you have in your data, or number of categories in each response but it may be that there isn't enough data to support this model.
by ChrisCharlton
Fri Mar 26, 2021 11:10 am
Forum: MLwiN user forum
Topic: Unexpanded level 2 id column
Replies: 2
Views: 894

Re: Unexpanded level 2 id column

As you are fitting a multivariate model there will already be a level-1 identifier included for the response indicator. When setting up the model you would therefore need to specify three levels, with patient at level-2 and clinic at level-3. MLwiN checks that the identifier variable you set at leve...
by ChrisCharlton
Tue Mar 23, 2021 5:58 pm
Forum: runmlwin user forum
Topic: DICs difference when comparing models after MCMC
Replies: 2
Views: 859

Re: DICs difference when comparing models after MCMC

Bill gives some guidance on slide 57 of a workshop presentation that he gave some years ago, available at: https://www.ukdataservice.ac.uk/media/307220/presentation4.pdf The MRC Biostatistics unit, who originally developed the BUGS software, also give some suggestions: https://www.mrc-bsu.cam.ac.uk/...
by ChrisCharlton
Tue Mar 23, 2021 2:58 pm
Forum: runmlwin user forum
Topic: 95%Credible intervals are smaller than OR
Replies: 6
Views: 909

Re: 95%Credible intervals are smaller than OR

You can obtain the MCMC chains as a dataset with the following command: mcmcsum, getchains Once you have this you can use the standard Stata data manipulation commands to process it, i.e. gen , sort and centile . You ought to get the same results as before as this should be equivalent to what runmlw...