Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IBM spss Modeler, how to delete rows containing missing values

All my data is in a .txt file, Field delimiters are Comma and Newline. So I used the "Var. File" component as Source component.

I am trying to figure out how to delete the rows containing null values, and then get the output for further processing.

like image 805
belas Avatar asked Sep 24 '15 14:09

belas


People also ask

How to discard Records in IBM SPSS Modeler?

To discard any records in IBM SPSS Modeler, you would use the "Select" node from the "Record Ops" palette. To discard any record that contains a missing value for a given field, you can set the "Mode" to "Discard" and use the condition: @NULL ( field1 ) if the name of the field is "field1".

How can I impute missing values using SPSS Modeler?

The Generate menu of the Data Audit node allows you to remove fields, remove cases, or impute missing values, explained as follows: If we were going to impute values, we would then click Missing Values SuperNode. In this way you can impute missing values using SPSS Modeler, and it makes your analysis a lot more easier.

How to delete rows with missing values in a table?

You can delete the rows with missing values or use some technique to replace them, but if you have 2k records, maybe it woul be better to just delete those missing rows. 'variable' = '$null$' and select the option discard in the dialog box.

How do I remove fields with missing values from my data?

Alternatively, you can generate a Select or Filter node to remove fields or records with missing values. For example, you can filter any fields with a quality percentage below a specified threshold. Figure 6. Generating a Filter node Outliers and extreme values can be handled in a similar manner.


1 Answers

To discard any records in IBM SPSS Modeler, you would use the "Select" node from the "Record Ops" palette.

To discard any record that contains a missing value for a given field, you can set the "Mode" to "Discard" and use the condition: @NULL( field1 ) if the name of the field is "field1".

If you have a list of fields and require all of them to have non-missing values, you can use a condition such as: count_nulls( [ field1 field2 field3 ] ) > 0 if the fields are "field1", "field2", and "field3".

If you wish to discard all records where any field contains a missing value, you can use the condition: count_nulls( @FIELDS_MATCHING( "*" ) ) > 0.

If you are looking to discard the records that have only missing values, you can use the condition: count_non_nulls( @FIELDS_MATCHING( "*" ) ) = 0.

like image 168
Kenneth Avatar answered Sep 19 '22 16:09

Kenneth