One of my questions has 17 variables. So as to dichotomize these 17 variables (1,0) I have created new variable (define) but have difficulty to assign the value. the EPIinfo is user friendly as it has separate box to write the "if", "then", and "else" questions. however, when I tried few variables, it works but when I use all of them at once it doesn't. it reads as follow “type of problem: 3075 – expression too complex in query expression”.
For your information, here is the example how i used
DEFINE TRY NUMERIC
IF A=1 OR B=1 OR C=1 OR D=1 OR E=1 OR F=1 OR G=1 OR H=1 OR I=1 OR J=1 OR K=1 OR L=1 OR M=1 OR N=1 OR O=1 OR P=1 OR Q=1 THEN TRY=1 ELSE TRY=0
Indeed Epi Info sometimes finds some analysis commands too complex to be run at once. Try the following:
DEFINE TRY1
IF A=1 OR B=1 OR C=1 OR D=1 OR E=1 OR F=1
THEN TRY1=1 ELSE TRY1=0 END
DEFINE TRY2
IF G=1 OR H=1 OR I=1 OR J=1 OR K=1 OR L=1
THEN TRY2=1 ELSE TRY2=0 END
DEFINE TRY3
IF M=1 OR N=1 OR O=1 OR P=1 OR OR Q=1
THEN TRY3=1 ELSE TRY3=0 END
DEFINE TRY
IF TRY1=1 OR TRY2=1 OR TRY3=1
THEN TRY=1 ELSE TRY=0 END
But be careful because if you have missing data, these will be included in the 'else' and in the denominator. Hence you may need to add the following if any missing value needs to be excluded:
IF A=(.) OR B=(.) OR C=(.) OR D=(.) OR E=(.) OR F=(.)
THEN TRY1=(.) END
IF G=(.) OR H=(.) OR I=(.) OR J=(.) OR K=(.) OR L=(.)
THEN TRY2=(.) END
IF M=(.) OR N=(.) OR O=(.) OR P=(.) OR OR Q=(.)
THEN TRY3=(.) END
IF TRY1=(.) OR TRY2=(.) OR TRY3=(.)
THEN TRY=(.) END
I suspect that the above will be still be too complex for Epi Info so what you need to do is divide the above commands into steps. After running Step 1 for example (let's say from defining TRY 1 to TRY 2), then you write (export) the data table under a new name in Epi info format in the mdb file you are working on. Then, you read (import) the data table back into Epi Info and you continue with Step 2 and defining the additional variables (TRY3 and TRY) for example etc. Basically, you cannot have too many complex 'temporary' variables in one data table at one time and you need to save these complex variables as you go along if you don't want it to crash. Hope this will help! Good luck.
Anonymous
Answered:
11 years agoYou are probably using Epi Info 3.5.3? Complex expressions cause problems in the Epi Info 3.. series. Try this:
*Define and Assign a variable to add up the 17 variables
DEFINE TR
ASSIGN TR = A + B + C + D + E + F + G + H + I + J + K + L + M + N + O + P + Q
*If TR has a value of 1 or larger, TRY is 1 - else is 0
DEFINE TRY
IF TR >= 1 THEN
TRY = 1
ELSE
TRY = 0
END
Kevin Sullivan
Answered:
11 years agoDear Kevin,
Thank you very much. actually it is 3.5.4 version (July 30, 2012). Base on your advice it works. that means i did two steps; first create variable TR then assign and finally create second variable TRY. In the second step the same issue was seen but when i tried again it works. OMG, i spent the whole day on this issue. i should have been post the question in the morning.
Thanks
Anonymous
Answered:
11 years agoDear Anonymous 2206 ,
thanks for your advice. you remind me to forward one question regarding handling missed data. at the end of the day, i want have two answers for some questions (yes/no or 1,0). However, if there are few missed data, can i considered them as No or 0?
Thanks
Anonymous
Answered:
11 years agoThe way you handle missing data all depends on the indicator you are calculating. For example, if you are calculating exclusive breastfeeding and if one of the answers is missing for a child for the liquids taken the previous day, it is much better to exclude that child from the EBF analysis. Hence in that example, you wouldn't want to assign a 'No' or '0' for the missing answer of that child because otherwise that child would be included in the analysis which may bias results.
Kevin Sullivan's PGM is obviously much simpler and better than the one I proposed! So if you use that PGM and want to exclude any record (child) with a missing value for these variables when calculating the indicator, you would need to add the following (it would be great if this can be confirmed by Kevin! Thanks!):
IF A=(.) OR B=(.) OR C=(.) OR D=(.) OR E=(.) OR (F)=(.) OR (G)=(.) OR (H)=(.) OR (I)=(.) OR (J)=(.) OR (K)=(.) OR (L)=(.) OR (M)=(.) OR (N)=(.) OR (O)=(.) OR (P)=(.) OR (Q)=(.)
THEN TRY=(.) END
Anonymous
Answered:
11 years agoJust to add that the latest PGM for handling missed responses should also be done step by step.Given that you have A to O,you could have A to E then F to J etc.
I hope its clear.
Blessing Mureverwi
Answered:
11 years agoqxmaxR http://www.LnAJ7K8QSpfMO2wQ8gO.com
Barneyxcq
Answered:
6 years ago