Thursday, 13 December 2012

Missing Values

You may have used the command MISSING VALUES in a file to declare a certain value(s) 
as missing, for example:

MISSING VALUES V1 (8,9)
 
Here the values 8,9 will be considered missing in the data and will not be included 
in computations. 
 
 But, sometimes you want those values back. One way would be to close the file and 
reload but that is cumbersome. The short way to do that is:
 
MISSING VALUES V1 ().

The above command will remove any previously declared values from missing category to the data category.

Thursday, 16 August 2012

Data Cleaning (draft entry)

My next post will be about Data Cleaning. I am not the expert on this but I know few things. One simple way  to do this is to compare data entered by 2 different people. The command in SPSS is called

UPDATE FILE

Here is an example from UCLA site:

update file = "D:\person1.sav"
/in = flag1
/file = "D:\person2.sav"
/by all.
exe.
 
More valuable information in this pdf. 
http://www.ats.ucla.edu/stat/sas/library/nesug99/ss123.pdf
 

Need to update this blog!! 

Wednesday, 15 August 2012

Effect Size


"Statistical significance only tells the researcher how likely it is that an observed finding could have occurred by chance. It does not say anything about magnitude of the effect observed. Effect size is a name given to a group of statistics that measure the magnitude of a treatment effect. In many cases, effect size is a better measure of research outcomes than the significance level. This is because with large samples, one can observe statistically significant group differences even when only a tiny effect is present. Unlike significance tests, effect size indices are independent of sample size." source: http://www.umdnj.edu/idsweb/shared/effect_size.htm

Effect size calculator

another calculator

another calculator

Tuesday, 14 August 2012

Data/Software/information sources (free)

This is a loose compilation of sources of meta data/journals/software etc. related to population and health, concerning international issues in general but in particular the USA and Pakistan. I think this can be potentially very useful for graduate students of these two countries.

Asian Barometer "The Asian Barometer (ABS) is an applied research program on public opinion on political values, democracy, and governance around the region. The regional network encompasses research teams from 13 East Asian political systems (Japan, Mongolia, South Koreas, Taiwan, Hong Kong, China, the Philippines, Thailand, Vietnam, Cambodia, Singapore, Indonesia, and Malaysia), and 5 South Asian countries (India, Pakistan, Bangladesh, Sri Lanka, and Nepal)."


Databases/software (free) for social sciences and public health:
http://en.citizendium.org/wiki/Free_statistical_software#_note-idams

Current Population Survey
(CPS) Datasets for download (free; SAS format only)


Department of Health and Human Services
(HHS) Data Finder


The General Social Survey (GSS) contains a standard 'core' of demographic, behavioral, and attitudinal questions, plus topics of special interest. Many of the core questions have remained unchanged since 1972 to facilitate time-trend studies as well as replication of earlier findings. The GSS takes the pulse of America, and is a unique and valuable resource. It has tracked the opinions of Americans over the last four decades.

Download data (SPSS format) from here.

Univ of Michigan Database of data files
http://www.icpsr.umich.edu/icpsrweb/ICPSR/themes/index.jsp


Princeton university Dataset sources for Pakistan

The NICHD Data and Specimen Hub (DASH) is a centralized resource that allows researchers to share and access de-identified data from studies funded by NICHD. DASH also serves as a portal for requesting biospecimens from selected DASH studies.
 
 
The Data Online for Population, Health and Nutrition (DOLPHN) system is an online statistical data resource containing selected current and historical country-level demographic and health indicator data. The DOLPHN system is designed to provide users with quick and easy access to frequently used statistics and can be helpful as both a reference and analytical tool.

Stanford University Data sets (free) http://data.stanford.edu/

Interesting link for PhD students
http://www2.hud.ac.uk/research/gradcentre/links.php

UNICEF/WHO
sanitation and water


Open Source Publishing


Jstor Data
http://dfr.jstor.org/

Google and Wiley Interscience



Google public data visualization​The Google Public Data Explorer makes large datasets easy to explore, visualize and communicate.

Harvard data
related to public health
The purpose of this website is to provide public health professionals, researchers, policy makers and students with a comprehensive catalog of Maternal and Child Health (MCH) data sets, interactive tools and other resources.

CDC Wonder
Wide-ranging Online Data for Epidemiologic Research


CDC newborn feeding practices datasets
http://www.cdc.gov/ifps/data/index.htm

CDC datasets on breastfeeding practices:
http://www.cdc.gov/breastfeeding/data/index.htm

The Cochare Library (great for public health publications)
http://www.thecochranelibrary.com/view/0/index.html?gclid=CPWu8trNy6ACFdNA6wodqn_u0A

