Recoding variables after multiple imputation

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

Recoding variables after multiple imputation

Lucy Markson

Can anyone help  with the following problem?

 

I have 11 continuous or categorical variables that I have recoded into binary risk/no risk form to make a total cumulative risk index (so 1 score for each participant). Some of the individual items have missing data. I have imputed the raw variables using MI and I want to then recode them into binary form and compute the index, making use of the imputed data. However, when I run the recode into different variable function in SPSS it doesn’t recode the imputed data. I have ensured the values in the imputed data match those in the recode syntax. I don’t want to impute the binary variables as this seems to not be making the most of the data.

 

I know the imputation has been successful as I have used the compute function to sum score other scales which I do not need to recode.

 

Many thanks

 

Lucy Markson

PhD candidate

Department of Psychology

University of Cambridge

 

[hidden email]

01223 767369

 

===================== 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: Recoding variables after multiple imputation

David Marso
Administrator
Perhaps you should post your syntax and a before/after snapshot of the data if you expect advise?
Lucy Markson wrote
Can anyone help  with the following problem?

 

I have 11 continuous or categorical variables that I have recoded into
binary risk/no risk form to make a total cumulative risk index (so 1 score
for each participant). Some of the individual items have missing data. I
have imputed the raw variables using MI and I want to then recode them into
binary form and compute the index, making use of the imputed data. However,
when I run the recode into different variable function in SPSS it doesn't
recode the imputed data. I have ensured the values in the imputed data match
those in the recode syntax. I don't want to impute the binary variables as
this seems to not be making the most of the data.

 

I know the imputation has been successful as I have used the compute
function to sum score other scales which I do not need to recode.

 

Many thanks

 

Lucy Markson

PhD candidate

Department of Psychology

University of Cambridge

 

 <mailto:[hidden email]> [hidden email]

01223 767369

 


=====================
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
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Recoding variables after multiple imputation

Maguin, Eugene
In reply to this post by Lucy Markson

In addition to David’s reply, I’d urge you to look at the frequency  outputs for all the variables with imputed values. You may find that some of the imputed values have decimal values. For example a 1, 2 ,3 variable has a value of 2.43. Why? Imputation is a regression operation and decimal values are a sure result (and out-of-range values as well—4.2). I don’t use spss’ imputation module so I am not familiar with it. However, it may have been fixed so that you can set ranges or round to integer.

Gene Maguin

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Lucy Markson
Sent: Friday, October 17, 2014 7:28 AM
To: [hidden email]
Subject: Recoding variables after multiple imputation

 

Can anyone help  with the following problem?

 

I have 11 continuous or categorical variables that I have recoded into binary risk/no risk form to make a total cumulative risk index (so 1 score for each participant). Some of the individual items have missing data. I have imputed the raw variables using MI and I want to then recode them into binary form and compute the index, making use of the imputed data. However, when I run the recode into different variable function in SPSS it doesn’t recode the imputed data. I have ensured the values in the imputed data match those in the recode syntax. I don’t want to impute the binary variables as this seems to not be making the most of the data.

 

I know the imputation has been successful as I have used the compute function to sum score other scales which I do not need to recode.

 

Many thanks

 

Lucy Markson

PhD candidate

Department of Psychology

University of Cambridge

 

[hidden email]

01223 767369

 

===================== 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: Recoding variables after multiple imputation

Art Kendall
In reply to this post by Lucy Markson
A preliminary question is whether there are structural or other non-random reasons for data to be missing.

What are your categorical variables, what values may they legitimately have?  Have you eliminated all system missing values by creating appropriate user missing values?
Do you have different user missing values?

Another preliminary question is if you tried CATPCA to find a way to compute your summative score variable(s)?

Any advice I or others give would have to be caveat-ed on the basis that we do not know what constructs the variables represent, how the  data were gathered, what a "case" is etc.


Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Recoding variables after multiple imputation

David Marso
Administrator
In reply to this post by Maguin, Eugene
Indeed, my speculation precisely.  I tend to NOT provide specific answers to questions which lack specificity, but consider the following:  I suspect OP used the first rookie approach to recode rather than the range version.
DATA LIST FREE/x.
BEGIN DATA
1 1.001 2.3 3
END DATA.
FORMATS x (F1.0).
RECODE x (1=2)(2=3)(3=4) INTO oopsX.
RECODE x (0 THRU 1=2)(1 THRU 2=3)(2 THRU 3=4) INTO goodx.
LIST.

 result
 
x    oopsX    goodx
 
1     2.00     2.00
1      .       3.00
2      .       4.00
3     4.00     4.00
 


Maguin, Eugene wrote
In addition to David's reply, I'd urge you to look at the frequency  outputs for all the variables with imputed values. You may find that some of the imputed values have decimal values. For example a 1, 2 ,3 variable has a value of 2.43. Why? Imputation is a regression operation and decimal values are a sure result (and out-of-range values as well-4.2). I don't use spss' imputation module so I am not familiar with it. However, it may have been fixed so that you can set ranges or round to integer.
Gene Maguin

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Lucy Markson
Sent: Friday, October 17, 2014 7:28 AM
To: [hidden email]
Subject: Recoding variables after multiple imputation

Can anyone help  with the following problem?

