classic teaching data set for Multi-Level Modeling

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

classic teaching data set for Multi-Level Modeling

Art Kendall
Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

SR Millis-3
Here are some resources:
 
 
 
 

Scott Millis
~~~~~~~~~~~
Scott R Millis, PhD, ABPP, CStat, CSci
Professor & Director of Research
Dept of Physical Medicine & Rehabilitation
Dept of Emergency Medicine
Wayne State University School of Medicine
261 Mack Blvd
Detroit, MI 48201
Email: [hidden email]
Email: [hidden email]
Tel: 313-993-8085
Fax: 313-966-7682

--- On Wed, 6/2/10, Art Kendall <[hidden email]> wrote:

From: Art Kendall <[hidden email]>
Subject: classic teaching data set for Multi-Level Modeling
To: [hidden email]
Date: Wednesday, June 2, 2010, 12:51 PM

Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

Bruce Weaver
Administrator
In reply to this post by Art Kendall
Hi Art.  I have the data & syntax for many of the examples in Jos Twisk's nice (and very accessible) introductory book, "Applied Multilevel Analysis: A Practical Guide".  I'll send them to you off list.  

You can preview parts of Twisk's book at Google Books.  It is not as complete as some of the other books that are out there, and probably not as authoritative either.  But IMO, it does a much better job than most of presenting the basic concepts in a very understandable fashion.  I found that after reading Twisk (and working through his examples), it was much easier to read some of the other books that are out there than it had been 'before Twisk'.  ;-)

Cheers,
Bruce


Art Kendall wrote
Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM
or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants



=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

Art Kendall
Thank you. 
Do you recall whether any of these examples have 3 levels?

Art

On 6/2/2010 3:03 PM, Bruce Weaver wrote:
Hi Art.  I have the data & syntax for many of the examples in Jos Twisk's
nice (and very accessible) introductory book, "Applied Multilevel Analysis:
A Practical Guide".  I'll send them to you off list.

You can preview parts of Twisk's book at Google Books.  It is not as
complete as some of the other books that are out there, and probably not as
authoritative either.  But IMO, it does a much better job than most of
presenting the basic concepts in a very understandable fashion.  I found
that after reading Twisk (and working through his examples), it was much
easier to read some of the other books that are out there than it had been
'before Twisk'.  ;-)

Cheers,
Bruce



Art Kendall wrote:
  

Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM
or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants



=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


    

-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context: http://old.nabble.com/classic-teaching-data-set-for-Multi-Level-Modeling-tp28757157p28758670.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

  
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

Art Kendall
In reply to this post by SR Millis-3
Thank you. 
Do you recall whether any of these examples have 3 levels?

Art

On 6/2/2010 2:19 PM, SR Millis wrote:
Here are some resources:
 
 
 
 

Scott Millis
~~~~~~~~~~~
Scott R Millis, PhD, ABPP, CStat, CSci
Professor & Director of Research
Dept of Physical Medicine & Rehabilitation
Dept of Emergency Medicine
Wayne State University School of Medicine
261 Mack Blvd
Detroit, MI 48201
Email: [hidden email]
Email: [hidden email]
Tel: 313-993-8085
Fax: 313-966-7682

--- On Wed, 6/2/10, Art Kendall [hidden email] wrote:

From: Art Kendall [hidden email]
Subject: classic teaching data set for Multi-Level Modeling
To: [hidden email]
Date: Wednesday, June 2, 2010, 12:51 PM

Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

J P-6
I have had a very difficult time getting three level models to converge with SPSS. Works fine with HLM 6.0 but not with SPSS. Maybe there is an error in my syntax. Here it is for a three level longitudinal model: (no missing data)
 
MIXED math WITH year
 /PRINT = SOLUTION TESTCOV
 /METHOD=ML
 /FIXED=intercept year
 /RANDOM= intercept year | SUBJECT(schoolid) COVTYPE(UN)
 /RANDOM= intercept year | SUBJECT(schoolid*childid) COVTYPE(UN).