JHUCCP research tool database
http://new.jhuccp.org/research/researchDB/


Pew Research Center Databases
You can download the data collected by Pew Research Center from here for their various national and international surveys (the religion project includes Pakistan).


PRB Data Finder


Research Gate

Professional network for scientists.


RAND data


A UH student analysis on different meta-data sources:
http://www2.hawaii.edu/~jacso/extra/

UN population data


US Census, international population statistics


World Bank Datasets


World Bank Data


World Values Survey

http://www.ipums.org/ Integrated Public Use Microdata Series from Minnesota University

National Bureau of Economic Research data from diff. sources related to American Demographics and Economics

Wednesday, 25 July 2012

To ADD (or SUM) in SPSS

Well, in SPSS you can add a series of variables in two different ways. First is you add two variables i.e., boys and girls and get the total children. Or, you want to create an Index based on a series of scores but want to ignore the respondent who missed out on any of the variables in the series (i.e., there is a MISSING value in 1 or more variables for them).
 
compute t_child=sons+daughters.
OR
compute t_child=sum (sons, daughters).

"The difference between the two procedures above is that in the first procedure, the case on total would be missing if any one of the four variables had missing values on a case; in the second procedure, the total would be computed while ignoring missing values on the four variables." No cases will be dropped due to a missing value in any of the variables. "Essentially SPSS treats the missing value as ZERO." 

In the SUM argument the variables must be separated by comma but if there are multiple variables you can use the option of TO to provide a range. For example, if you want to construct a happiness index based on 12 indicators/variables hap1 thru hap12, you can use the following syntax:

compute happiness=sum (hap1 thru hap12).

Source: Indiana University IT Services and others.

 
Another point to note is that  "the SUM() function is evidently flexible enough to respect more complex statements like SUM(Var1+Var2, Var3-Var4, Var5*Var6).  Hence, do not use the addition symbol when you use SUM unless that is part of the list of arguments. Source: SPSSX Discussion group

While talking about the flexibility and greatness of SUM, there is another neat function that you can take note of. So, in case you want to limit the CASE DROPPING based on any MISSING values, you can provide a number to TELL the computer to keep a CASE/RESPONDENT if at least X # of variables are answered. So, 

COMPUTE V3 = SUM.2(V1, V2). EXECUTE .

"The .2 appended to the end of the SUM function in the above example can be any integer. Use it to indicate the minimum number of valid cases necessary to perform a given calculation." Source: Indiana University IT Services

Also remember Listwise and pairwise deletion a concept SPSS uses while using addition function. According to a discussion group they are defined as:

Listwise - then if the respondent has any missing value for any variable then the respondent is omitted from all your data analysis.

Pairwise - not as harsh as listwise in that the respondent is dropped only on analyses involving variables that have missing values.


Also check the IBM site and Psychwiki for more on list and pairwise deletion.

Tuesday, 24 July 2012

Factor Analysis in short (not my writing)

What is Factor Analysis?*
"Factor analysis is a form of exploratory multivariate analysis that is used to either reduce the number of variables in a model or to detect relationships among variables. All variables involved in the factor analysis need to be interval and are assumed to be normally distributed."

SPSS syntax:

factor
/variables read write math science socst
/criteria factors(2)
/extraction pc
/rotation varimax
/plot eigen.

Here is the syntax in SPSS from ANU course notes:

FACTOR
/VARIABLES q34_1 to q34_12
/MISSING LISTWISE /ANALYSIS q34_1 to q34_12
/PRINT INITIAL KMO REPR EXTRACTION ROTATION
/CRITERIA MINEIGEN(1) ITERATE(25)
/FORMAT SORT
/EXTRACTION PAF
/CRITERIA ITERATE(25)
/ROTATION VARIMAX
/METHOD=CORRELATION .

Crate SCALE using FA

FACTOR
/VARIABLES q34_1 to q34_12
/MISSING LISTWISE /ANALYSIS q34_1 to q34_12
/PRINT INITIAL KMO REPR EXTRACTION ROTATION
/CRITERIA MINEIGEN(1) ITERATE(25)
/FORMAT SORT
/EXTRACTION PAF
/PLOT EIGEN
/CRITERIA ITERATE(25)
/ROTATION VARIMAX
/SAVE REG (2)
/METHOD=CORRELATION .



*Introduction to SAS. UCLA: Academic Technology Services, Statistical Consulting Group. from http://www.ats.ucla.edu/stat/sas/notes2/ (accessed November 24, 2007).