I have 11 continuous or categorical variables that I have recoded into binary risk/no risk form to make a total cumulative risk index (so 1 score for each participant). Some of the individual items have missing data. I have imputed the raw variables using MI and I want to then recode them into binary form and compute the index, making use of the imputed data. However, when I run the recode into different variable function in SPSS it doesn't recode the imputed data. I have ensured the values in the imputed data match those in the recode syntax. I don't want to impute the binary variables as this seems to not be making the most of the data.

I know the imputation has been successful as I have used the compute function to sum score other scales which I do not need to recode.

Many thanks

Lucy Markson
PhD candidate
Department of Psychology
University of Cambridge

[hidden email]<mailto:[hidden email]>
01223 767369

===================== To manage your subscription to SPSSX-L, send a message to [hidden email]<mailto:[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
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Recoding variables after multiple imputation

lorax
In reply to this post by Lucy Markson
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Recoding variables after multiple imputation

David Marso
Administrator

Not an entirely robust approach advocated here!
What happens to 1.49999 or 2.49999 etc using your suggestion?

The correct way to do this is realize RECODE assigns according to the 'first found' rule and feed it the values in reverse order.

RECODE var (2.5 THRU HI=7)(1.5 THRU 2.5=6)(.5 THRU 1.5=3)(LO THRU .5=1) INTO newvar.

lorax wrote
Hi, having gone around and around with this same problem for a few weeks, I'd like to clarify some things so other newbies to multiple imputation don't have to struggle with this.

Multiple imputation invariably results in decimals, not integers.  If your data set is not set up to see decimals (i.e. your field limits preclude that), when you finish your imputation, it will look like SPSS has imputed whole numbers.  However, be not fooled!  There are decimals in that imputed dataset, which you will see if you change your field width to include them.

Thus, in order to get SPSS to recode this imputed data into new integer variables, you need to use a range that includes the hidden decimals...not just the viewable integers.  So, instead of using the GUI to recode 1=3, 2=6, you need to ask it to recode a range of values, e.g. 0.5 to 1.4999 = 3, 1.5 to 2.4999 =6.  

I hope this helps!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Recoding variables after multiple imputation

Bruce Weaver
Administrator
And just to further reinforce David's point about the 'first found' rule, note that this...

RECODE var (2.5 THRU HI=7)(1.5 THRU HI=6)(.5 THRU HI=3)(LO THRU HI=1) INTO newvar.

...gives the same result as this:

RECODE var (2.5 THRU HI=7)(1.5 THRU 2.5=6)(.5 THRU 1.5=3)(LO THRU .5=1) INTO newvar.

;-)


David Marso wrote
Not an entirely robust approach advocated here!
What happens to 1.49999 or 2.49999 etc using your suggestion?

The correct way to do this is realize RECODE assigns according to the 'first found' rule and feed it the values in reverse order.

RECODE var (2.5 THRU HI=7)(1.5 THRU 2.5=6)(.5 THRU 1.5=3)(LO THRU .5=1) INTO newvar.

lorax wrote
Hi, having gone around and around with this same problem for a few weeks, I'd like to clarify some things so other newbies to multiple imputation don't have to struggle with this.

Multiple imputation invariably results in decimals, not integers.  If your data set is not set up to see decimals (i.e. your field limits preclude that), when you finish your imputation, it will look like SPSS has imputed whole numbers.  However, be not fooled!  There are decimals in that imputed dataset, which you will see if you change your field width to include them.

Thus, in order to get SPSS to recode this imputed data into new integer variables, you need to use a range that includes the hidden decimals...not just the viewable integers.  So, instead of using the GUI to recode 1=3, 2=6, you need to ask it to recode a range of values, e.g. 0.5 to 1.4999 = 3, 1.5 to 2.4999 =6.  

I hope this helps!
--
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: Recoding variables after multiple imputation

rufus.benaud11
In reply to this post by lorax
Hi I agree with the solution of providing a range of 0 thru 1 for 1 instead of recoding as fixed values such as 0=0 after multiple imputation but can you provide an appropriate reference or scientific evidence so that I can cite it in my paper

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Recoding variables after multiple imputation

David Marso
Administrator
This post was updated on .
You require 'appropriate reference or scientific evidence' for simply applying common sense?
Go read more books.  Except you are responding to 'lorax' who provided a sloppy incorrect  posting.
Doh!

rufus.benaud11 wrote
Hi I agree with the solution of providing a range of 0 thru 1 for 1 instead of recoding as fixed values such as 0=0 after multiple imputation but can you provide an appropriate reference or scientific evidence so that I can cite it in my paper

Thanks.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Recoding variables after multiple imputation

Bruce Weaver
Administrator
In reply to this post by rufus.benaud11
http://www.ibm.com/support/knowledgecenter/SSLVMB_20.0.0/com.ibm.spss.statistics.help/syn_recode_operations.htm

Specifically:

• Value specifications are scanned left to right.
• A value is recoded only once per RECODE command.


rufus.benaud11 wrote
Hi I agree with the solution of providing a range of 0 thru 1 for 1 instead of recoding as fixed values such as 0=0 after multiple imputation but can you provide an appropriate reference or scientific evidence so that I can cite it in my paper

Thanks.
--
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/).