I have a numeric variable, BLANK, that is supposed to be missing if there is data for a particular TEST, otherwise BLANK should have a value why the test is not done. There are many times where BLANK is missing and there is no data for the test.
A tiny fragment of my data - there are 100s of variables
id BLANK ced abc def olp fft aaa_right fyu_right rst_right aaa_left fyu_left rst_left
1
2 2 6 2 4 1 2.855 1.615 1.91 2.085 2.195 4.11
3 7 2 3 2 1 3.87 3.075 2.035 1.265 8.425 2.28
4 2 0 0 2.76 2.535 3.13 1.65 2.31 3.515
5 1
6 1 0 1 1 1 2.05 2.99 1.655 3.425 1.97 5.015
7 1 3 2 3 1 1.265 0.825 2.43 6.015 7.945 3.29
8
9 3 7 2 6 0 1.65 2.165 6.305 3.075 2.9
;
I have 2 questions I would like appreciate help with -
1. How can I format missing for the BLANK variable - I tried the format below with no success
value tt
. =0:Test done
1 =1:Refusal
2 =2:Split exam
3 =3:xxxx
4 =4:Proxy
5 =5:Other;
2. To try and tease out why BLANK is missing and no test data, is it possible to combine BLANK with other variables (the test has questionnaire and physical test
components), both of which have a bunch of variables
missq =cmiss(of ced -- fft);
if missq=0 then QUEST_nd=0; else
if missq=(1:5) then QUEST_nd=1; else
if missq=5 then QUEST_nd=2; else;
if missp =cmiss(of aaa_right -- rst_left);
if missp =0 then PHY_nd=0; else
if missp=(1:5) then PHY_nd=1; else
if missp =6 then PHY_nd=2;
How do I combine QUEST_nd/PHY_nd and BLANK to get a variable and format that I use to find out if I have test data or not?
Thanks in advance,
Margaret