Missing values deletion

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

Missing values deletion

Jay.zone
Hi all,

I am new to SPSS and I am running out of time to complete my thesis, the
issue is the deletion of missing values, my dataset is composed of a list of
companies (S&P500) from which a variable (Lobbying contribution amount)
displays 935 missing values on a total of 2525.

Every company is displayed 5 times for 5 different years, and I want to
automatically delete the companies that have the variable missing 3 times or
more, does someone knows how to do that, please?

I attached the SPSS file if you want some more insight, it would really help
I am close to the deadline and cannot figure it out.

Best regards

BACKSAVESPSSTHESISDATA.sav
<http://spssx-discussion.1045642.n5.nabble.com/file/t341872/BACKSAVESPSSTHESISDATA.sav>  



--
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: Missing values deletion

Kevin longfield
Here is one way to do it....

Compute LobbyMiss = 0.
if (Missing(FY0LobbyingContributionAmount) = 1) LobbyMiss = LobbyMiss + 1.
if (Missing(FY0LobbyingContributionAmount) = 1) LobbyMiss = LobbyMiss + 1.
if (Missing(FY1LobbyingContributionAmount) = 1) LobbyMiss = LobbyMiss + 1.
if (Missing(FY2LobbyingContributionAmount) = 1) LobbyMiss = LobbyMiss + 1.
if (Missing(FY3LobbyingContributionAmount) = 1) LobbyMiss = LobbyMiss + 1.
if (Missing(FY4LobbyingContributionAmount) = 1) LobbyMiss = LobbyMiss + 1.
Execute.

FILTER OFF.
USE ALL.
SELECT IF (LobbyMiss < 3).
EXECUTE.

Best,
Kevin.

On Wed, Dec 23, 2020 at 12:15 PM Jay.zone <[hidden email]> wrote:
Hi all,

I am new to SPSS and I am running out of time to complete my thesis, the
issue is the deletion of missing values, my dataset is composed of a list of
companies (S&P500) from which a variable (Lobbying contribution amount)
displays 935 missing values on a total of 2525.

Every company is displayed 5 times for 5 different years, and I want to
automatically delete the companies that have the variable missing 3 times or
more, does someone knows how to do that, please?

I attached the SPSS file if you want some more insight, it would really help
I am close to the deadline and cannot figure it out.

Best regards

BACKSAVESPSSTHESISDATA.sav
<http://spssx-discussion.1045642.n5.nabble.com/file/t341872/BACKSAVESPSSTHESISDATA.sav



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


--
Kevin Longfield
(586) 419 - 5838
Vice President - Data Operations
www.phoenixmi.com
CONFIDENTIALITY NOTICE: This email message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient or a person responsible for delivering this message to an intended recipient, please contact the sender by reply email and destroy all copies of the original message.  

--
This electronic message, including its attachments (if any), is CONFIDENTIAL and may contain PROPRIETARY or LEGALLY PRIVILEGED information. If you are not the intended recipient, you are hereby notified that any use, disclosure, copying, or distribution of this message, its attachments, or any of the information included therein, is unauthorized and strictly prohibited. If you have received this message in error, please immediately notify the sender by reply e-mail and permanently delete this message and its attachments, along with any copies thereof.

===================== 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: Missing values deletion

Jay.zone
Thanks a lot for your prompt reply Kevin!

Really sorry about the file I uploaded the wrong one (I should have
verified).

 Would you mind taking a look at this one it is the good one.

oneoffive.sav
<http://spssx-discussion.1045642.n5.nabble.com/file/t341872/oneoffive.sav>  



--
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: Missing values deletion

Jon Peck
Here is a simple solution.  Use AGGREGATE to count the missing values.  I assume that CompanyComonName serves as a unique distinct identifier for each company

AGGREGATE
  /OUTFILE=* MODE=ADDVARIABLES
  /BREAK=CompanyCommonName
  /LobbyingContributionAmount_numiss=NUMISS(LobbyingContributionAmount).
SELECT IF LobbyingContributionAmount_numiss < 3.

However, I hope you are considering the implication of deleting these cases on your ability to generalize your results.

On Wed, Dec 23, 2020 at 10:33 AM Jay.zone <[hidden email]> wrote:
Thanks a lot for your prompt reply Kevin!

Really sorry about the file I uploaded the wrong one (I should have
verified).

 Would you mind taking a look at this one it is the good one.

oneoffive.sav
<http://spssx-discussion.1045642.n5.nabble.com/file/t341872/oneoffive.sav



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


--
Jon K Peck
[hidden email]

===================== 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: Missing values deletion

Rich Ulrich
As to Jon's comment,
> However, I hope you are considering the implication of deleting these cases on your ability to generalize your results.

... before you delete the cases according to the number of
Missing's, you can obtain some means, etc., to compare the
values for Companies with 0, 1, 2, 3, or 4 missing values.

--
Rich Ulrich

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