Search found 18 matches

by ewancarr
Fri May 25, 2012 9:12 pm
Forum: MLwiN user forum
Topic: Random coefficient for an interaction term
Replies: 0
Views: 3306

Random coefficient for an interaction term

Hello, I'm trying to fit a two-level normal response model. I include an interaction term between two level-1 variables ('year' and 'x'). I want to test whether the association between the interaction term and the outcome, y, is consistent across my level-2 units — i.e. whether the model is improved...
by ewancarr
Thu May 03, 2012 6:09 pm
Forum: runmlwin user forum
Topic: Problem getting residuals: after merge, not all observations
Replies: 10
Views: 10955

Re: Problem getting residuals: after merge, not all observat

Hi George, Please try this and let us know whether this workaround solves your problem. Yes! That works without any error messages. Really, I should have checked and found those missing values. It's because some countries are present in the 2010 wave, but not in 2000 or 2005. country of | Wave inter...
by ewancarr
Thu May 03, 2012 4:07 pm
Forum: runmlwin user forum
Topic: Problem getting residuals: after merge, not all observations
Replies: 10
Views: 10955

Re: Problem getting residuals: after merge, not all observat

George — I've emailed you the dataset and do-file.

Many thanks,

Ewan
--
by ewancarr
Thu May 03, 2012 12:51 am
Forum: runmlwin user forum
Topic: Problem getting residuals: after merge, not all observations
Replies: 10
Views: 10955

Re: Problem getting residuals: after merge, not all observat

Thanks for getting back to me. Chris: The residuals I'm getting back do look sensible. However, with regard to unique IDs: the data is really a 3-level repeated cross-sectional structure: Level 3: Country (N = 31) Level 2: Wave (N = 3) Level 1: Individual (N = 90,000ish) I had previously been modell...
by ewancarr
Tue May 01, 2012 8:34 pm
Forum: runmlwin user forum
Topic: Problem getting residuals: after merge, not all observations
Replies: 10
Views: 10955

Problem getting residuals: after merge, not all observations

I'm running the latest version of runmlwin (as of 1st May). When I ask for residuals from the following model: runmlwin affect cons w2 w3 /// timep notfit physical /// hoursgm /// agegm female i.income partner children notcitz /// i.nace4 i.size everuni i.isco4, /// level2(countid: cons timep, resid...
by ewancarr
Fri Apr 13, 2012 5:39 pm
Forum: runmlwin user forum
Topic: Problem with weights in the latest version of runmlwin
Replies: 7
Views: 8422

Re: Problem with weights in the latest version of runmlwin

Thanks! (1) Ideally you should fit final models by MCMC I do, and my data does require weights, so the inability to use weights in MCMC has always been a concern. I tend to report both the weighted PQL2 and unweighted MCMC results, and generally, there isn't much variation in results. If the results...
by ewancarr
Fri Apr 13, 2012 3:46 pm
Forum: runmlwin user forum
Topic: Problem with weights in the latest version of runmlwin
Replies: 7
Views: 8422

Re: Problem with weights in the latest version of runmlwin

OK, that seems to have worked. Stata did initially complain that " weight is held to more precision than MLwiN can handle " and that I should use " recast float weight, force " to change from double to float. Having recast the weight variable the model ran fine. The results: ------------------------...
by ewancarr
Fri Apr 13, 2012 3:09 pm
Forum: runmlwin user forum
Topic: MLwiN very slow to load data from runmlwin [SOLVED]
Replies: 5
Views: 5702

Re: MLwiN very slow to load data from runmlwin [SOLVED]

To answer your other question, runmlwin should support factor variables in the fixed part but this hasn't been widely tested.
Thanks — I'll give it a go.

Ewan
--
by ewancarr
Fri Apr 13, 2012 1:06 am
Forum: runmlwin user forum
Topic: Problem with weights in the latest version of runmlwin
Replies: 7
Views: 8422

Problem with weights in the latest version of runmlwin

Hi again, I'm having problems applying weights to my models, and it seems this has been caused by recent updates (old models, that used to run fine, produce errors with the latest version(s)). For example, the following model... runmlwin affect cons, /// level3(country: cons) level2(wave: cons) leve...
by ewancarr
Thu Apr 12, 2012 9:51 pm
Forum: runmlwin user forum
Topic: MLwiN very slow to load data from runmlwin [SOLVED]
Replies: 5
Views: 5702

Re: MLwiN very slow to load data from runmlwin [SOLVED]

Thanks George — after some trial and error, I seem to have solved my own problem. For some reason, I had left my individual-level ID as a string variable. Once I replaced this with an integer ID variable (gen pid = _n) the file loaded almost instantly into MLwiN. I think what threw me was that I had...