Search found 1063 matches

by ChrisCharlton
Tue Apr 09, 2019 9:07 am
Forum: MLwiN user forum
Topic: changing non-numeric variable values to append
Replies: 1
Views: 24

Re: changing non-numeric variable values to append

All values in the MLwiN worksheet are stored as numeric (to see these unselect "Show value labels" in the "Data" window), with optional category labels used to assign a string value to each value. You can check these assignments via the "Names" window by clicking "View" in the "Categories" section. ...
by ChrisCharlton
Mon Apr 08, 2019 11:12 am
Forum: MLwiN user forum
Topic: Filtering rows to fit in existing equations
Replies: 1
Views: 19

Re: Filtering rows to fit in existing equations

You can filter the rows included within the model via the options button in Model->Hierarchy Viewer , or via the EXCL command (see the MLwiN help file). The model results will not automatically change after doing this, so you will need to re-run the model. If you are fitting a series of models you p...
by ChrisCharlton
Wed Mar 20, 2019 6:01 pm
Forum: MLwiN user forum
Topic: V gone -ve definite for block 0 iteration aborted (random pass, offsets 1)
Replies: 1
Views: 35

Re: V gone -ve definite for block 0 iteration aborted (random pass, offsets 1)

I am not sure what would cause this. As this model is equivalent to a regression with only an intercept have you tried fitting this model with other software to ensure that the results look sensible there?
by ChrisCharlton
Wed Mar 13, 2019 11:58 am
Forum: runmlwin user forum
Topic: Plotting interaction terms
Replies: 1
Views: 108

Re: Plotting interaction terms

The immediate cause of the error that you are seeing is because although runmlwin creates derived variables for each expanded factor/interaction these are only used during model fitting and are not added back to the initial data. Presumably the predict command for built-in Stata commands recreates t...
by ChrisCharlton
Tue Mar 05, 2019 10:10 am
Forum: R2MLwiN user forum
Topic: "Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)..." in Ordered Logit R2MLwiN
Replies: 2
Views: 212

Re: "Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)..." in Ordered Logit R2MLwiN

I have only encountered an error message similar to this once before in a case where the estimates had gone to a NaN value: Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = -nan(ind) PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = -nan(ind) S.D. = -nan(ind) S.E.M. = ...
by ChrisCharlton
Mon Mar 04, 2019 10:21 am
Forum: runmlwin user forum
Topic: How to replicate Stata do-file of MLRA using "runmlwin", please advise
Replies: 10
Views: 295

Re: How to replicate Stata do-file of MLRA using "runmlwin", please advise

In your first set of models you have specified a level-2 variance, the second set is a 1-level model. In the second set of models you have chosen RIGLS instead of IGLS for the starting values and then set a seed, burnin and number of iterations for the MCMC chains. In the first set these will be set...
by ChrisCharlton
Fri Mar 01, 2019 10:12 am
Forum: runmlwin user forum
Topic: How to replicate Stata do-file of MLRA using "runmlwin", please advise
Replies: 10
Views: 295

Re: How to replicate Stata do-file of MLRA using "runmlwin", please advise

You get the message: note: 1b.agegroup omitted because of collinearity because you are entering the variable agegroup as a factor (see https://www.stata.com/features/overview/factor-variables/ ) but not specifying a base category. Stata therefore attempts to create dummies for all factor levels, one...
by ChrisCharlton
Thu Feb 28, 2019 12:22 pm
Forum: runmlwin user forum
Topic: How to replicate Stata do-file of MLRA using "runmlwin", please advise
Replies: 10
Views: 295

Re: How to replicate Stata do-file of MLRA using "runmlwin", please advise

Unless you are fitting your data as cross-classified MLwiN determines the higher levels by a change in the identifier, rather than the identifier itself. This means that if you had data such as the following it would consider there to be three units instead of two: student_id school_id 1 1 2 1 3 1 4...
by ChrisCharlton
Thu Feb 28, 2019 10:23 am
Forum: runmlwin user forum
Topic: How to replicate Stata do-file of MLRA using "runmlwin", please advise
Replies: 10
Views: 295

Re: How to replicate Stata do-file of MLRA using "runmlwin", please advise

Although the provided savewsz creates an MLwiN worksheet this will only contain the current Stata data file, not the model specified. To get the model as well you need to instead use the saveworksheet option of the -runmlwin- command, i.e.: runmlwin psycmed cons i.agegroup male poor, level1(id: ) di...
by ChrisCharlton
Tue Feb 26, 2019 1:31 pm
Forum: runmlwin user forum
Topic: How to replicate Stata do-file of MLRA using "runmlwin", please advise
Replies: 10
Views: 295

Re: How to replicate Stata do-file of MLRA using "runmlwin", please advise

The code that you quoted looks correct for a simple logistic regression model. If your response is zero/one (i.e. not proportions) then the denominator that you create will just be a column of ones. You can create this in the same way as you generated the cons variable (or just use the cons variable...