Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.
From  Brendan Churchill <Brendan.Churchill@utas.edu.au> 
To  "<statalist@hsphsun2.harvard.edu>" <statalist@hsphsun2.harvard.edu> 
Subject  Re: graphing results from multilevel model [Was: Re: st: Threadindex: AQHNYz] 
Date  Mon, 16 Jul 2012 10:40:52 +0000 
Thanks Maarten again for your reply :)
I'm using the 'xtmixed' function for a growth curve model to measure attitudinal change (higher score = more conservative, lower score= more egalitarian) across age and cohorts. For example:
xtmixed atwkwrl[attitude variable] age cohort agexcohort i.educationhistory i.employment sex  pid: age, cov(un) variance mle
educationhistory and employment are categorical variables that I use the i. function to turn the responses into individual dummy variables.
To produce a graph from the model. I use the 'predict' function and I try produce a line graph, I'm interested in the how the cohorts differ in their attitudinal scores
twoway (line prediction age if cohort==1, sort) (line prediction age if cohort==2, sort) etc….
When the graph is produced, the lines are connected and look like odd tree branches. I've tried to sort the data before producing the graph and sometimes that makes it a little clearer, but it's still
connected like odd tree branches
I think what affects this is the use of the dummy variables etc….as in that the graph shows up the prediction results for both sexes  men and women
I've heard about the marginsplot command, but I have unsuccessfully been able to execute that….
Does that assist, or more information needed???
Thanks again Maarten!
Brendan
On 16/07/2012, at 8:14 PM, Maarten Buis wrote:
