regression: multiple Y for each X

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

regression: multiple Y for each X

Ian Martin-2
We have a study going on in a number of northern communities,
measuring diet and nutrition variables.  ANOVA shows differences
between communities, but we have a hypothesis that a certain
continuous variable could be a predictor of diet/nutrition in the
communities.  This predictor is a single value for each community, so
we have multiple Y (diet or nutrition variable of interest) for each
value of X.

I seem to remember that it is appropriate to run this first as ANOVA
(with community as the grouping factor) and then as regression, but
testing the MS regression over the MS for the community factor from
the ANOVA model instead of over the MS error from regression.  If so,
I could do this by hand using the output from the 2 SPSS models, but
I wondered if there is a way to do this test (or an alternate)
directly in SPSS.

Comments or suggestions appreciated.

regards,
Ian

Ian D. Martin, Ph.D.

Tsuji Laboratory
University of Waterloo
Dept. of Environment & Resource Studies

=====================
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: regression: multiple Y for each X

Maguin, Eugene
Ian,

This sounds like a multilevel design in that you have multiple communities
and multiple respondents in each community. An example would be if community
members reported fat consumption as a fraction of total dietary calories and
the community variable were the number of grocery stores in the community.
And you are interested in the relationship between the mean fat fraction and
number of grocery stores. But to make a multilevel analysis work you need to
have fairly large number of communities (level 2 units). 20 has been
mentioned (see Hox's book) but more is better and more are definitely needed
to good standard errors. If you have fewer communities, you can certainly
try to fit a model but just keep in mind that you're level 2 model is the
number of communities.

The alternative is to fit a between factors design where communities are the
levels of the between factor. In this model every community member has the
same value for the number of stores.

All this can be done in Mixed and I think one of the examples in the
documentation more or less fits your situation. Also. Earlier today there
was reply to a longitudinal analysis question by, I think, RBlack who gave
cites to several websites that may be useful to you.


>>We have a study going on in a number of northern communities,
measuring diet and nutrition variables.  ANOVA shows differences
between communities, but we have a hypothesis that a certain
continuous variable could be a predictor of diet/nutrition in the
communities.  This predictor is a single value for each community, so
we have multiple Y (diet or nutrition variable of interest) for each
value of X.

I seem to remember that it is appropriate to run this first as ANOVA
(with community as the grouping factor) and then as regression, but
testing the MS regression over the MS for the community factor from
the ANOVA model instead of over the MS error from regression.  If so,
I could do this by hand using the output from the 2 SPSS models, but
I wondered if there is a way to do this test (or an alternate)
directly in SPSS.

Comments or suggestions appreciated.

regards,
Ian

Ian D. Martin, Ph.D.

Tsuji Laboratory
University of Waterloo
Dept. of Environment & Resource Studies

=====================
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: regression: multiple Y for each X

statisticsdoc
In reply to this post by Ian Martin-2
Ian,
It sounds as though your data has a nested structure.  You might want to consider using Hierarchical Linear Modeling.  How many communitities are in your study, and how many cases in each community?
HTH
Steve Brand
------Original Message------
From: Ian Martin
Sender: SPSSX(r) Discussion
To: [hidden email]
ReplyTo: Ian Martin
Subject: regression: multiple Y for each X
Sent: Jan 7, 2010 10:42 AM

We have a study going on in a number of northern communities,
measuring diet and nutrition variables.  ANOVA shows differences
between communities, but we have a hypothesis that a certain
continuous variable could be a predictor of diet/nutrition in the
communities.  This predictor is a single value for each community, so
we have multiple Y (diet or nutrition variable of interest) for each
value of X.

I seem to remember that it is appropriate to run this first as ANOVA
(with community as the grouping factor) and then as regression, but
testing the MS regression over the MS for the community factor from
the ANOVA model instead of over the MS error from regression.  If so,
I could do this by hand using the output from the 2 SPSS models, but
I wondered if there is a way to do this test (or an alternate)
directly in SPSS.

Comments or suggestions appreciated.

regards,
Ian

Ian D. Martin, Ph.D.

Tsuji Laboratory
University of Waterloo
Dept. of Environment & Resource Studies

=====================
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


www.StatisticsDoc.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
Reply | Threaded
Open this post in threaded view
|

Re: regression: multiple Y for each X

Ian Martin-2
Keith & Gene,

Thanks for your suggestions.  For further background, as Keith
requested, I have 9 communities, with between 12 and 93 respondents
per community for a total n of 380.  A scatterplot of the nutrition
variable against the continuous predictor does show an apparent
linear trend, though of course the groups of multiple Ys overlap
broadly.

I don't have much experience with hierarchical or nested designs, and
the approach I've thought about using is one laid out in Sokal &
Rohlf's "Biometry" 1981, example in Box 14.4, page 480.  I guess
maybe that dates me, but it seemed appropriate to the data.  S&R
advocate -- as I understand it -- taking ANOVA sum of squares
(community) minus REGRESSION SS to get deviation from linearity SS.
Then the REGRESSION MS is tested over the deviation from linearity MS.

regards,
Ian

Ian D. Martin, Ph.D.

Tsuji Laboratory
University of Waterloo
Dept. of Environment & Resource Studies


On 07 Jan, 2010, at 11:13 AM, [hidden email] wrote:

> Ian,
> It sounds as though your data has a nested structure.  You might
> want to consider using Hierarchical Linear Modeling.  How many
> communitities are in your study, and how many cases in each community?
> HTH
> Steve Brand
> ------Original Message------
> From: Ian Martin
> Sender: SPSSX(r) Discussion
> To: [hidden email]
> ReplyTo: Ian Martin
> Subject: regression: multiple Y for each X
> Sent: Jan 7, 2010 10:42 AM
>
> We have a study going on in a number of northern communities,
> measuring diet and nutrition variables.  ANOVA shows differences
> between communities, but we have a hypothesis that a certain
> continuous variable could be a predictor of diet/nutrition in the
> communities.  This predictor is a single value for each community, so
> we have multiple Y (diet or nutrition variable of interest) for each
> value of X.
>
> I seem to remember that it is appropriate to run this first as ANOVA
> (with community as the grouping factor) and then as regression, but
> testing the MS regression over the MS for the community factor from
> the ANOVA model instead of over the MS error from regression.  If so,
> I could do this by hand using the output from the 2 SPSS models, but
> I wondered if there is a way to do this test (or an alternate)
> directly in SPSS.
>
> Comments or suggestions appreciated.
>
> regards,
> Ian
>
> Ian D. Martin, Ph.D.
>
> Tsuji Laboratory
> University of Waterloo
> Dept. of Environment & Resource Studies
>
> =====================
> 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
>
>
> www.StatisticsDoc.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
Reply | Threaded
Open this post in threaded view
|

Re: regression: multiple Y for each X

Maguin, Eugene
Ian,

I haven't seen Sokal and Rohlf's text so I can't say anything about what
they said. However, your description of what they said seems odd to me. I'd
like to say they are describing an ANCOVA model but I'm not sure. Perhaps
someone else will recognize the description of the computation or be
familiar with that reference.

You said that you want to know whether '... a certain continuous variable
could be a predictor of diet/nutrition in the communities.' So you are
interested in community level relationships. Community is a kind of nuisance
factor. A really crude way to do this would be to average the DV within
community (via Aggregate) and correlate the community level mean with the
community level variable.

I don't think this can be done in Mixed but I could well be wrong (and would
like to be corrected with a syntax example if I am). In an SEM program or
HLM, yes it can.

Gene Maguin


>>Thanks for your suggestions.  For further background, as Keith
requested, I have 9 communities, with between 12 and 93 respondents
per community for a total n of 380.  A scatterplot of the nutrition
variable against the continuous predictor does show an apparent
linear trend, though of course the groups of multiple Ys overlap
broadly.

I don't have much experience with hierarchical or nested designs, and
the approach I've thought about using is one laid out in Sokal &
Rohlf's "Biometry" 1981, example in Box 14.4, page 480.  I guess
maybe that dates me, but it seemed appropriate to the data.  S&R
advocate -- as I understand it -- taking ANOVA sum of squares
(community) minus REGRESSION SS to get deviation from linearity SS.
Then the REGRESSION MS is tested over the deviation from linearity MS.

regards,
Ian

Ian D. Martin, Ph.D.

Tsuji Laboratory
University of Waterloo
Dept. of Environment & Resource Studies


On 07 Jan, 2010, at 11:13 AM, [hidden email] wrote:

> Ian,
> It sounds as though your data has a nested structure.  You might
> want to consider using Hierarchical Linear Modeling.  How many
> communitities are in your study, and how many cases in each community?
> HTH
> Steve Brand
> ------Original Message------
> From: Ian Martin
> Sender: SPSSX(r) Discussion
> To: [hidden email]
> ReplyTo: Ian Martin
> Subject: regression: multiple Y for each X
> Sent: Jan 7, 2010 10:42 AM
>
> We have a study going on in a number of northern communities,
> measuring diet and nutrition variables.  ANOVA shows differences
> between communities, but we have a hypothesis that a certain
> continuous variable could be a predictor of diet/nutrition in the
> communities.  This predictor is a single value for each community, so
> we have multiple Y (diet or nutrition variable of interest) for each
> value of X.
>
> I seem to remember that it is appropriate to run this first as ANOVA
> (with community as the grouping factor) and then as regression, but
> testing the MS regression over the MS for the community factor from
> the ANOVA model instead of over the MS error from regression.  If so,
> I could do this by hand using the output from the 2 SPSS models, but
> I wondered if there is a way to do this test (or an alternate)
> directly in SPSS.
>
> Comments or suggestions appreciated.
>
> regards,
> Ian
>
> Ian D. Martin, Ph.D.
>
> Tsuji Laboratory
> University of Waterloo
> Dept. of Environment & Resource Studies
>

=====================
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: regression: multiple Y for each X

Bruce Weaver
Administrator
In reply to this post by Ian Martin-2
Ian Martin-2 wrote
Keith & Gene,

Thanks for your suggestions.  For further background, as Keith
requested, I have 9 communities, with between 12 and 93 respondents
per community for a total n of 380.  A scatterplot of the nutrition
variable against the continuous predictor does show an apparent
linear trend, though of course the groups of multiple Ys overlap
broadly.

I don't have much experience with hierarchical or nested designs, and
the approach I've thought about using is one laid out in Sokal &
Rohlf's "Biometry" 1981, example in Box 14.4, page 480.  I guess
maybe that dates me, but it seemed appropriate to the data.  S&R
advocate -- as I understand it -- taking ANOVA sum of squares
(community) minus REGRESSION SS to get deviation from linearity SS.
Then the REGRESSION MS is tested over the deviation from linearity MS.

regards,
Ian
I don't have the Sokal & Rohlf book either, but like Gene, I guess they are probably describing an ANCOVA model.  (An old edition of Dave Howell's textbook shows computation of the various sums of squares for an ANCOVA model that entail subtracting SS_regression(T) and SS_regression(C) from SS_regression(T,C), for example, with T and C referring to treatment & covariate, I think.)

For a very accessible introduction to multilevel models, I heartily recommend "Applied Multilevel Analysis", by Jos Twisk (Cambridge Press).  It includes a chapter that shows how to run the models in the book with various software packages, including SPSS.

Regarding the number of communities (or level 2 units, more generally), Snijders & Bosker (1999) suggest as a rough guideline that ANCOVA be used if N < 10, and a multilevel model be used if N = 10 or more.  But they add that this guideline should be taken "with a large grain of salt".

HTH.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: regression: multiple Y for each X

Ryan
In reply to this post by Ian Martin-2
Ian,

If you wish to run a linear mixed model, you'll need to set up your data set as follows:

------------------------------------------------

Person_ID Community_ID   X     Nutrtition
1                   1             24       20
2                   1             24       22
3                   1             24       24
4                   1             24       30
5                   1             24       19
6                   2             10       23
7                   2             10       24
8                   2             10       18
9                   2             10       17
10                 3             12       12
.
.
.
N
------------------------------------------------

To test if there is a linear relationship between your second level covariate, X, and your dependent variable, Nutrition, within the linear mixed modeling framework the full model would be:

------------------------------------------------
MIXED Nutrition WITH X
  /FIXED=X | SSTYPE(3)
  /METHOD=REML
  /PRINT=DESCRIPTIVES SOLUTION
  /RANDOM=INTERCEPT X | SUBJECT(Community_ID) COVTYPE(UN).
------------------------------------------------

Having written the above code, it is certainly possible that for your data the only random term necessary is the community intercept. The only change to the code would be to remove "X" from the /RANDOM statement as written below:

------------------------------------------------
MIXED Nutrition WITH X
  /FIXED=X | SSTYPE(3)
  /METHOD=REML
  /PRINT=DESCRIPTIVES SOLUTION
  /RANDOM=INTERCEPT | SUBJECT(Community_ID) COVTYPE(VC).
------------------------------------------------

Feel free to write back if I have not accurately captured the specifications of your data and/or research question.

Ryan

Ian Martin-2 wrote
Keith & Gene,

Thanks for your suggestions.  For further background, as Keith
requested, I have 9 communities, with between 12 and 93 respondents
per community for a total n of 380.  A scatterplot of the nutrition
variable against the continuous predictor does show an apparent
linear trend, though of course the groups of multiple Ys overlap
broadly.

I don't have much experience with hierarchical or nested designs, and
the approach I've thought about using is one laid out in Sokal &
Rohlf's "Biometry" 1981, example in Box 14.4, page 480.  I guess
maybe that dates me, but it seemed appropriate to the data.  S&R
advocate -- as I understand it -- taking ANOVA sum of squares
(community) minus REGRESSION SS to get deviation from linearity SS.
Then the REGRESSION MS is tested over the deviation from linearity MS.

regards,
Ian

Ian D. Martin, Ph.D.

