Search found 1239 matches

by ChrisCharlton
Wed Jan 20, 2021 2:15 pm
Forum: MLwiN user forum
Topic: Error when fitting a multinomial logit regression with panel data
Replies: 16
Views: 1496

Re: Error when fitting a multinomial logit regression with panel data

Would it be possible for you to provide further details regarding the errors that you get when you attempt to run this via MCMC?
by ChrisCharlton
Tue Jan 12, 2021 12:15 pm
Forum: MLwiN user forum
Topic: Error when fitting a multinomial logit regression with panel data
Replies: 16
Views: 1496

Re: Error when fitting a multinomial logit regression with panel data

For multinomial models the base level needs to be an identifier indicating the unit number (e.g. 1..N). If you don't have such a column in your data this can be created using the GENE command or Generate Vector window. This will then be expanded when converting the response to multinomial.
by ChrisCharlton
Sat Dec 19, 2020 1:05 pm
Forum: MLwiN user forum
Topic: Strange predicted values
Replies: 1
Views: 403

Re: Strange predicted values

It looks like each line of your graph contains predictions for both genders, in a similar way to how the line on page 57 of the MLwiN user's guide ( https://www.bristol.ac.uk/cmm/media/software/mlwin/downloads/manuals/3-05/manual-web.pdf ) contains predictions for all of the different schools. I thi...
by ChrisCharlton
Thu Dec 10, 2020 3:20 pm
Forum: runmlwin user forum
Topic: getting credible intervals around postestimations
Replies: 8
Views: 992

Re: getting credible intervals around postestimations

mcmcsum should work with subsets, so it may be a bug if that isn't working for you. A workaround would be to remove rows that do not correspond to the desired group before running the command, although the alternative code that you identified should be equivalent to what mcmcsum is doing for the me...
by ChrisCharlton
Thu Dec 10, 2020 12:30 pm
Forum: runmlwin user forum
Topic: getting credible intervals around postestimations
Replies: 8
Views: 992

Re: getting credible intervals around postestimations

In your estimation command you requested that the residual chains at level-2 are stored in the file m1u.dta , so this is what you will need to open in order to calculate what you need. When running the mcmcsum on variables from the currently loaded dataset you need to specify the variables option wh...
by ChrisCharlton
Tue Dec 08, 2020 10:59 pm
Forum: runmlwin user forum
Topic: getting credible intervals around postestimations
Replies: 8
Views: 992

Re: getting credible intervals around postestimations

I think that you should be able to do this by loading the .dta file where you have saved the parameter chains and then running the mcmcsum command on the variable that corresponds to the parameter of interest. For details on the options for this command run:

Code: Select all

help mcmcsum
from within Stata.
by ChrisCharlton
Fri Dec 04, 2020 3:21 pm
Forum: R2MLwiN user forum
Topic: Linear Spline Modelling error
Replies: 2
Views: 743

Re: Linear Spline Modelling error

Have you checked what the model equation looks like in MLwiN (this should automatically open when you run the command with the degbugmode option turned on)?
by ChrisCharlton
Fri Dec 04, 2020 12:23 pm
Forum: runmlwin user forum
Topic: Three-level model with two random slopes
Replies: 1
Views: 725

Re: Three-level model with two random slopes

I asked George about this and he said the following: It is harder to fit random slopes in models with a binary response, and it is easier to hit convergence issues. There might not be sufficiently large clusters and response variation to fit the desired model. In this case it appears that the level-...
by ChrisCharlton
Thu Dec 03, 2020 1:13 pm
Forum: runmlwin user forum
Topic: Order of Predicted Residuals with Multiple Random Slopes
Replies: 2
Views: 700

Re: Order of Predicted Residuals with Multiple Random Slopes

These should be the order that the parameters appear in the model equation. You can see this by removing the nopause option so that this is displayed prior to fitting the model. This ordering will usually match the order in which runmlwin processes the variables, so in your case as you do not have c...
by ChrisCharlton
Wed Dec 02, 2020 2:14 pm
Forum: Stat-JR user forum
Topic: Error running 2LevelUnordered Template in MCMCglmm and Rrstan
Replies: 6
Views: 1522

Re: Error running 2LevelUnordered Template in MCMCglmm and Rrstan

Adding the as.factor() call into R should be fine as an alternative to having the variable converted when loaded into R. You'd just have to make sure that the variable is suitable for this yourself (i.e. contains a set of discrete integer values). The advantage of using value labels is that the diff...