Subscribe Bookmark RSS Feed

Missing value codes not working in functions?

ron_horne

Super User

Joined:

Jun 23, 2011

Hi All,

I was wondering what is the best practice for finding the listwise missing observations in a set.

I was using the “Is Missing” function in order to indicate missing observations. Yet the result was somewhat disappointing since it does not take into account missing value codes. Apparently, the missing value codes only works with platforms.

For example:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// set a missing value

:weight[1] = .;

// set missing value codes

:weight << set property ("Missing Value Codes", -1);

// set a missing category observation

:weight[2] = -1;

// new column indicating missing values for weight

dt << new column ("Missing", formula(If(Is Missing(:weight), 1, 0)));

The new column indicates row 1 as missing while not so for row 2.

Thanks,

Ron

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

FWIW, in the JMP 13 build I have row 2 is indicated as missing by the formula column.

Regarding best practice in an earlier release, I guess that depends on the details. As you know you could write a JSL function to scan for the 'Missing Value Codes' property and respond accordingly. Perhaps this could also be put into a formula.

4 REPLIES
Solution

FWIW, in the JMP 13 build I have row 2 is indicated as missing by the formula column.

Regarding best practice in an earlier release, I guess that depends on the details. As you know you could write a JSL function to scan for the 'Missing Value Codes' property and respond accordingly. Perhaps this could also be put into a formula.

ron_horne

Super User

Joined:

Jun 23, 2011

thanks Ian@JMP

i am using JMP 11 so it didn't work for me. good to know it is already fixed in more recent versions.

i may consider just deleting the missing value codes since i do not distinguish between them and actual missing values.

ron

Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

What version of JMP are you using?

JMP 12 recognizes the missing value as defined by the Missing Value Codes property. The screen shot below is what I get after running your script.

11139_JMPScreenSnapz006.png

By the way, if you ever want to get the actual value you can use Col Stored Value().

-Jeff
ron_horne

Super User

Joined:

Jun 23, 2011

Thanks Jeff.