Tsuji Laboratory
University of Waterloo
Dept. of Environment & Resource Studies


On 07 Jan, 2010, at 11:13 AM, statisticsdoc@cox.net wrote:

> Ian,
> It sounds as though your data has a nested structure.  You might
> want to consider using Hierarchical Linear Modeling.  How many
> communitities are in your study, and how many cases in each community?
> HTH
> Steve Brand
> ------Original Message------
> From: Ian Martin
> Sender: SPSSX(r) Discussion
> To: SPSSX-L@LISTSERV.UGA.EDU
> ReplyTo: Ian Martin
> Subject: regression: multiple Y for each X
> Sent: Jan 7, 2010 10:42 AM
>
> We have a study going on in a number of northern communities,
> measuring diet and nutrition variables.  ANOVA shows differences
> between communities, but we have a hypothesis that a certain
> continuous variable could be a predictor of diet/nutrition in the
> communities.  This predictor is a single value for each community, so
> we have multiple Y (diet or nutrition variable of interest) for each
> value of X.
>
> I seem to remember that it is appropriate to run this first as ANOVA
> (with community as the grouping factor) and then as regression, but
> testing the MS regression over the MS for the community factor from
> the ANOVA model instead of over the MS error from regression.  If so,
> I could do this by hand using the output from the 2 SPSS models, but
> I wondered if there is a way to do this test (or an alternate)
> directly in SPSS.
>
> Comments or suggestions appreciated.
>
> regards,
> Ian
>
> Ian D. Martin, Ph.D.
>
> Tsuji Laboratory
> University of Waterloo
> Dept. of Environment & Resource Studies
>
> =====================
> 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
>
>
> www.StatisticsDoc.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
Reply | Threaded
Open this post in threaded view
|

Re: regression: multiple Y for each X

Ryan
Ian,

I have a small point of clarification. In the previous post I indicated that the only change I made to the /RANDOM statement was to remove the "X" term. However, you might have noticed that I changed (UN) to (VC) as well. I will not go into why this is the case right now, but note that either term will yield identical results.

Ryan

rblack wrote
Ian,

If you wish to run a linear mixed model, you'll need to set up your data set as follows:

------------------------------------------------

Person_ID Community_ID   X     Nutrtition
1                   1             24       20
2                   1             24       22
3                   1             24       24
4                   1             24       30
5                   1             24       19
6                   2             10       23
7                   2             10       24
8                   2             10       18
9                   2             10       17
10                 3             12       12
.
.
.
N
------------------------------------------------

To test if there is a linear relationship between your second level covariate, X, and your dependent variable, Nutrition, within the linear mixed modeling framework the full model would be:

------------------------------------------------
MIXED Nutrition WITH X
  /FIXED=X | SSTYPE(3)
  /METHOD=REML
  /PRINT=DESCRIPTIVES SOLUTION
  /RANDOM=INTERCEPT X | SUBJECT(Community_ID) COVTYPE(UN).
------------------------------------------------

Having written the above code, it is certainly possible that for your data the only random term necessary is the community intercept. The only change to the code would be to remove "X" from the /RANDOM statement as written below:

------------------------------------------------
MIXED Nutrition WITH X
  /FIXED=X | SSTYPE(3)
  /METHOD=REML
  /PRINT=DESCRIPTIVES SOLUTION
  /RANDOM=INTERCEPT | SUBJECT(Community_ID) COVTYPE(VC).
------------------------------------------------

Feel free to write back if I have not accurately captured the specifications of your data and/or research question.

Ryan

Ian Martin-2 wrote
Keith & Gene,

Thanks for your suggestions.  For further background, as Keith
requested, I have 9 communities, with between 12 and 93 respondents
per community for a total n of 380.  A scatterplot of the nutrition
variable against the continuous predictor does show an apparent
linear trend, though of course the groups of multiple Ys overlap
broadly.

I don't have much experience with hierarchical or nested designs, and
the approach I've thought about using is one laid out in Sokal &
Rohlf's "Biometry" 1981, example in Box 14.4, page 480.  I guess
maybe that dates me, but it seemed appropriate to the data.  S&R
advocate -- as I understand it -- taking ANOVA sum of squares
(community) minus REGRESSION SS to get deviation from linearity SS.
Then the REGRESSION MS is tested over the deviation from linearity MS.

regards,
Ian

Ian D. Martin, Ph.D.

Tsuji Laboratory
University of Waterloo
Dept. of Environment & Resource Studies


On 07 Jan, 2010, at 11:13 AM, statisticsdoc@cox.net wrote:

> Ian,
> It sounds as though your data has a nested structure.  You might
> want to consider using Hierarchical Linear Modeling.  How many
> communitities are in your study, and how many cases in each community?
> HTH
> Steve Brand
> ------Original Message------
> From: Ian Martin
> Sender: SPSSX(r) Discussion
> To: SPSSX-L@LISTSERV.UGA.EDU
> ReplyTo: Ian Martin
> Subject: regression: multiple Y for each X
> Sent: Jan 7, 2010 10:42 AM
>
> We have a study going on in a number of northern communities,
> measuring diet and nutrition variables.  ANOVA shows differences
> between communities, but we have a hypothesis that a certain
> continuous variable could be a predictor of diet/nutrition in the
> communities.  This predictor is a single value for each community, so
> we have multiple Y (diet or nutrition variable of interest) for each
> value of X.
>
> I seem to remember that it is appropriate to run this first as ANOVA
> (with community as the grouping factor) and then as regression, but
> testing the MS regression over the MS for the community factor from
> the ANOVA model instead of over the MS error from regression.  If so,
> I could do this by hand using the output from the 2 SPSS models, but
> I wondered if there is a way to do this test (or an alternate)
> directly in SPSS.
>
> Comments or suggestions appreciated.
>
> regards,
> Ian
>
> Ian D. Martin, Ph.D.
>
> Tsuji Laboratory
> University of Waterloo
> Dept. of Environment & Resource Studies
>
> =====================
> 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
>
>
> www.StatisticsDoc.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
Reply | Threaded
Open this post in threaded view
|

Re: regression: multiple Y for each X

Muir Houston-2
In reply to this post by Bruce Weaver
Although a bit older, the complete text of Applied Multilevel Analysis.
JJ Hox (1994) is available on the Eric site:

http://www.eric.ed.gov/ERICWebPortal/custom/portlets/recordDetails/detai
lmini.jsp?_nfpb=true&_&ERICExtSearch_SearchValue_0=ED384636&ERICExtSearc
h_SearchType_0=no&accno=ED384636

'This book is meant as a basic and fairly nontechnical introduction to
multilevel analysis for applied researchers in the social sciences. The
term "multilevel" refers to a hierarchical or nested data structure,
usually people within organizational groups, although the nesting may
also consist of repeated measures with people or respondents within
clusters as in cluster sampling. Multilevel model or multilevel analysis
is used as a generic term for all models for nested data. The book
presents two multilevel models: the multilevel regression model and a
model for multilevel covariance structures.' from blurb




-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bruce Weaver
Sent: 07 January 2010 20:41
To: [hidden email]
Subject: Re: regression: multiple Y for each X

Ian Martin-2 wrote:
>
> Keith & Gene,
>
> Thanks for your suggestions.  For further background, as Keith
> requested, I have 9 communities, with between 12 and 93 respondents
> per community for a total n of 380.  A scatterplot of the nutrition
> variable against the continuous predictor does show an apparent linear

> trend, though of course the groups of multiple Ys overlap broadly.
>
> I don't have much experience with hierarchical or nested designs, and
> the approach I've thought about using is one laid out in Sokal &
> Rohlf's "Biometry" 1981, example in Box 14.4, page 480.  I guess maybe

> that dates me, but it seemed appropriate to the data.  S&R advocate --

> as I understand it -- taking ANOVA sum of squares
> (community) minus REGRESSION SS to get deviation from linearity SS.
> Then the REGRESSION MS is tested over the deviation from linearity MS.
>
> regards,
> Ian
>

I don't have the Sokal & Rohlf book either, but like Gene, I guess they
are probably describing an ANCOVA model.  (An old edition of Dave
Howell's textbook shows computation of the various sums of squares for
an ANCOVA model that entail subtracting SS_regression(T) and
SS_regression(C) from SS_regression(T,C), for example, with T and C
referring to treatment & covariate, I think.)

For a very accessible introduction to multilevel models, I heartily
recommend "Applied Multilevel Analysis", by Jos Twisk (Cambridge Press).
It includes a chapter that shows how to run the models in the book with
various software packages, including SPSS.

Regarding the number of communities (or level 2 units, more generally),
Snijders & Bosker (1999) suggest as a rough guideline that ANCOVA be
used if N < 10, and a multilevel model be used if N = 10 or more.  But
they add that this guideline should be taken "with a large grain of
salt".

HTH.


-----
--
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/regression%3A-multiple-Y-for-each-X-tp27062019p270
66642.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
Reply | Threaded
Open this post in threaded view
|

SPSSdxcfg error

Roberts, Michael
Good Morning List


I need some help identifying the cause of this error when running a program in SPSS v.17.0.1 on which Python 2.5 is loaded with the Python integration - all of which were installed automatically with the base installation.  Has anyone seen this before, and if so, how can I fix it?


"...

