# linearity of independent variables to log odds

9 messages
Open this post in threaded view
|

## linearity of independent variables to log odds

 Hi, I keep getting an error message >Warning # 602 >The argument for the natural log function is less than or equal to zero. The >result has been set to the system-missing value. when I run this syntax: COMPUTE sexshun_LN=LN(sexshun) EXECUTE. How can I fix this? (Sexshun is a binary variable) thanks for any help -- Sent from: http://spssx-discussion.1045642.n5.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
Open this post in threaded view
|

## Re: linearity of independent variables to log odds

 Don't ever transform a binary variable.   - Unless it is a linear transformation, like adding 1 (0,1 becomes 1,2) or deciding to center it (0,1 becomes -1, 1); or multiplying by a constant (probably, to change the scale of the regression coefficient). The message tells you that you can't take the log of zero. This time, the incidental error saves you from the embarrassment of trying to explain to someone else WHY you took the log of a binary variable. -- Rich Ulrich From: SPSSX(r) Discussion <[hidden email]> on behalf of mllx4eg5 <[hidden email]> Sent: Sunday, September 15, 2019 3:37 PM To: [hidden email] <[hidden email]> Subject: linearity of independent variables to log odds   Hi, I keep getting an error message >Warning # 602 >The argument for the natural log function is less than or equal to zero. The >result has been set to the system-missing value. when I run this syntax: COMPUTE sexshun_LN=LN(sexshun) EXECUTE. How can I fix this? (Sexshun is a binary variable) thanks for any help -- Sent from: http://spssx-discussion.1045642.n5.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
Open this post in threaded view
|

## Re: linearity of independent variables to log odds

 Thankyou, So all I need to do is recode the varible to (1,2) instead of (0,1)? -- Sent from: http://spssx-discussion.1045642.n5.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
Open this post in threaded view
|

## Re: linearity of independent variables to log odds

Open this post in threaded view
|

## Re: linearity of independent variables to log odds

Open this post in threaded view
|

## Re: linearity of independent variables to log odds

 In reply to this post by mllx4eg5 Mind the missing dot at the end of COMPUTE.Mario GieselMunich, Germany Am Montag, 16. September 2019, 01:10:27 MESZ hat mllx4eg5 <[hidden email]> Folgendes geschrieben: Hi, I keep getting an error message >Warning # 602 >The argument for the natural log function is less than or equal to zero. The >result has been set to the system-missing value.when I run this syntax: COMPUTE sexshun_LN=LN(sexshun)EXECUTE. How can I fix this? (Sexshun is a binary variable) thanks for any help --=====================To manage your subscription to SPSSX-L, send a message to[hidden email] (not to SPSSX-L), with no body text except thecommand. To leave the list, send the commandSIGNOFF SPSSX-LFor a list of commands to manage subscriptions, send the commandINFO 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
Open this post in threaded view
|