About Me

My photo
Over nine years of research experience in social science and public health research, who specializes large scale survey design and analysis, and data quality in various forms and tools of research work with Quantitative as well as Qualitative techniques and then last five years I have developed data entry and tabulation package in CSPro for various large scale surveys in India as well outside India. Presently I am working as Consultant State Data Manager in UNICEF Chhattisgarh (Through PDCSL).

Tuesday, April 5, 2011

Using execsystem to Retrieve a Computer's Username

visit counter for blogspot

An example of when this could be useful is if you want to create a PFF file with the data file named after the login ID of the keyer who has logged onto that machine.

PROC GLOBAL


alpha (20) tempFilename = "tempusername.txt";

alpha (300) str;

FILE inputFile;

alpha (50) username;


PROC EXAMPLE

execsystem(maketext('cmd /c "set username > %s"',strip(tempFilename)),wait);

setfile(inputFile,strip(tempFilename));

fileread(inputFile,str);

close(inputFile);

filedelete(strip(tempFilename));

// str looks like this: USERNAME=pedro

username = str[poschar("=",str) + 1];

errmsg("Computer username is %s",strip(username));

Creating a Sample Data File

visit counter for blogspot

If you want to create a simple sample data file (perhaps to test tabulations or edits instead of using the complete data file), you can create a small batch program to select cases to output. For instance, this program selects every twentieth case to generate a 5% sample:



PROC GLOBAL

numeric samplePercentage = 5;

numeric caseCount = 0;

PROC CREATESAMPLE_QUEST

preproc

inc(caseCount);

if caseCount = ( 100 / samplePercentage ) then

caseCount = 0;
else

skip case;
endif;

Alternatively, you can use the random function to generate a sample file that does not choose every nth case. Remember to call the seed function before using the random function.

if random(1,100 / samplePercentage) <> 1 then

skip case;

endif;

Randomizing the Order of Questions

In CSPro there is no simple way to change the order that questions are asked in a data entry application, but it can be done with some logic. The following code is an example of how one can use logic to randomize the order that questions are asked. The code randomizes the order in which five questions, the field names of which are listed in the fieldNames array, are asked.

PROC GLOBAL

numeric numQuestions = 5;

array questionOrder(5);

array alpha fieldNames(5) = "QUESTION1","QUESTION2","QUESTION3","QUESTION4","QUESTION5";

alpha fieldName;

function gotoQuestion(questionNumber)

fieldName = fieldNames(questionNumber);

move to fieldName;

end;

function nextQuestion()
fieldName = getsymbol();

// see where we are in the list

numeric i;
do i = 1 while fieldNames(i) <> fieldName

enddo;

// now i points to what question number we're on

// now find out where in the order it is

numeric j;
do j = 1 while questionOrder(j) <> i
enddo;
if j = numQuestions then

move to ANOTHER_QUESTION; // we are done with the rotating questions
else

gotoQuestion(questionOrder(j + 1));

endif;
end;

function startQuestions()

numeric i,j;

do i = 1 while i <= numQuestions

questionOrder(i) = random(1,numQuestions);

// see if this question has already been inserted

do j = ( i - 1 ) while j > 0 by (-1)

if questionOrder(j) = questionOrder(i) then // the new value is a repeat

j = 0; // this will terminate the inner do loop

i = i - 1; // this will force the outer do loop to repeat for this value

endif;

enddo;

enddo;
gotoQuestion(questionOrder(1));
end;

PROC CHANGEQUESTIONORDER_FF

preproc

seed(systime());

PROC CHANGEQUESTIONORDER_ID

startQuestions();

PROC QUESTION1

nextQuestion();

PROC QUESTION2

nextQuestion();

PROC QUESTION3
nextQuestion();

PROC QUESTION4
nextQuestion();

PROC QUESTION5

nextQuestion();

Friday, March 11, 2011

CSPro Mobile Data Sheet