From: Art Kendall <[hidden email]>
To: [hidden email]
Sent: Wed, June 2, 2010 3:30:53 PM
Subject: Re: classic teaching data set for Multi-Level Modeling

Thank you. 
Do you recall whether any of these examples have 3 levels?

Art

On 6/2/2010 2:19 PM, SR Millis wrote:
Here are some resources:
 
http://www.ats.ucla.edu/stat/stata/examples/alda/default.htm
 
http://www.ats.ucla.edu/stat/stata/examples/mlm_imm/default.htm
 
http://www.ats.ucla.edu/stat/stata/examples/mlm_ma_snijders/default.htm
 
http://www.ats.ucla.edu/stat/stata/examples/mlm_ma_hox/default.htm

Scott Millis
~~~~~~~~~~~
Scott R Millis, PhD, ABPP, CStat, CSci
Professor & Director of Research
Dept of Physical Medicine & Rehabilitation
Dept of Emergency Medicine
Wayne State University School of Medicine
261 Mack Blvd
Detroit, MI 48201
Email: [hidden email]
Email: [hidden email]
Tel: 313-993-8085
Fax: 313-966-7682

--- On Wed, 6/2/10, Art Kendall [hidden email] wrote:

From: Art Kendall [hidden email]
Subject: classic teaching data set for Multi-Level Modeling
To: [hidden email]
Date: Wednesday, June 2, 2010, 12:51 PM

Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

Ryan Black
In reply to this post by Art Kendall
Hi Art,
 
Here's an example that was provided to me a while back. I've changed a few things for ease of interpretation. The code begins by generating the data and ends with fitting the model.  Var_Level1 is the indicator variable for level 1 (e.g. student), Var_Level2 is the indicator variable for level 2 (e.g. class), and Var_Level3 is the indicator variable for level 3 (e.g. school). z1 is a level-2 covariate while x1 and x2 are level-1 covariates.
 
HTH,
 
Ryan
 
--
 
set seed 98765.
new file.

inp pro.

comp Var_Level3   = -99.
comp Var_Level2     = -99.
comp Var_Level1 = -99.
comp v0 = -99.
comp u0 = -99.
comp e0 = -99.
comp nVar_Level2 = -99.
comp nVar_Level1 = -99.
comp gamma00 = 7.
comp z1 = -99.
comp x2 = -99.
comp b3 = 3.
comp b2 = 2.
comp b1 = 1.


leave Var_Level3 to b1 v0 u0 e0.

loop Var_Level3 = 1 to 100.
 comp v0 = normal(5).
 comp nVar_Level2 = trunc(rv.uniform(5,15)).

 loop Var_Level2 = 1 to nVar_Level2.
   comp u0 = normal(6).
   comp nVar_Level1 = trunc(rv.uniform(5,10)).
   comp z1 = rv.uniform(3,7).

   loop Var_Level1 = 1 to nVar_Level1.

     comp e0 = normal(10).
     comp x1 = rv.uniform(0,10).
     comp x2 = x1 + normal(2).

     comp y  = gamma00 + b1*x1 + b2*z1 + b3*x2 + (v0 + u0 + e0).
     end case.

   end loop.
 end loop.
end loop.

end file.
end inp pro.
exe.

*-----------.

mixed y with x1 z1 x2
 /fixed x1 z1 x2
 /random intercept | subject(Var_Level3)
 /random intercept | subject(Var_Level3*Var_Level2)
 /print solution testcov
 /method ml.

 
On Wed, Jun 2, 2010 at 3:30 PM, Art Kendall <[hidden email]> wrote:
Thank you. 
Do you recall whether any of these examples have 3 levels?

Art

On 6/2/2010 2:19 PM, SR Millis wrote:
Here are some resources:
 
 
 
 

