BookmarkSubscribe
Choose Language Hide Translation Bar
profjmb
Community Trekker

Count of missing variables across multiple variables?

I have a scale that is the sum of 20 items. I would like to know, for those missing the total score because at least one item is missing, exactly how many items are missing. Conceptually, it would be the count of X1-X20 for values of . (missing). Is this possible?

0 Kudos
1 REPLY 1
txnelson
Super User

Re: Count of missing variables across multiple variables?

If you are running JMP 13 or 14, and your X1-X20 columns are columns 1 thru 20, this code would work

names default to here(1);
dt=current data table();
x=nmissing(dt[index(1,nrows(dt)),index(1,20)])
Jim
0 Kudos