>Error # 6890. Command name: BEGIN PROGRAM
>Configuration file spssdxcfg.ini is invalid.
>This command not executed.
Configration file spssdxcfg.ini is invalid because the LIB_NAME is NULL.
>Error # 6887. Command name: BEGIN PROGRAM
>External program failed during initialization.

..."

TIA

Mike

=====================
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: SPSSdxcfg error

Jon K Peck

This generally means that there is something wrong with the Python plugin installation.  In V17 this can be caused by installed the 17.0.1 plugin over the 17.0.0 plugin without uninstalling that first.  Try uninstalling the plugin and reinstalling it.  Also, be sure that you have matched the 17.0.1 SPSS with the 17.0.1 plugin.

HTH,
Jon Peck
Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: "Roberts, Michael" <[hidden email]>
To: [hidden email]
Date: 01/08/2010 06:33 AM
Subject: [SPSSX-L] SPSSdxcfg error
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Good Morning List


I need some help identifying the cause of this error when running a program in SPSS v.17.0.1 on which Python 2.5 is loaded with the Python integration - all of which were installed automatically with the base installation.  Has anyone seen this before, and if so, how can I fix it?


"...

>Error # 6890. Command name: BEGIN PROGRAM
>Configuration file spssdxcfg.ini is invalid.
>This command not executed.
Configration file spssdxcfg.ini is invalid because the LIB_NAME is NULL.
>Error # 6887. Command name: BEGIN PROGRAM
>External program failed during initialization.

..."

TIA

Mike

=====================
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: SPSSdxcfg error

Roberts, Michael

Hi Jon,

 

Thank you for your help with this.  Your suggestion worked perfectly - I uninstalled the existing Python Integration plug-in, then downloaded and installed the v17.0.2 plug-in from the Devcentral website, and everything works as before (we just patched our existing installations with the v17.0.2 patch)!  So, all’s well again with the world. 

 

Hope you have a wonderful weekend!

 

Thank you, again.

 

Sincerely

Mike

 

From: Jon K Peck [mailto:[hidden email]]
Sent: Friday, January 08, 2010 8:54 AM
To: Roberts, Michael
Cc: [hidden email]
Subject: Re: [SPSSX-L] SPSSdxcfg error

 


This generally means that there is something wrong with the Python plugin installation.  In V17 this can be caused by installed the 17.0.1 plugin over the 17.0.0 plugin without uninstalling that first.  Try uninstalling the plugin and reinstalling it.  Also, be sure that you have matched the 17.0.1 SPSS with the 17.0.1 plugin.

HTH,
Jon Peck
Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435


From:

"Roberts, Michael" <[hidden email]>

To:

[hidden email]

Date:

01/08/2010 06:33 AM

Subject:

[SPSSX-L] SPSSdxcfg error

Sent by:

"SPSSX(r) Discussion" <[hidden email]>

 





Good Morning List


I need some help identifying the cause of this error when running a program in SPSS v.17.0.1 on which Python 2.5 is loaded with the Python integration - all of which were installed automatically with the base installation.  Has anyone seen this before, and if so, how can I fix it?


"...

>Error # 6890. Command name: BEGIN PROGRAM
>Configuration file spssdxcfg.ini is invalid.
>This command not executed.
Configration file spssdxcfg.ini is invalid because the LIB_NAME is NULL.
>Error # 6887. Command name: BEGIN PROGRAM
>External program failed during initialization.

..."

TIA

Mike

=====================
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
|

Location for import file from syntax

Mike Pritchard
In reply to this post by Roberts, Michael
Apologies if this is something obvious that I missed.

I'm trying to import using a data file and syntax provided by a survey
provider.  It's been a while since I did it this way, and on a different
version of SPSS, so I was hoping it would be easier than I recalled.

I had the files stored in the place I wanted to work on them.  First tried
clicking on the syntax file in that directory.  That didn't work - SPSS
started up but couldn't find anything.

Then I tried changing the syntax file to include the file location in the
data file specification and running the syntax file with SPSS already
loaded.  Surprising (to me) that didn't work either.  I suspect that the
path length was too long for SPSS.

Error # 34 in column 21.  Text:
c:\5CirclesResearch\clients\HylandsTeethingGe
>SPSS cannot access a file with the given file specification.  The file
>specification is either syntactically invalid, specifies an invalid drive,
>specifies a protected directory, specifies a protected file, or specifies a
>non-sharable file.
>This command not executed.

So then I put the files in a directory with a shorter path length and it
worked.

Is there a better way?

Thanks
Mike

=====================
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: Location for import file from syntax

Richard Ristow
At 05:01 PM 1/10/2010, Mike Pritchard wrote:

I [have] files stored in the place I wanted to work on them.  I tried [having] the syntax file include the file location in the data file specification and running the syntax file with SPSS already loaded.  Surprising (to me) that didn't work either.  I suspect that the path length was too long for SPSS.

Here's the common way to specify a long path name in syntax. This is a FILE HANDLE statement:

FILE HANDLE Unrolled
 /NAME='C:\Documents and Settings\Richard\My Documents'              +
         '\Temporary\SPSS\'                                          +
         '2009-11-24 Ristow - Many to many merge in SPSS'            +
         ' - '                                                       +
         'UNROLL.SAV'.

but the same will work most places (all places, I think) where you need to name a file. The path and file specified are,

'C:\Documents and Settings\Richard\My Documents\Temporary\SPSS\2009-11-24 Ristow - Many to many merge in SPSS - UNROLL.SAV'.
===================== 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: Location for import file from syntax

Mike Pritchard

Thanks Richard. 

 

FILE HANDLE handle_name

 /NAME = ‘path to fixed file’

DATA LIST LIST FILE = handle_name

Etc.

 

Mike

 

 

 

 


From: Richard Ristow [mailto:[hidden email]]
Sent: Sunday, January 10, 2010 3:08 PM
To: Mike Pritchard; [hidden email]
Subject: Re: Location for import file from syntax

 

At 05:01 PM 1/10/2010, Mike Pritchard wrote:


I [have] files stored in the place I wanted to work on them.  I tried [having] the syntax file include the file location in the data file specification and running the syntax file with SPSS already loaded.  Surprising (to me) that didn't work either.  I suspect that the path length was too long for SPSS.


Here's the common way to specify a long path name in syntax. This is a FILE HANDLE statement:

FILE HANDLE Unrolled
 /NAME='C:\Documents and Settings\Richard\My Documents'              +
         '\Temporary\SPSS\'                                          +
         '2009-11-24 Ristow - Many to many merge in SPSS'            +
         ' - '                                                       +
         'UNROLL.SAV'.

but the same will work most places (all places, I think) where you need to name a file. The path and file specified are,

'C:\Documents and Settings\Richard\My Documents\Temporary\SPSS\2009-11-24 Ristow - Many to many merge in SPSS - UNROLL.SAV'.


Reply | Threaded
Open this post in threaded view
|

Re: Location for import file from syntax

John F Hall
In reply to this post by Mike Pritchard
Had the same problem once: sorted it by burning data file to CD and then reading it by:
 
data list
    file 'e:bsa89.dat'
    rec 23
    /1  serial 1-4 etc., etc.
 
 
Before that I did
 
begin data
<copy data file in here>
end data
 
Sounds incredibly cumbersome, but it worked.  I was pressed for time and was new to Windows and SPSS for Windows, so if anyone has a shorter answer, I'd like to know as well.
----- Original Message -----
Sent: Sunday, January 10, 2010 11:01 PM
Subject: Location for import file from syntax


Apologies if this is something obvious that I missed.

I'm trying to import using a data file and syntax provided by a survey
provider.  It's been a while since I did it this way, and on a different
version of SPSS, so I was hoping it would be easier than I recalled.

I had the files stored in the place I wanted to work on them.  First tried
clicking on the syntax file in that directory.  That didn't work - SPSS
started up but couldn't find anything.

Then I tried changing the syntax file to include the file location in the
data file specification and running the syntax file with SPSS already
loaded.  Surprising (to me) that didn't work either.  I suspect that the
path length was too long for SPSS.

Error # 34 in column 21.  Text:
c:\5CirclesResearch\clients\HylandsTeethingGe
>SPSS cannot access a file with the given file specification.  The file
>specification is either syntactically invalid, specifies an invalid drive,
>specifies a protected directory, specifies a protected file, or specifies a
>non-sharable file.
>This command not executed.

So then I put the files in a directory with a shorter path length and it
worked.

Is there a better way?

Thanks
Mike

=====================
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: regression: multiple Y for each X

Swank, Paul R
In reply to this post by Ryan
I will point out that having only 9 level two units will mean that you likely will not get a good estimate fo the level two variance and therefore the ICC. Most people recommend at least 30 level two units. You might control for the level two units by including them as a fixed effect.

Paul

Dr. Paul R. Swank,
Professor and Director of Research
Children's Learning Institute
University of Texas Health Science Center-Houston


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of rblack
Sent: Thursday, January 07, 2010 9:38 PM
To: [hidden email]
Subject: Re: regression: multiple Y for each X

Ian,

I have a small point of clarification. In the previous post I indicated that
the only change I made to the /RANDOM statement was to remove the "X" term.
However, you might have noticed that I changed (UN) to (VC) as well. I will
not go into why this is the case right now, but note that either term will
yield identical results.

Ryan


rblack wrote:

>
> Ian,
>
> If you wish to run a linear mixed model, you'll need to set up your data
> set as follows:
>
> ------------------------------------------------
>
> Person_ID Community_ID   X     Nutrtition
> 1                   1             24       20
> 2                   1             24       22
> 3                   1             24       24
> 4                   1             24       30
> 5                   1             24       19
> 6                   2             10       23
> 7                   2             10       24
> 8                   2             10       18
> 9                   2             10       17
> 10                 3             12       12
> .
> .
> .
> N
> ------------------------------------------------
>
> To test if there is a linear relationship between your second level
> covariate, X, and your dependent variable, Nutrition, within the linear
> mixed modeling framework the full model would be:
>
> ------------------------------------------------
> MIXED Nutrition WITH X
>   /FIXED=X | SSTYPE(3)
>   /METHOD=REML
>   /PRINT=DESCRIPTIVES SOLUTION
>   /RANDOM=INTERCEPT X | SUBJECT(Community_ID) COVTYPE(UN).
> ------------------------------------------------
>
> Having written the above code, it is certainly possible that for your data
> the only random term necessary is the community intercept. The only change
> to the code would be to remove "X" from the /RANDOM statement as written
> below:
>
> ------------------------------------------------
> MIXED Nutrition WITH X
>   /FIXED=X | SSTYPE(3)
>   /METHOD=REML
>   /PRINT=DESCRIPTIVES SOLUTION
>   /RANDOM=INTERCEPT | SUBJECT(Community_ID) COVTYPE(VC).
> ------------------------------------------------
>
> Feel free to write back if I have not accurately captured the
> specifications of your data and/or research question.
>
> Ryan
>
>
> Ian Martin-2 wrote:
>>
>> Keith & Gene,
>>
>> Thanks for your suggestions.  For further background, as Keith
>> requested, I have 9 communities, with between 12 and 93 respondents
>> per community for a total n of 380.  A scatterplot of the nutrition
>> variable against the continuous predictor does show an apparent
>> linear trend, though of course the groups of multiple Ys overlap
>> broadly.
>>
>> I don't have much experience with hierarchical or nested designs, and
>> the approach I've thought about using is one laid out in Sokal &
>> Rohlf's "Biometry" 1981, example in Box 14.4, page 480.  I guess
>> maybe that dates me, but it seemed appropriate to the data.  S&R
>> advocate -- as I understand it -- taking ANOVA sum of squares
>> (community) minus REGRESSION SS to get deviation from linearity SS.
>> Then the REGRESSION MS is tested over the deviation from linearity MS.
>>
>> regards,
>> Ian
>>
>> Ian D. Martin, Ph.D.
>>
>> Tsuji Laboratory
>> University of Waterloo
>> Dept. of Environment & Resource Studies
>>
>>
>> On 07 Jan, 2010, at 11:13 AM, [hidden email] wrote:
>>
>>> Ian,
>>> It sounds as though your data has a nested structure.  You might
>>> want to consider using Hierarchical Linear Modeling.  How many
>>> communitities are in your study, and how many cases in each community?
>>> HTH
>>> Steve Brand
>>> ------Original Message------
>>> From: Ian Martin
>>> Sender: SPSSX(r) Discussion
>>> To: [hidden email]
>>> ReplyTo: Ian Martin
>>> Subject: regression: multiple Y for each X
>>> Sent: Jan 7, 2010 10:42 AM
>>>
>>> We have a study going on in a number of northern communities,
>>> measuring diet and nutrition variables.  ANOVA shows differences
>>> between communities, but we have a hypothesis that a certain
>>> continuous variable could be a predictor of diet/nutrition in the
>>> communities.  This predictor is a single value for each community, so
>>> we have multiple Y (diet or nutrition variable of interest) for each
>>> value of X.
>>>
>>> I seem to remember that it is appropriate to run this first as ANOVA
>>> (with community as the grouping factor) and then as regression, but
>>> testing the MS regression over the MS for the community factor from
>>> the ANOVA model instead of over the MS error from regression.  If so,
>>> I could do this by hand using the output from the 2 SPSS models, but
>>> I wondered if there is a way to do this test (or an alternate)
>>> directly in SPSS.
>>>
>>> Comments or suggestions appreciated.
>>>
>>> regards,
>>> Ian
>>>
>>> Ian D. Martin, Ph.D.
>>>
>>> Tsuji Laboratory
>>> University of Waterloo
>>> Dept. of Environment & Resource Studies
>>>
>>> =====================
>>> 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
>>>
>>>
>>> www.StatisticsDoc.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
>>
>>
>
>

--
View this message in context: http://old.nabble.com/regression%3A-multiple-Y-for-each-X-tp27062019p27070856.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