Scott Millis
~~~~~~~~~~~
Scott R Millis, PhD, ABPP, CStat, CSci
Professor & Director of Research
Dept of Physical Medicine & Rehabilitation
Dept of Emergency Medicine
Wayne State University School of Medicine
261 Mack Blvd
Detroit, MI 48201
Email: [hidden email]
Email: [hidden email]
Tel: 313-993-8085
Fax: 313-966-7682

--- On Wed, 6/2/10, Art Kendall [hidden email] wrote:

From: Art Kendall [hidden email]
Subject: classic teaching data set for Multi-Level Modeling
To: [hidden email]
Date: Wednesday, June 2, 2010, 12:51 PM

Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

Art Kendall
Thank you.

Art

On 6/2/2010 4:18 PM, Ryan Black wrote:
Hi Art,
 
Here's an example that was provided to me a while back. I've changed a few things for ease of interpretation. The code begins by generating the data and ends with fitting the model.  Var_Level1 is the indicator variable for level 1 (e.g. student), Var_Level2 is the indicator variable for level 2 (e.g. class), and Var_Level3 is the indicator variable for level 3 (e.g. school). z1 is a level-2 covariate while x1 and x2 are level-1 covariates.
 
HTH,
 
Ryan
 
--
 
set seed 98765.
new file.

inp pro.

comp Var_Level3   = -99.
comp Var_Level2     = -99.
comp Var_Level1 = -99.
comp v0 = -99.
comp u0 = -99.
comp e0 = -99.
comp nVar_Level2 = -99.
comp nVar_Level1 = -99.
comp gamma00 = 7.
comp z1 = -99.
comp x2 = -99.
comp b3 = 3.
comp b2 = 2.
comp b1 = 1.


leave Var_Level3 to b1 v0 u0 e0.

loop Var_Level3 = 1 to 100.
 comp v0 = normal(5).
 comp nVar_Level2 = trunc(rv.uniform(5,15)).

 loop Var_Level2 = 1 to nVar_Level2.
   comp u0 = normal(6).
   comp nVar_Level1 = trunc(rv.uniform(5,10)).
   comp z1 = rv.uniform(3,7).

   loop Var_Level1 = 1 to nVar_Level1.

     comp e0 = normal(10).
     comp x1 = rv.uniform(0,10).
     comp x2 = x1 + normal(2).

     comp y  = gamma00 + b1*x1 + b2*z1 + b3*x2 + (v0 + u0 + e0).
     end case.

   end loop.
 end loop.
end loop.

end file.
end inp pro.
exe.

*-----------.

mixed y with x1 z1 x2
 /fixed x1 z1 x2
 /random intercept | subject(Var_Level3)
 /random intercept | subject(Var_Level3*Var_Level2)
 /print solution testcov
 /method ml.

 
On Wed, Jun 2, 2010 at 3:30 PM, Art Kendall <[hidden email]> wrote:
Thank you. 
Do you recall whether any of these examples have 3 levels?

Art

On 6/2/2010 2:19 PM, SR Millis wrote:
Here are some resources:
 
 
 
 

Scott Millis
~~~~~~~~~~~
Scott R Millis, PhD, ABPP, CStat, CSci
Professor & Director of Research
Dept of Physical Medicine & Rehabilitation
Dept of Emergency Medicine
Wayne State University School of Medicine
261 Mack Blvd
Detroit, MI 48201
Email: [hidden email]
Email: [hidden email]
Tel: 313-993-8085
Fax: 313-966-7682

--- On Wed, 6/2/10, Art Kendall [hidden email] wrote:

From: Art Kendall [hidden email]
Subject: classic teaching data set for Multi-Level Modeling
To: [hidden email]
Date: Wednesday, June 2, 2010, 12:51 PM

Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

SPSS Support-2
In reply to this post by Art Kendall

Hi J. P.,

Which data set are you working with, what version of SPSS are you using, what messages do you get with SPSS, and what results does HLM give (particularly for the covariance parameters for the random effects)? The most common reason for failures of convergence in mixed models in my experience is specification of a model with more covariance parameters than the data will support, resulting in redundant covariance parameters. If you'll provide the information I've requested, I'll be happy to look into this.

