VARSTOCASES (Missing values in the initial dataset)

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

VARSTOCASES (Missing values in the initial dataset)

Oliver
This post was updated on .
Hi everyone,

I'm able to convert/restructure an initial dataset (wide) to a long/stacked
format using the SPSS syntax and everything works generally well. However,
when there are missing values for one of the variables in the initial
dataset, it seems like SPSS does not create any row (displaying a missing
value) in the new (i.e., stacked) dataset. The wave is entirely omitted from
the stacked dataset, which is problematic for subsequent analyses.

I was wondering whether it would be possible for SPSS (using the VARSTOCASE
syntax) to create empty/blank cells (i.e., SYSMIS) in the new dataset when
there are missing values in the initial dataset ? Here's the syntax that I'm
using:

VARSTOCASES
/MAKE fubpi FROM
fubpi_3months
fubpi_6months
fubpi_9months  
fubpi_12months
/INDEX = WAVE
/KEEP = ID.

Thanks in advance for your assistance.
O.



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

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

Re: VARSTOCASES (Missing values in the initial dataset)

Maguin, Eugene
Look at the Null=keep subcommand.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Oliver
Sent: Wednesday, March 03, 2021 1:29 PM
To: [hidden email]
Subject: VARSTOCASES (Missing values in the initial dataset)

Hi everyone,

I'm able to convert/restructure an initial dataset (wide) to a long/stacked format using the SPSS syntax and everything works generally well. However, when there are missing values for one of the variables in the initial dataset, it seems like SPSS does not create any row (displaying a missing
value) in the new (i.e., stacked) dataset. The wave is entirely omitted from the stacked dataset, which is problematic for subsequent analyses.

I was wondering whether it would be possible for SPSS (using the VARSTOCASE
syntax) to create empty/blank cells (i.e., SYSMIS) in the new dataset when there are missing values in the initial dataset ? Here's the syntax that I'm
using:

VARSTOCASES
/MAKE fubpi FROM
fubpi_3months
fubpi_6months
fubpi_9months
fubpi_12months
/INDEX = WAVE
/KEEP = ID.

Thanks in advance for your assistance.
O.



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

Re: VARSTOCASES (Missing values in the initial dataset)

Art Kendall
In reply to this post by Oliver
untested
try adding
/null = keep

recode fubpi (symis= -99999) (else=copy).
missing values fubpi (-99999).
add value labels fubpi -99999 ' some words to explain'.


or you could remove the missingness status,
missing values
fubpi_3months
fubpi_6months
fubpi_9months  
fubpi_12months ()
varstocases ...
missing values fubpi ...
value labels fubpi ...





-----
Art Kendall
Social Research Consultants
--
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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: VARSTOCASES (Missing values in the initial dataset)

Oliver
In reply to this post by Maguin, Eugene
Thanks for your suggestion, Eugene. It worked very well. Thanks !



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

Re: VARSTOCASES (Missing values in the initial dataset)

Oliver
In reply to this post by Art Kendall
Thanks for your suggestion, Art. I tried a couple of strategies and it worked
very well.



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