Date: Thu, 14 May 2009 16:49:31 +0200
Reply-To: Marta García-Granero <mgarciagranero@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Marta García-Granero <mgarciagranero@gmail.com>
Subject: Re: empty variable
In-Reply-To: <29384.81436.qm@web46005.mail.sp1.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Gyorgy Bea wrote:
> Is there any possibility to check wether a variable is empty through
> all cases? I want to detect those variables, that are totally empty,
> have no cases.
>
What do you plan to do later with those variables? If you just want to
know if there are empty variables, use a simple procedure like
DESCRIPTIVES. The empty variables will have N=0. If you want to locate
them to get rid of them, then you will need something more complex, like
a macro.
Locating them is easy:
TEMPORARY.
SET TVars Names.
DESCRIPTIVES
VARIABLES=ALL
/STATISTICS=MIN MAX
/SORT=NAME.
You will get a list of every variable in your dataset, sorted by name,
with their valid N. This is a good starting point for a macro that uses
OMS to capture the list, select those variables with n=0 and then drop
them from the dataset. Ask the list for help if you want to go that way
and don't know how.
HTH,
Marta García-Granero
--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/
=====================
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