O'Reilly logo

IBM SPSS Modeler Cookbook by Scott Mutchler, Tom Khabaza, Meta S. Brown, Dean Abbott, Keith McCormick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Imputing missing values randomly from uniform or normal distributions

Filling missing values with a random number is often preferable to filling with a constant, such as the mean or median. If the distribution of a variable matches or nearly matches a known distribution, such as a uniform or normal distribution, one can use the functions in Modeler to generate random numbers, given the parameters needed to generate the random numbers.

In this recipe we will impute missing values with random distributions: uniform and normal.

Getting ready

This recipe uses the following files:

  1. Datafile: cup98lrn_variable cleaning random impute recipe.sav
  2. Stream file: Recipe - impute random with known random distribution.str

How to do it...

To impute missing values randomly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required