Website for the Tool:
Main Contact:
Guillermo Rojas Main
Contact Email :
Problem or Need:
With CS Pro Mobile, data can be captured directly into a computer-readable form rather than using paper questionnaires.
Brief Description:
CS Pro Mobile is a census and survey processing system for capturing household and other survey data directly on PDAs.
Tool Category:
App resides and runs on a server
Key Features :
  • Handles complex surveys on PDAs
  • Multiple language support
Main Services:
Voting, Data Collection, Surveys, and Polling
Tool Maturity:
Currently deployed
Current Version:
4
Platforms:
Windows Mobile
Program/Code Language:
Pocket PC and Microsoft Smartphone
Organizations Using the Tool:
  • US Census Bureau
Number of Current End Users:
Under 100
Number of current beneficiaries:
Under 100
Handsets/devices supported:
Dell Axim, HP 2795, HP iPaq 210-212, other Pocket PCs and Smartphones
Languages supported:
English
Is the Tool's Code Available?:
No
Is an API available to interface with your tool?:
No
Countries:
visit counter for blogspot

Friday, November 19, 2010

Managing data using CSPro

visit counter for blogspot

What is CSPro?


It is an acronym for Census and Survey Processing System
The software was jointly developed by the U.S. Census Bureau, Macro International and Serpro SA.
Development of the software was funded by the U.S. Agency for International Development.

Features of CSPro


It combines the features of an Integrated Microcomputer Processing System (IMPS) and the Integrated System for Survey Analysis (ISSA) in a Windows environment.

It doesn’t run under other operating systems such as Linux or Mac OS.

Who needs CSPro?


Individuals and institutions that collect, analyze, and publish census and survey data.

What is it used for?


It is a software package used to process data from censuses and surveys, both large or small.

Used for entry, editing, tabulation and dissemination of census and survey data.

What are CSPro’s capabilities?


The software is capable of doing the following;

Process census and survey data

Enter, modify and verify data

Manipulate data files

Tabulate data

Create thematic maps

Use and share external files

Examine data files

Interactive editing

Examine results of editing

Capron Modules

CSPro comes in the following modules:

Data entry applications

Batch edit applications

Cross Tabulation applications

Tools

Monday, August 23, 2010

Differences between CSPro and CSProX

1.Auto-complete in alpha fields. Optional use of the predefined prefix in other variables (ex., cities in a State; State being the prefix)


2.Assisted coding combining the auto-complete algorithm with a key word search (applicable to any open variable such as occupation or cause of death, etc.

3.Powerful function to check consistency between two or more variables automatically generating buttons with each of the possible alternatives to correct the conflict;by selecting one of the buttons the cursor (flow) is positioned in the corresponding field; return to the place of origin requires a single click of the mouse.

4.Multilanguage dictionary allowing the dynamic change of one language to the other during the interview.

5.Compilation of the applications error messages and the message file, verifying the consistency between one parameter and the other

6.Functions to manage the positioning of the screen in the pocket PCs (landscape or portrait)

7.Functions to read the coordinates given directly by the GPS, being stored in the fields passed as functions parameters.

8.Functions to read directly from an Excel spread sheet

9.Arrays and matrixes accept the respective occurrences labels

10.Classification (ranking) of a list with automatic exclusion of the selected options

11.Encrypt and Decrypt texts through the use of the 256-bit AES algorithm

What is CSProX?

It is a powerful platform that generates applications for:


• Smart data capture (local or remote) covering

 CAPI (Computer Assisted Personal Interview)

 CATI (Computer Assisted Telephone Interview)

 CASI (Computer Assisted Self-answered Interview)

 Smart Data Entry

 CAPI Interviews or smart data capture designed by a pocket pc running under Windows Mobile 5.0

• Edition, Manipulation, Data Creation and/or Recoding and Export to SPSS, STATA, SAS and comma (,) delimited data in batch processes.

• Production of variables crossing in order to analyze the data.

Web site http://www.serpro.com/