Page 1 of 1

Skipped items to special values

Posted: July 29th, 2018, 11:23 am
by htuser
Dear all,
I would like write a global function to set 99 for all skipped numeric items and "N/A" for skipped alpha items.

Greg mentioned, long ago an undocumented global function On_Focus() does can i use it?
Does exist also a Post_Proc function following the same purpose of the On_Focus() function ?

Please any help!
Thanks in advance,

Re: Skipped items to special values

Posted: July 30th, 2018, 2:12 pm
by josh
There is no global post_proc function, only the global on_focus. I don't see how on_focus would help you with this.

Trying to do this in your data entry application is going to be problematic. What happens if you go back and change an earlier value and the item is no longer skipped but is now set to 99?

I would do this after data collection using a batch application or outside CSPro altogether. Unfortunately to do it in batch would take a lot of coding since you would have to deal with each variable individually. It might be easier to do it in whatever package you are exporting to.

Re: Skipped items to special values

Posted: July 30th, 2018, 7:53 pm
by htuser
Thank you Josh for your support.
Trying to do this in your data entry application is going to be problematic. What happens if you go back and change an earlier value and the item is no longer skipped but is now set to 99?
Since i would code it in form Preproc/Postproc, this will be refreshed before and after data entry or onstop(). A more advanced Highlighted Function would help more.
I would do this after data collection using a batch application or outside CSPro altogether. Unfortunately to do it in batch would take a lot of coding since you would have to deal with each variable individually. It might be easier to do it in whatever package you are exporting to.
It's a time consuming way to do that on exporting statistical package such as STATA or SPSS, except for sql database supporting dynamic sql. Years ago, i find a way to do it with dynamic sql procedures, with a limitation, since it become difficult to do difference between non response and skipped values (notappl) . But, for large database, it take more than one day to run. So doing it at questionnaire level will facilitate greatly. Hopefully, the future powerful sqlquery could allow us to run advanced dynamic sql and procedures on csdb, this combined with a more advanced Highlighted Function!

Best Regards,