Hi all, I’ve successfully recoded categorical
variables out to dummies before, but for some reason I’ve getting issues
with my PLUM analysis with this recode – it’s rejecting the second
dummy I’ve entered into the model. Basically, the two dummies I have recoded represent whether
a subject saw a manipulated nutrient information panel on a food product. The recode commands I used are: RECODE XGROUP (1=1) (2=0) (3=1) (4=0) (5=0) INTO
HIGHERFATNIP. VARIABLE LABELS HIGHERFATNIP 'DUMMY VARIABLE FOR HIGHER
FAT NIP'. RECODE XGROUP (1=0) (2=1) (3=0) (4=1) (5=0) INTO
LOWERFATNIP. VARIABLE LABELS LOWERFATNIP 'DUMMY VARIABLE FOR LOWER
FAT NIP'. RECODE XGROUP (1=0) (2=0) (3=0) (4=0) (5=1) INTO CONTROLNIP. VARIABLE LABELS CONTROLNIP 'DUMMY VARIABLE FOR NO NIP
MANIPULATION'. There are three dummies above; I know the last is obsolete,
but I did it later in an attempt to put the control group into the PLUM to see
if that would solve the problem – but no dice. As you can see, there are three groups, so I should be able
to have results reported for both HIGHERFATNIP and LOWERFATNIP, but I am
getting the warning “This parameter is set to zero because it is
redundant” on the second NIP variable. I did a crosstab to check the recoding, before I ran the
PLUM , and the results were (I’ve pasted this as unformatted text
and used tabs to correct the column layout if it shows funny when the message
goes out to the list): DUMMY
VARIABLE FOR LASAGNE HIGHER FAT NIP * DUMMY VARIABLE FOR LASAGNE LOWER FAT NIP
Crosstabulation Count LOWERFATNIP .00 1.00 Total DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP .00 379 390 769 1.00 358 0 358 Total 737 390 1127 As you can see, I have successfully created coverage for the
three groups, (1,0), (0,1), (0,0), from the two dummy variables, so I am at a
complete loss to know why the two dummies don’t work in my
regression, with the (0,0) group being the reference category. I’ve
decided I’m overlooking something completely obvious that a list reader
will be able to point out to me. J Cheers Michelle ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.
This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.
www.clearswift.com **********************************************************************
|
Administrator
|
That's rather hard to read. How about doing it this way instead? RECODE XGROUP (1 3 = 1) (2 4 5 = 0) INTO HIGHERFATNIP. RECODE XGROUP (2 4 = 1) (1 3 5 = 0) INTO LOWERFATNIP. RECODE XGROUP (5=1) (1 2 3 4=0) INTO CONTROLNIP. * Or you could do this instead of recoding. compute HIGHERFATNIP = ANY(XGROUP,1,3). compute LOWERFATNIP = ANY(XGROUP,2,4). compute CONTROLNIP = (XGROUP EQ 5). VARIABLE LABELS HIGHERFATNIP 'DUMMY VARIABLE FOR HIGHER FAT NIP' LOWERFATNIP 'DUMMY VARIABLE FOR LOWER FAT NIP' CONTROLNIP 'DUMMY VARIABLE FOR NO NIP MANIPULATION' .
That table got all messed up in my reader. I think it was supposed to look like this. .00 1.00 Total .00 379 390 769 1.00 358 0 358 Total 737 390 1127 PLUM lets you enter both covariates (i.e., continuous variables) and FACTORS (categorical variables). So why not recode XGROUP to a single 3-level categorical variable, and enter it as a factor? I.e., recode XGROUP (1 3 = 1) (2 4 = 2) (5 = 0) into xgroup2. value labels xgroup2 0 'No NIP manipulation' 1 'Higher fat NIP' 2 'Lower fat NIP' . Now enter variable XGROUP2 as a factor rather than entering dummy variables as covariates. 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/). |
Thanks for the tips below, I didn't realise I could do recoding those different ways, so that was a helpful lesson.
I've done the recode where I could enter the NIP manipulation as a factor, and it worked perfectly, except 2 levels of the NIP variable have the message "This parameter is set to zero because it is redundant". The two with this message are the 'No NIP manipulation' and the 'Higher fat NIP' groups. (Note that I did the recode as 0=control, 1=lower fat, 2=higher fat, so there was logical ordering of the lower fat and higher fat categories.) I thought that the output was being caused by those two groups having very similar distributions, suggesting that the control group and the "Higher fat NIP" group are essentially equivalent. To test this idea, I've done some testing for this using non-parametric methods on my dependent variable. Because these tests require only two samples, I could not use the original recoded variable as it contains 3 categories, so I created a new variable where only the control and higher fat NIP groups had values; the lower fat NIP group values on this new variable were allowed to take the standard missing data form. The Moses test result was highly significant, at p<0.001, and the Mann-Whitney U test for independent samples had p=0.592, both of which suggest that the variance in the dependent variable is the same for the control and high-fat groups - I'm assuming this is the reason I am getting the "This parameter is set to zero because it is redundant" message. These results suggest I should collapse the control and higher fat groups into one group for this particular analysis, which would mean only one omitted category for the NIP variable. Any other suggestions or thoughts? Cheers Michelle -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: Friday, 26 November 2010 10:22 a.m. To: [hidden email] Subject: Re: problems with recoding [Sec: UNCLASSIFIED] Gosse, Michelle wrote: > > Hi all, I've successfully recoded categorical variables out to dummies > before, but for some reason I've getting issues with my PLUM analysis with > this recode - it's rejecting the second dummy I've entered into the model. > > Basically, the two dummies I have recoded represent whether a subject saw > a manipulated nutrient information panel on a food product. > > The recode commands I used are: > RECODE XGROUP (1=1) (2=0) (3=1) (4=0) (5=0) INTO HIGHERFATNIP. > VARIABLE LABELS HIGHERFATNIP 'DUMMY VARIABLE FOR HIGHER FAT NIP'. > RECODE XGROUP (1=0) (2=1) (3=0) (4=1) (5=0) INTO LOWERFATNIP. > VARIABLE LABELS LOWERFATNIP 'DUMMY VARIABLE FOR LOWER FAT NIP'. > RECODE XGROUP (1=0) (2=0) (3=0) (4=0) (5=1) INTO CONTROLNIP. > VARIABLE LABELS CONTROLNIP 'DUMMY VARIABLE FOR NO NIP MANIPULATION'. > That's rather hard to read. How about doing it this way instead? RECODE XGROUP (1 3 = 1) (2 4 5 = 0) INTO HIGHERFATNIP. RECODE XGROUP (2 4 = 1) (1 3 5 = 0) INTO LOWERFATNIP. RECODE XGROUP (5=1) (1 2 3 4=0) INTO CONTROLNIP. * Or you could do this instead of recoding. compute HIGHERFATNIP = ANY(XGROUP,1,3). compute LOWERFATNIP = ANY(XGROUP,2,4). compute CONTROLNIP = (XGROUP EQ 5). VARIABLE LABELS HIGHERFATNIP 'DUMMY VARIABLE FOR HIGHER FAT NIP' LOWERFATNIP 'DUMMY VARIABLE FOR LOWER FAT NIP' CONTROLNIP 'DUMMY VARIABLE FOR NO NIP MANIPULATION' . Gosse, Michelle wrote: > > There are three dummies above; I know the last is obsolete, but I did it > later in an attempt to put the control group into the PLUM to see if that > would solve the problem - but no dice. > As you can see, there are three groups, so I should be able to have > results reported for both HIGHERFATNIP and LOWERFATNIP, but I am getting > the warning "This parameter is set to zero because it is redundant" on the > second NIP variable. > > I did a crosstab to check the recoding, before I ran the PLUM , and the > results were (I've pasted this as unformatted text and used tabs to > correct the column layout if it shows funny when the message goes out to > the list): > DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP > * DUMMY VARIABLE FOR LASAGNE LOWER FAT NIP Crosstabulation > Count > > LOWERFATNIP > > .00 1.00 Total > DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP .00 379 > 390 769 > > 1.00 358 0 358 > Total > 737 390 1127 > That table got all messed up in my reader. I think it was supposed to look like this. .00 1.00 Total .00 379 390 769 1.00 358 0 358 Total 737 390 1127 Gosse, Michelle wrote: > > As you can see, I have successfully created coverage for the three groups, > (1,0), (0,1), (0,0), from the two dummy variables, so I am at a complete > loss to know why the two dummies don't work in my regression, with the > (0,0) group being the reference category. I've decided I'm overlooking > something completely obvious that a list reader will be able to point out > to me. :) > > Cheers > Michelle > > PLUM lets you enter both covariates (i.e., continuous variables) and FACTORS (categorical variables). So why not recode XGROUP to a single 3-level categorical variable, and enter it as a factor? I.e., recode XGROUP (1 3 = 1) (2 4 = 2) (5 = 0) into xgroup2. value labels xgroup2 0 'No NIP manipulation' 1 'Higher fat NIP' 2 'Lower fat NIP' . Now enter variable XGROUP2 as a factor rather than entering dummy variables as covariates. 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://spssx-discussion.1045642.n5.nabble.com/problems-with-recoding-Sec-UNCLASSIFIED-tp3280553p3280606.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 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.clearswift.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 |
Is there a reason not to use all 5 values on this variable? Are you
using it as a dependent (outcome, predicted) or independent (predictor, design)variable? Did you try Categorical Regression? It can do the analysis at different levels of measurement to see how they compare. You use the term"control" is this an experiment? Is xgroup a combination of conditions? Please explain what you are trying to do, e.g., the meanings of your variables, questions addressed, etc. Art Kendall Social Research Consultants On 11/25/2010 8:39 PM, Gosse, Michelle wrote: > Thanks for the tips below, I didn't realise I could do recoding those different ways, so that was a helpful lesson. > > I've done the recode where I could enter the NIP manipulation as a factor, and it worked perfectly, except 2 levels of the NIP variable have the message "This parameter is set to zero because it is redundant". The two with this message are the 'No NIP manipulation' and the 'Higher fat NIP' groups. (Note that I did the recode as 0=control, 1=lower fat, 2=higher fat, so there was logical ordering of the lower fat and higher fat categories.) > > I thought that the output was being caused by those two groups having very similar distributions, suggesting that the control group and the "Higher fat NIP" group are essentially equivalent. To test this idea, I've done some testing for this using non-parametric methods on my dependent variable. Because these tests require only two samples, I could not use the original recoded variable as it contains 3 categories, so I created a new variable where only the control and higher fat NIP groups had values; the lower fat NIP group values on this new variable were allowed to take the standard missing data form. > > The Moses test result was highly significant, at p<0.001, and the Mann-Whitney U test for independent samples had p=0.592, both of which suggest that the variance in the dependent variable is the same for the control and high-fat groups - I'm assuming this is the reason I am getting the "This parameter is set to zero because it is redundant" message. > > These results suggest I should collapse the control and higher fat groups into one group for this particular analysis, which would mean only one omitted category for the NIP variable. > > Any other suggestions or thoughts? > > Cheers > Michelle > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver > Sent: Friday, 26 November 2010 10:22 a.m. > To: [hidden email] > Subject: Re: problems with recoding [Sec: UNCLASSIFIED] > > Gosse, Michelle wrote: >> Hi all, I've successfully recoded categorical variables out to dummies >> before, but for some reason I've getting issues with my PLUM analysis with >> this recode - it's rejecting the second dummy I've entered into the model. >> >> Basically, the two dummies I have recoded represent whether a subject saw >> a manipulated nutrient information panel on a food product. >> >> The recode commands I used are: >> RECODE XGROUP (1=1) (2=0) (3=1) (4=0) (5=0) INTO HIGHERFATNIP. >> VARIABLE LABELS HIGHERFATNIP 'DUMMY VARIABLE FOR HIGHER FAT NIP'. >> RECODE XGROUP (1=0) (2=1) (3=0) (4=1) (5=0) INTO LOWERFATNIP. >> VARIABLE LABELS LOWERFATNIP 'DUMMY VARIABLE FOR LOWER FAT NIP'. >> RECODE XGROUP (1=0) (2=0) (3=0) (4=0) (5=1) INTO CONTROLNIP. >> VARIABLE LABELS CONTROLNIP 'DUMMY VARIABLE FOR NO NIP MANIPULATION'. >> > That's rather hard to read. How about doing it this way instead? > > RECODE XGROUP (1 3 = 1) (2 4 5 = 0) INTO HIGHERFATNIP. > RECODE XGROUP (2 4 = 1) (1 3 5 = 0) INTO LOWERFATNIP. > RECODE XGROUP (5=1) (1 2 3 4=0) INTO CONTROLNIP. > > * Or you could do this instead of recoding. > > compute HIGHERFATNIP = ANY(XGROUP,1,3). > compute LOWERFATNIP = ANY(XGROUP,2,4). > compute CONTROLNIP = (XGROUP EQ 5). > > VARIABLE LABELS > HIGHERFATNIP 'DUMMY VARIABLE FOR HIGHER FAT NIP' > LOWERFATNIP 'DUMMY VARIABLE FOR LOWER FAT NIP' > CONTROLNIP 'DUMMY VARIABLE FOR NO NIP MANIPULATION' > . > > > Gosse, Michelle wrote: >> There are three dummies above; I know the last is obsolete, but I did it >> later in an attempt to put the control group into the PLUM to see if that >> would solve the problem - but no dice. >> As you can see, there are three groups, so I should be able to have >> results reported for both HIGHERFATNIP and LOWERFATNIP, but I am getting >> the warning "This parameter is set to zero because it is redundant" on the >> second NIP variable. >> >> I did a crosstab to check the recoding, before I ran the PLUM , and the >> results were (I've pasted this as unformatted text and used tabs to >> correct the column layout if it shows funny when the message goes out to >> the list): >> DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP >> * DUMMY VARIABLE FOR LASAGNE LOWER FAT NIP Crosstabulation >> Count >> >> LOWERFATNIP >> >> .00 1.00 Total >> DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP .00 379 >> 390 769 >> >> 1.00 358 0 358 >> Total >> 737 390 1127 >> > > That table got all messed up in my reader. I think it was supposed to look > like this. > > .00 1.00 Total > .00 379 390 769 > 1.00 358 0 358 > Total 737 390 1127 > > > > Gosse, Michelle wrote: >> As you can see, I have successfully created coverage for the three groups, >> (1,0), (0,1), (0,0), from the two dummy variables, so I am at a complete >> loss to know why the two dummies don't work in my regression, with the >> (0,0) group being the reference category. I've decided I'm overlooking >> something completely obvious that a list reader will be able to point out >> to me. :) >> >> Cheers >> Michelle >> >> > PLUM lets you enter both covariates (i.e., continuous variables) and FACTORS > (categorical variables). So why not recode XGROUP to a single 3-level > categorical variable, and enter it as a factor? I.e., > > recode XGROUP (1 3 = 1) (2 4 = 2) (5 = 0) into xgroup2. > value labels xgroup2 > 0 'No NIP manipulation' > 1 'Higher fat NIP' > 2 'Lower fat NIP' > . > > Now enter variable XGROUP2 as a factor rather than entering dummy variables > as covariates. > > 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://spssx-discussion.1045642.n5.nabble.com/problems-with-recoding-Sec-UNCLASSIFIED-tp3280553p3280606.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 > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > > This footnote also confirms that this email message has been swept by > MIMEsweeper for the presence of computer viruses. > > www.clearswift.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 |
In reply to this post by Gosse, Michelle
At 03:02 PM 11/25/2010, Gosse, Michelle wrote:
>Ive getting issues with my PLUM analysis with >this recode its rejecting the second dummy Ive entered into the model. > >I did a crosstab to check the recoding, before I >ran the PLUM , and the results were [reformatted] DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP * DUMMY VARIABLE FOR LASAGNE LOWER FAT NIP Crosstabulation Count LOWERFATNIP .00 1.00 Total DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP .00 379 390 769 1.00 358 0 358 Total 737 390 1127 >As you can see, I have coverage for the three >groups, (1,0), (0,1), (0,0), from the two dummy >variables, so I am at a complete loss to know >why I am getting the warning This parameter is >set to zero because it is redundant on the second NIP variable. I'm skipped your RECODE code, because on the face of it, that's not the problem: as you say, the three groups are populated. So you should look at, and maybe post, the output from your PLUM run. SOMETIMES problems like yours arise because part of the analysis population is lost because of missing data. A quick check on that is to run (code not tested) TEMPORARY. SELECT IF NMISS(<all variables in PLUM model>) EQ 0. CROSSTABS /TABLES=HIGHERFATNIP BY LOWERFATNIP /FORMAT= AVALUE TABLES /CELLS= COUNT /COUNT ROUND CELL . ===================== 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 |
In reply to this post by Art Kendall
Hi Art,
The outcome of this work is to produce a regression model that explains people's purchase intention of a food. The variables all come from an experiment, where a couple of things were manipulated. In the example covered in the earlier emails, the nutrient information panel (NIP) for the food was either normal (i.e. control), manipulated to show lower fat content (lower fat), or manipulated to show higher fat content (higher fat). There were 5 categories in the XGROUP variable, which relates to the NIP, as there was a further manipulation done where the external consultants took that into account in the groupings in this variable - which relates to whether there was a health claim also shown on the product (the two groups here are control = absence of health claim and manipulation = presence of a health claim). The upshot is that XGROUP - which, as you surmise, is a combination of conditions - was given to me with 5 categories: - higher fat, health claim present - higher fat, health claim absent - lower fat, health claim present - lower fat, health claim absent - control, control. I also have a binary variable for whether a claim is present, which is entered in the model, so the RECODE is simply grouping the two "higher fat" groups together, the two "lower fat" groups together, and the control separately, which is why 5 groups are being recoded into 3. And, thanks to your questions below, I did an analysis which I hadn't done earlier - crosstab the NIP manipulation against the claim presence variables. Have just discovered that the "no NIP manipulation" group is also the "no health claim presence" group, so I don't have a complete design. That will be the reason I am getting the warning in PLUM - the analysis wasn't designed for in the experiment and so I can't regress for it. I will now be going back to the client. Thanks to everyone for their suggestions, this was driving me barmy on Friday. Cheers Michelle -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall Sent: Saturday, 27 November 2010 3:25 a.m. To: [hidden email] Subject: Re: problems with recoding [Sec: UNCLASSIFIED] Is there a reason not to use all 5 values on this variable? Are you using it as a dependent (outcome, predicted) or independent (predictor, design)variable? Did you try Categorical Regression? It can do the analysis at different levels of measurement to see how they compare. You use the term"control" is this an experiment? Is xgroup a combination of conditions? Please explain what you are trying to do, e.g., the meanings of your variables, questions addressed, etc. Art Kendall Social Research Consultants On 11/25/2010 8:39 PM, Gosse, Michelle wrote: > Thanks for the tips below, I didn't realise I could do recoding those different ways, so that was a helpful lesson. > > I've done the recode where I could enter the NIP manipulation as a factor, and it worked perfectly, except 2 levels of the NIP variable have the message "This parameter is set to zero because it is redundant". The two with this message are the 'No NIP manipulation' and the 'Higher fat NIP' groups. (Note that I did the recode as 0=control, 1=lower fat, 2=higher fat, so there was logical ordering of the lower fat and higher fat categories.) > > I thought that the output was being caused by those two groups having very similar distributions, suggesting that the control group and the "Higher fat NIP" group are essentially equivalent. To test this idea, I've done some testing for this using non-parametric methods on my dependent variable. Because these tests require only two samples, I could not use the original recoded variable as it contains 3 categories, so I created a new variable where only the control and higher fat NIP groups had values; the lower fat NIP group values on this new variable were allowed to take the standard missing data form. > > The Moses test result was highly significant, at p<0.001, and the Mann-Whitney U test for independent samples had p=0.592, both of which suggest that the variance in the dependent variable is the same for the control and high-fat groups - I'm assuming this is the reason I am getting the "This parameter is set to zero because it is redundant" message. > > These results suggest I should collapse the control and higher fat groups into one group for this particular analysis, which would mean only one omitted category for the NIP variable. > > Any other suggestions or thoughts? > > Cheers > Michelle > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver > Sent: Friday, 26 November 2010 10:22 a.m. > To: [hidden email] > Subject: Re: problems with recoding [Sec: UNCLASSIFIED] > > Gosse, Michelle wrote: >> Hi all, I've successfully recoded categorical variables out to dummies >> before, but for some reason I've getting issues with my PLUM analysis with >> this recode - it's rejecting the second dummy I've entered into the model. >> >> Basically, the two dummies I have recoded represent whether a subject saw >> a manipulated nutrient information panel on a food product. >> >> The recode commands I used are: >> RECODE XGROUP (1=1) (2=0) (3=1) (4=0) (5=0) INTO HIGHERFATNIP. >> VARIABLE LABELS HIGHERFATNIP 'DUMMY VARIABLE FOR HIGHER FAT NIP'. >> RECODE XGROUP (1=0) (2=1) (3=0) (4=1) (5=0) INTO LOWERFATNIP. >> VARIABLE LABELS LOWERFATNIP 'DUMMY VARIABLE FOR LOWER FAT NIP'. >> RECODE XGROUP (1=0) (2=0) (3=0) (4=0) (5=1) INTO CONTROLNIP. >> VARIABLE LABELS CONTROLNIP 'DUMMY VARIABLE FOR NO NIP MANIPULATION'. >> > That's rather hard to read. How about doing it this way instead? > > RECODE XGROUP (1 3 = 1) (2 4 5 = 0) INTO HIGHERFATNIP. > RECODE XGROUP (2 4 = 1) (1 3 5 = 0) INTO LOWERFATNIP. > RECODE XGROUP (5=1) (1 2 3 4=0) INTO CONTROLNIP. > > * Or you could do this instead of recoding. > > compute HIGHERFATNIP = ANY(XGROUP,1,3). > compute LOWERFATNIP = ANY(XGROUP,2,4). > compute CONTROLNIP = (XGROUP EQ 5). > > VARIABLE LABELS > HIGHERFATNIP 'DUMMY VARIABLE FOR HIGHER FAT NIP' > LOWERFATNIP 'DUMMY VARIABLE FOR LOWER FAT NIP' > CONTROLNIP 'DUMMY VARIABLE FOR NO NIP MANIPULATION' > . > > > Gosse, Michelle wrote: >> There are three dummies above; I know the last is obsolete, but I did it >> later in an attempt to put the control group into the PLUM to see if that >> would solve the problem - but no dice. >> As you can see, there are three groups, so I should be able to have >> results reported for both HIGHERFATNIP and LOWERFATNIP, but I am getting >> the warning "This parameter is set to zero because it is redundant" on the >> second NIP variable. >> >> I did a crosstab to check the recoding, before I ran the PLUM , and the >> results were (I've pasted this as unformatted text and used tabs to >> correct the column layout if it shows funny when the message goes out to >> the list): >> DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP >> * DUMMY VARIABLE FOR LASAGNE LOWER FAT NIP Crosstabulation >> Count >> >> LOWERFATNIP >> >> .00 1.00 Total >> DUMMY VARIABLE FOR LASAGNE HIGHER FAT NIP .00 379 >> 390 769 >> >> 1.00 358 0 358 >> Total >> 737 390 1127 >> > > That table got all messed up in my reader. I think it was supposed to look > like this. > > .00 1.00 Total > .00 379 390 769 > 1.00 358 0 358 > Total 737 390 1127 > > > > Gosse, Michelle wrote: >> As you can see, I have successfully created coverage for the three groups, >> (1,0), (0,1), (0,0), from the two dummy variables, so I am at a complete >> loss to know why the two dummies don't work in my regression, with the >> (0,0) group being the reference category. I've decided I'm overlooking >> something completely obvious that a list reader will be able to point out >> to me. :) >> >> Cheers >> Michelle >> >> > PLUM lets you enter both covariates (i.e., continuous variables) and FACTORS > (categorical variables). So why not recode XGROUP to a single 3-level > categorical variable, and enter it as a factor? I.e., > > recode XGROUP (1 3 = 1) (2 4 = 2) (5 = 0) into xgroup2. > value labels xgroup2 > 0 'No NIP manipulation' > 1 'Higher fat NIP' > 2 'Lower fat NIP' > . > > Now enter variable XGROUP2 as a factor rather than entering dummy variables > as covariates. > > 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://spssx-discussion.1045642.n5.nabble.com/problems-with-recoding-Sec-UNCLASSIFIED-tp3280553p3280606.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 > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > > This footnote also confirms that this email message has been swept by > MIMEsweeper for the presence of computer viruses. > > www.clearswift.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 ===================== 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 |
Free forum by Nabble | Edit this page |