cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
ron_horne
Super User (Alumni)

Missing value codes not working in functions?

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

Re: Missing value codes not working in functions?

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.

View solution in original post

4 REPLIES 4
ian_jmp
Staff

Re: Missing value codes not working in functions?

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 (Alumni)

Re: Missing value codes not working in functions?

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

Re: Missing value codes not working in functions?

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 (Alumni)

Re: Missing value codes not working in functions?

Thanks Jeff.