David Nichols
Statistical Support
SPSS, an IBM Company

From: J P <[hidden email]>
To: [hidden email]
Date: 06/02/2010 02:40 PM
Subject: Re: classic teaching data set for Multi-Level Modeling
Sent by: "SPSSX(r) Discussion" <[hidden email]>





I have had a very difficult time getting three level models to converge with SPSS. Works fine with HLM 6.0 but not with SPSS. Maybe there is an error in my syntax. Here it is for a three level longitudinal model: (no missing data)
 
MIXED math WITH year
/PRINT = SOLUTION TESTCOV
/METHOD=ML
/FIXED=intercept year
/RANDOM= intercept year | SUBJECT(schoolid) COVTYPE(UN)
/RANDOM= intercept year | SUBJECT(schoolid*childid) COVTYPE(UN).



From: Art Kendall <[hidden email]>
To:
[hidden email]
Sent:
Wed, June 2, 2010 3:30:53 PM
Subject:
Re: classic teaching data set for Multi-Level Modeling


Thank you.  
Do you recall whether any of these examples have 3 levels?

Art

On 6/2/2010 2:19 PM, SR Millis wrote:
Here are some resources:
 
http://www.ats.ucla.edu/stat/stata/examples/alda/default.htm
 
http://www.ats.ucla.edu/stat/stata/examples/mlm_imm/default.htm
 
http://www.ats.ucla.edu/stat/stata/examples/mlm_ma_snijders/default.htm
 
http://www.ats.ucla.edu/stat/stata/examples/mlm_ma_hox/default.htm

Scott Millis
~~~~~~~~~~~
Scott R Millis, PhD, ABPP, CStat, CSci
Professor & Director of Research
Dept of Physical Medicine & Rehabilitation
Dept of Emergency Medicine
Wayne State University School of Medicine
261 Mack Blvd
Detroit, MI 48201
Email:
aa3379@...
Email:
srmillis@...
Tel: 313-993-8085
Fax: 313-966-7682

--- On Wed, 6/2/10, Art Kendall
<Art@...> wrote:

From: Art Kendall
<Art@...>
Subject: classic teaching data set for Multi-Level Modeling
To:
[hidden email]
Date: Wednesday, June 2, 2010, 12:51 PM

Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants
===================== To manage your subscription to SPSSX-L, send a message to
LISTSERV@... (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


Reply | Threaded
Open this post in threaded view
|

Re: classic teaching data set for Multi-Level Modeling

Bruce Weaver
Administrator
In reply to this post by Art Kendall
I think the data set has 3 levels, but I don' remember if any of the examples include all 3.


Art Kendall wrote

Thank you. 
Do you recall whether any of these examples have 3 levels?

Art

On 6/2/2010 3:03 PM, Bruce Weaver wrote:

  Hi Art.  I have the data & syntax for many of the examples in Jos Twisk's
nice (and very accessible) introductory book, "Applied Multilevel Analysis:
A Practical Guide".  I'll send them to you off list.

You can preview parts of Twisk's book at Google Books.  It is not as
complete as some of the other books that are out there, and probably not as
authoritative either.  But IMO, it does a much better job than most of
presenting the basic concepts in a very understandable fashion.  I found
that after reading Twisk (and working through his examples), it was much
easier to read some of the other books that are out there than it had been
'before Twisk'.  ;-)

Cheers,
Bruce



Art Kendall wrote:
 
 
   

Does anybody have available either
1) a public data set and syntax that is routinely used in teaching MLM
or
2) syntax to produce a set of data to demo MLM for teaching.

If you do, would you please send them to me?

Art Kendall
Social Research Consultants



=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU  (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


   
 
 

-----
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/ 
"When all else fails, RTFM."

NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context: http://old.nabble.com/classic-teaching-data-set-for-Multi-Level-Modeling-tp28757157p28758670.html 
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU  (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

 




=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.