Sample Syntax Library
For those who want to take full advantage of SPSS's power!
Index
- Bootstrap and random numbers
- Block Designs
- Batch files
- Area under the curve (AUC)
- Charts and Tables
- Labels, Variable Names and Format
- Cluster Analysis
- Combinations, Permutations, Interactions
- Compute
- Unclassified
- Factor Analysis
- IGRAPH
- Concatenate/modify string variables
- Parse or Flag data
- Data Editor
- Data validation
- Dates and time
- Distributions
- Export & Import
- Flag or Select Cases
- Item Analysis
- Matching data files
- Matrix
- Multiple responses
- OMS (Output Management System)
- Outliers
- Random Sampling
- Read, Write or Create Data
- Regression, Repeated Measures
- Test if file or variable exists
- Self Adjusing Code
- Ranking, largest values, sorting, grouping
- Tests of Inequality
- Working with Many Files
- Meta Analysis
- Transform variable
- RFM Analysis
- Remove Characters, Duplicates or Variables
- Strings
- Working with missing values
- ROC curves
- Restructure File
- Sample Size and Power
- Survival Analysis
- Time Series
- Conjoint Analysis
- T-Test or Means or ANOVA
- Standard Data Files
- Tutorials
If you don't measure it… you can't improve it!
Library
Bootstrap and random numbers
- Bootstrap confidence interval for Cronbach alpha
- Bootstrap crosstab
- Bootstrap ordinary least square (OSL) estimators
- Bootstrap the mean and median
- Generate random triad numbers
- Generating multivariate hypergeometric random variables
- Generating multivariate normal variables with a specific covariance matrix (AnswerNet)
- Get random sample of various size then calculate statistics (Compare means of n samples of size s1 s2 ... sn ...)
- Get various random samples of same size calculate statistics (Compare means of n1 n2 ... nn samples of size s)
- OMS bootstrapping
- Sampling distribution of the correlation between 2 variables
- Generating multinominal random variables
- Bootstrap confidence interval for the variance of a variable
Block Designs
- Completely Randomized Designs (equal or unequal n per treatment)
- Random assignment of units to experimental treatments This is for Randomized Block Designs (Simple & Generalized) and Completely Randomized Designs (equal n per treatment)
Batch files
Area under the curve (AUC)
Charts and Tables
- Bar charts for school types by sex where percentages of each sex add up to 100 percent
- Blank bar for unselected category (from AnswerNet
- Blank bar for unselected category (generalized) (note however that to show empty categories in CTABLES is trivial. All that is required is to specify EMPTY=INCLUDE in the /Categories subcommand)
- Compare (superimpose) two histograms could also use a population pyramid (see IGRAPH section below for an example)
- Count outliers (show number of outliers in a boxplot)
- Do bar charts excluding categories with small number of cases
- Do many histograms with the same axis boundaries (this demonstrates how the use of the macro Dograph)
- Graph cumulative percentage retired at attained age by categorical variable
- Graph cumulative percent on X axis
- Graph survey question
- Histogram with percent on y axis instead of numbers
- Identify your own data in the chart
- Identify your own data in the chart version2 This is a generalization of the above syntax.
- Print current date and time in chart title (Same technique can be used with Tables)
- Print current date in chart title
- Print histogram or bar chart depending on data (A good macro example)
- Print school names as part of graph titles
- Show mean values in line graph
- Show 2 categories on same histogram
- ZIPF law and graph
- Construct a table "manually" in the data editor (A good example of data restructuration)
- Find population frequency when multiple response with long strings
- Construct a table "manually" example no 2
- List variables infrequency table by order of medians
- Put 4 variables in the same frequency table
- Print mean plus minus standard deviation in Table
- Print actual namegroup and id in heading of each listing
- Show empty category in tables (from AnswerNet) Note: This is trivial with CTABLE)
- Sort categories by decreasing count but with Others as last one
- Show number of valid cases in table footnote
- Get statistics for grouping of variables
- Table where list of variables is generated by macro (Illustrates the !IF ...!ELSE... !IFEND macro command)
- Using Macros and CTABLE
- Do not display value labels in pivot tables
- Show empty categories in tables (second method)
- Hide Cell With Less Than N Persons
Labels, Variable Names and Format
- Add (or replace) a character at the beginning of each var names
- Add'_99' at the end of every variable names
- Apply lab1 as value label to var1 by syntax
- Assign same label to many variables
- Assign value labels to a vector
- Assign variable and value labels of a given variable to other variables
- Convert variable format
- Automatically rename variables
- Autovariable renaming or copying
- Create dummy variables (also called indicator or binary variables)
- Create dummy variables (AnswerNet)
- Create new variable equal to number of occurrences of var1
- Define a global variable (this is a useful programming technique)
- Define variable label by Macro
- Delete all variable labels of a given sav file
- Delete List Of Variable Names But Some May Not Exist
- Delete variables with all values equal to zero
- Delete or reorder variable names (data fields)
- Delete many variable labels
- Match label file with data file
- Print variable labels and value labels in FREQ Tables
- Read ASCII data variable name, value and value labels
- Recode variables var1 becomes varx etc
- Remove underscores from all variable names (can be adapted to remove any other character)
- Rename variables
- Rename all variables t2abc becomes t1abc etc
- Rename var in file1 to names in file2
- Reverse scale and value labels
- Round and change format of all numeric variables
- Show 0.45 instead of.45
- Sort variable names by alphabetical order (AnswerNet)
- Sort variables by name in data file (sent by A. Paul Beaulne)
- Sort Variables By Alphabetical Order
- Write value labels to ASCII file (AnswerNet)
- Group data and define corresponding value labels
Cluster Analysis
- Cluster analysis using similarity proximity (count) data as input
- Save centers of Hierarchical cluster analysis as initial value of K-means
Combinations, Permutations, Interactions
- All combinations of 3numbers out of n (see "Find all Combinations .." below for a generalization)
- Find all combinations of 1 up to n items out of m items (highpower stuff!)
- Find all combinations of n items out of m items (high power stuff!)
- All combinations of 3letters out of n (with replacement)
- Calculate interaction terms between 2 categorical variables (within a regression context)
- Create a new variable for each combination of 2 variables
- Find all permutations of integers 1 to n Maximum value of n is 7.Combined with recode, this can find permutations of any strings or numbers.
- Generate orders for block of trials
- Get all possible crossproducts of pairs of variables (contains a fair amount of comments)
Compute
- Find the cubic root
- Reverse the digits on an integer
- Create a new variable equal to mean of an other variable
- Compute average of m variables where m is a variable in the data file
- Compute distances between 2 points on earth (with thanks to Simon Freidin)
- Compute percentage of patients having each fracture category
- Automatically compute sample weights to approximate population
- Box-Cox Transformation To transform var1 using each of the 31 values of lambda that are between -2 and 1 (increments of 0.1).
- Compute z = x / max( y) where max( y) is over all cases
- Count number of distinct values across 400 variables
- Weight data based on 2 or more vars
- Find LAG(var1, var2) (variable lag)
Unclassified
- Calculate average percent score
- Calculations on dynamic columns
- Fill in the gaps (information in file has been left blank when it equals the information in the preceding case, this syntax fills the gap)
- Fill in the gaps (within ID)
- Interaction in factorial designs when dependent variable is not normal Thanks to Marta Garcia-Granero for this code.
- Stop or resume generating outputs in the output window
- P-value adjustments for Multiple Comparisons
Factor Analysis
IGRAPH
- Clustered bars with percent based on total in cluster
- Example of surface plot
- Graphing an arbitrary function
- Graph showing interaction in multiple regression
- How to speed up IGRAPH (A similar approach could be used for other type of graphs)
- Produce long IGRAPHs
- Population pyramids
- Separate box plot graph for each category value (syntax can be adapted to any other type of graph)
Concatenate/modify string variables
- Apparent problem with concat Newbies should take a look at this example.
- Combine a string variable and a numeric variable
- Concatenate content of cases with same id
- Concatenate numbers
- Concatenate 22 variables
- Convert first letter of each word to uppercase (Thanks to A. Paul Beaulne for sending me this code)
- Create an id using name and dob
- Normalize string (delete spaces at beginning, remove period at end, capitalize all letters)
- Normalise alpha (Capitalise the first letter of each word, use lower case for the other letters)
- Remove initial from name
- Remove period from string (can be modified to remove any other characters)
- Reorganize names (place family name at the beginning of the sting)
- Transform ascii codes into characters
- Concatenate All Values Into Constant
Parse or Flag data
- Extract bits from an integer
- Extract portion of string (string contains first and last name, want first 3 letters of last name)
- Extract portion of string starting with a digit
- Extract Zip code from address field
- Extract two numbers from as tring (e.g. string "120/90" becomes numbers 120 and 90)
- Flag if last characters of string are 'Esq'
- Parse a string into one letter per variable
- Parse comma separated numbers
- Parse data separated by slashes
- Parse domain name from email addresses
- Parse comma separated strings then autorecode results
- Parsing a variable which has embedded line feeds (thanks to Bjarte Aagnes)
- Remove letter at end of string and convert remaining string to a number
- Splita string variable into plaintiff and defendant portions
- String variable contains items separated by a slash (there is a variable number of items from one case to the next)
- Weed out letters in a string and create a number with remaining digits
Data Editor
Data validation
Dates and time
- Add 60 days to a date then find end of that month
- Add leading zeros to a string date
- Ages are in nnH nnD nnM and nnA
- Break down number of days in hospital by calendar month
- Calculate age
- Calculate time differences to milliseconds
- Calculate mean date and standard deviation in days
- Calculate nb of days within the eligibility period
- Calculate number of minutes between 2 timestamps (crossover midnight)
- Calculate number of months between 2 dates
- Calculate waiting time when time is coded in hh min
- Compute number of weekdays between 2 dates
- Compute number of weekdays excluding public holidays
- Compute sleep time
- Convert string formatted as hhmmss into numeric time variable (thanks to Jim Marks)
- Convert string 1997-08-22 into a date variable
- Convert basis
- Convert string"04Apri03" to a date variable
- Convert string 01jan1992 to a date variable
- Convert string into date and time variables
- Convert strings into numbers (variable contains age in either of the following format "7Y" for 7 years, "3m" for 3 months, "28D" for28 days. Need to convert these to years.)
- Date plus 3 months
- Extract time portion from string variable containing date and time
- From AM PM to military time
- Importing from Excel (convert days into dates)
- Keep time portion of date when creating Tab delimited file
- Make variable equal to current date
- Print date and time before a procedure
- Number of consecutive 30 minutes of hypoxia
- Print current date as part of graph title
- Print day name along with date
- Read time stamp
- Save data file with current date as part of name
- Select a range of dates
- Time an SPSS procedure
- Convert string to date and select cases which fall during the weekend
- Dates appear as asterisk on chart (solution)
- Convert Datetime String to Datetime Format Variable
Distributions
- Add variables containing lower and upper CI for mean
- Bayes estimates for proportions and their CI with thanks to Evgeny Ivashkevich (this also calculates Confidence Intervals for a category not present in the sample)
- Calculate Chi-square significance given q and df
- Calculate 95 percent confidence interval for the median (thanks to Marta Garcia-Granero)
- Calculate McNemar Chi-Square test (thanks to Marta)
- Hodges-Lehmann Confidence Interval for Median difference (thanks to Marta Garcia-Granero)
- Exact Confidence Limits for a Binomial Parameter
- Goodness of Fit Test for Poisson Distribution
- Inferences and Confidence Intervals for Proportions
- Fitting Models with Overdispersion
- Tests of General Linear Hypotheses
- Normalization of raw scores
Export & Import
- Export all tables in word
- Export data and value labels to excel
- Export content of data editor to a specified sheet of an existing Excel workbook
- Export from SPSS to ACCESS
- Export from SPSS to ACCESS (method2)
- Export more than 256 vars to Excel
- Export some SPSS vars to many sheets of Excel workbook
- Import from ACCESS or Lotus Notes (no DSN needed: this is very handy. Thanks to Tom Dierickx)
- Writing back an SPSS 10 file to an ODBC database (from AnswerNet)
Flag or Select Cases
- Exclude "outliers" from analysis (where outliers are defined as cases outside Mean +/- 2 SD)
- Flag cases where a given string variable contains a given word
- Flag cases where any of a list of variables have same value
- Flag cases meeting a certain condition as well as preceding and following case for the same person
- Flag cases where salary is in top 95 percentile
- Flag first and last dates (within each ID)
- Keep only duplicate cases
- Print frequency table of the n most (less) frequent items
- Select cases where same letter appears twice in string
- Select patients where drug1 was given before drug2
- Sophisticated search in string variable (data were scanned, portion of strings include letters (eg B) instead of numbers (eg 8); this syntax flags the errors)
Item Analysis
- Syntax for item analysis
- Syntax For Item Analysis V6 This is a much improved version of the above. It is fully automated and has been developed and tested using SPSS 15.
Matching data files
- Create data file if double entries are equals (where entries done by 2 different persons in 2 different files)
- Double entry check
- Find errors in 2 files (data entered twice)
- Match one to many where key has 4 variables
- Match 2 files using between-dates criteria
- Merge 2 data files based on many to many relationship
- Compare 2 Data Files with thanks to Simon Freidin
Matrix
- Example that reads, writes, creates and transforms matrices
- Export variance-covariance matrix to ASCII file
- Export variance-covariance matrix to sav file
- Find inverse of a matrix
- Macro autogenerate initial data file with thanks to Fernando Cartwright
- Matrix out in
- Read matrix data
- Reliability analysis when input is a correlation matrix
- Transform a matrix into a vector
- Cohen's Kappa
Multiple responses
- Count unique occurrences of a multiple response
- Create dichotomous variables from multiple responses which are not in order
- Multiple responses are encoded as comma separated letters
OMS (Output Management System)
Outliers
- Exclude cases over mean plus 2 times sd
- Replace outliers by average of cases with same characteristics
- Replace outliers by mean plus/minus n times sd
- Winsorize a mean
Random Sampling
- Complex sampling without replacement
- Draw without replacement (random permutation of numbers)
- Generate random phone numbers
- Find random pairs of cases for T-test
- Find random pairs of cases with same characteristics
- Flag n random cases within each subgroups
- Get 2independent samples meeting given criteria
- Get 2 random samples same sex age education
- Get n independent random samples of size m from same file
- Get random sample of x% of each stratum
- Get random sample of N cases from each stratum
- List of random cases id10 per line
- Match cases on basis of propensity scores (this involves matching cases which do not match but are close to each other)
- Proportional sampling without replace
- Proportional random sampling
- Proportional sampling without replacement
- Random sample n males and n females
- Random samples with same age sex education
- Random split a file in two files
- Randomize a variable n times and keep each randomization
- Scramble social insurance numbers
- Select 2 cases from each group
- Select random samples of each group
- Split files in 2 random portions
- Split a file into 10random groups of equal size
- Systematic fixed sampling
- Getting repeated sampling from same file
Read, Write or Create Data
- Adding new cases using syntax
- Add variable equal to function of an existing Var
- Copy some variables from each record type 1 to add a new record of type 0
- A few simple examples of INPUT PROGRAM (a short tutorial)
- Create consecutive records at the end of the file
- Create constants for each non missing date
- Define new variables in empty data set
- Define varx to vary
- Duplicate cases n times where n is variable (see also Expand Crosstab Data below)
- Expand crosstab data into original data file (disaggregate data)
- Expand data x and y times eg from a case where age=20, males=5 and females=6 want to create 5 cases with age 20 and sex=1 and 6 cases where age=20and sex=0
- Fill the gaps when Aggregate has empty categories Syntax creates cases to fill the gaps
- Generate random dates
- INPUT program (to generate a random data file)
- Insert missing cases (within id)
- Insert missing dates(within id)
- Printing date time in output
- Read ASCII (logical case is made up of 5 rows of 10 cases)
- Read ASCII file using FILE TYPE
- Read ASCII file using INPUT PROGRAM
- Read ASCII file with a forward slash delimiter
- Read a variable number of records per case
- Example of data list
- Example of INPUT program
- Read data inline File Type MIXED Records
- Read ASCII file with comma or dash delimited data
- Read ASCII file with comma separated data (within quotes)
- Read ASCII file with fixed and free data
- Read ASCII file with FIXED Data
- Read ASCII with comma and dot separated decimals
- Read text file where n columns are to be ignored (n is a variable which varies by file)
- Skip first 6 Records
- Skip one line of data
- Read ASCII file with REPEATING data
- Read complex file
- Read data files that has no carriage returns (from AnswerNet) (data is just one long stream, with no separation between records or fields, and no carriage returns)
- Read data produced by CGI script
- Read data where each case has 4 numeric records and a variable number of string records (this is illustrates the use of the REREAD command)
- Write comma or tab delimited file
- Write frequency percentages to data file
- Write missing values as a dot
- Write special ASCII file
- Writing value labels instead of values
- Read comma delimited fields with commas inside quoted strings
- Read comments between the lines of data
- Read data list free with consecutive commas
Regression, Repeated Measures
- Add casewise regression coefficients to data file
- Calculate predicted values (unianova)
- Compare coefficients generated by various groups
- Compare regression coefficients (thanks to A. Paul Beaulne for sending me this code)
- Conditional logistic regression
- Do All-Subsets regressions
- Do all univariate linear and logistic regressions (thanks to Marta Garcia-Granero)
- Logistic regression by macro
- Regression calculates table of predicted values
- Regression in a loop
- Regression when holding out k cases
- Regression with correlation matrix as input
- Regression with normed weight
- Repeated-measures macro
- Chow test
- White's test: calculate the statistics and its significance (thanks to Marta Garcia-Granero)
- White's standard errors full OLS and White's SE output (thanks to Gwilym Pryce)
- Testing individual regressors in logistic regression
- Non-linear regression (NLR) with variance of residuals as the loss function (this is not trivial)
- Piecewise regression (also known as "spline regression" and "piecewise polynomials")
- Breusch-Pagan & Koenker test (thanks to Marta Garcia-Granero)
Test if file or variable exists
Self Adjusing Code
- Automated data transform from tall to wide
- Choice of include file depends on data
- End of macro DOLOOP comes from data
- Execute selective portions of syntax
- From 2 files to 1 cases per id
- Syntax varies based on name of data file
Ranking, largest values, sorting, grouping
- Aggregating with the median
- Calculate cumulative sum of Var1
- Calculate mode
- Calculate number of distinct values within Case
- Calculate z-scores across variables
- Code using percentiles of a subset
- Compute percentiles for one variable and by one or more grouping variables (with thanks to Tom Dierickx). Note that the percentiles end up in the data editor, not in the Output window.
- Compute percentages based on values of first case
- For each case, find the earliest case in the preceding 7 days (relatively complex stuff)
- Find5 largest values within case
- Find last 2 scores on repeated measure
- Identify variables having minimum value (with thanks to Maciek Lobinski)
- New variable equals cumulative totals by id
- Number consecutively cases with the same id
- Random order
- Rank equal intervals between minimum and maximum
- Rank on basis of percentage of good
- Rank variable names in alpha order
- Rank within cases
- Replace missing by median values within the case
- Round up to the higher point 5
- Saving confidence interval for mean (within groups)
- Score a test with an answer key (thanks to A. Paul Beaulne)
- Sorting values within cases (using the bubble sort algorithm)
- Syntax group data in bands
- Create n tiles based on percent ranges rather than on count
- Identify 3 Highest Values within Each Case
- Sorting Within Cases
- Finding All Modal Values for Subgroups of Cases
Tests of Inequality
- Many tests of inequality v5 (this chart template is used by the syntax)
- Dissimilarity Index
Working with Many Files
- Combine 2 data files many to many
- Combine any number of consecutively named sav files 50 at a time
- Combine many data files with same variables
- Combine many xls files into a single sav file
- Data list is outside the main syntax (illustrates how a syntax file can be modified by syntax)
- Delete cases contained in file2 from the main data file
- Erase files
- Example 1 using UPDATE command
- Example 2 using UPDATE command
- Get mean from 3different files
- Keep only cases from Master file whose id are in second file
- Macro to delete a list of files
- Many folders and many files
- Run a macro on every file whose name is in a sav file
- Run syntax on files whose names are derived from a data file
- Show number of differences, if any, between 2 files (to check double entry of data).
- Split big files into separate categories (create a different sav file for each value of a numeric categorical variable)
- Split big files into separate categories string var create adifferent sav file for each value of a string categorical variable)
- Split file with kn cases into k files of n cases each
- Unusual file merge
- Include 200syntax files by macro
- Process All .xls Files in a Given Folder (script)
Meta Analysis
- Meta Analysis: fixed and random effects models (With thanks to Valentim R. Alferes) This SPSS syntax does a meta-analysis on a set of studies comparing two independent means. It produces results for both fixed and random effects models, using Cohen's d statistics. The user has a total of 10 modes for entering summary data.
- Meta-SPSS An exhaustive set of syntax files written by Marta Garcia-Granero as well as sample data files and supporting documents.
Transform variable
- Constrain a variable to a given interval (syntax is first given, then it is generalized using 2 macros)
- Convert numbers to string with leading zeros
- Create variable equal to z-scores of an existing variable
- Extract fist or first 2 digits of a large integer
- Global autorecode A nice problem: Autorecode many string variables where the recode formula (eg a=1,b=2, etc) is the same for all variables even though none of the variables have all possible values
- Replace confidential information eg a ssn by a new(known) id
- Replace values higher than n by the mean of the other values
- Automatically rescale variable to be between 0 and 1
- Examples of Converting Strings To Numbers
- Replace a Letter to 9999 and Convert To Number
- Transform Alphanumeric Codes to Numeric
- Calculate utility of EuroQol 5D questionnaire
RFM Analysis
- RFM-analysis on aggregated data (comments are in Russian)
Remove Characters, Duplicates or Variables
- Delete cases with offset cases
- Delete double entries (thanks to Maciek Lobinski) For instance if, for a given case, var1 equals var2, the syntax replaces var2 by sysmis.
- Find duplicates
- Remove double quotes
- Remove duplicate records
- Remove unused variables from many files
- Replace character In string
- Replace consecutive spaces in string by a single space
- Save duplicates in a separate file
Strings
- Soundex Phonetic Comparison
- Convert string to numeric variable
- Convert numbers to strings
- Convert string'250 million' into a number (or '16 billion' etc)
- Change all strings in data file to lower case
- Are All Words Present? This tests whether all words passed to the macro are present within a given string variable
- Are All Words Present? - to Dichotomy Vars Similar to above but creates one dichotomy variables for each target word
Working with missing values
- Replace missing by random value taken from cases with valid value (see Hot Deck above for a more general solution)
- Conditionally replacing missing by mean
- Missing values and DO IF
- Replace missing with mean
- Replace missing by median values within each case
- Replace missing by mean of category
- Replace "Blanks" by value from preceding case
- Recode certain dates as missing
- Mean substitution in additive scale
- List variable names with missing values and identify main elements of cases
- Hot Deck substitution of missing values of X within STRATUM (thanks to Theo van der Weegen)
- Identifying the3 types of missing values
- Conditionally replacing missing by mean example 2
- Delete variables that have only missing values
ROC curves
Restructure File
- Allocate dummy variables to 24 hours
- Automated data transform from tall to wide
- Automated restructure from long to wide with thanks to Hillel Vardi.
- Collapse empty variables within a case
- Deduplicate cases while keeping all the information (a cute little problem)
- Each variable occupies 5 rows of 10 columns (another nice little problem)
- Find beginning and end of continuous periods
- From many to one example1
- From many to one example2
- From many to one with alpha data
- From many to one with specific order of new variables
- From one to Many simple
- From one to many with indicator variable
- Restructure data fileexample1
- Restructure data fileexample2
- Restructure data fileexample3
- Restructure data fileexample4
- Restructure from tall to wide (general solution) (non-trivial macro code...)
- Restructure time periods to a time matrix
- Restructure to calculate Kappa
- Transpose(FLIP) string variables
- VarsToCases and CasesToVars
- Automated Data Restructure (thanks to Kevin Hynes) This example maintains a grouping factor while restructuring data from tall to wide
- Use Former Variable Names As Value Labels
Sample Size and Power
- Power analysis examples With thanks to Bruce Weaver
- Sample size for means With thanks to Marta Garcia-Granero. This is a collection of several short macros that perform sample size calculations for confidence interval estimation and one sample / two samples tests for means (this last one with equal or unequal sample sizes).
- Sample size for proportions With thanks to Marta Garcia-Granero. A collection of macros that perform sample size calculation for the estimation of one proportion and one or two samples hypothesis testing, as well as the calculation of the power of a test.
- Sample size for correlation hypothesis testing thanks to Marta!
Survival Analysis
Time Series
Conjoint Analysis
- Textbook Example Analysis of Plan 2 by 2 (comments are in Russian)
T-Test or Means or ANOVA
- ANOVA A*B (thanks to Valentim Alferes) This does an A*B Factorial ANOVA and calculates variance components, measures of association, measures of effect size and observed power. Works with raw data or published summary statistics.
- T-Tests and Likert scales
- Compare mean of each hospital with mean of all other hospitals (nice little macro)
- ANOVA Tables using 4 methods (thanks to Valentim Alferes) method1:for Ns, Means and SDs; method 2 for Ns, Means and Variances; method3 for Ns, Means and MS Error; method 4 for Means, Df num, Df den and MSError.
- Standardized effects size (Cohen Glass and Hedges's d) (with thanks to Marta) The effects size and their standard errors are added to the data file.
- ONEWAY with summarydataI2 Performs several ONEWAY ANOVAS plus several Homogeneity of variances tests on summary data. Any number of variables can beanalysed. Thanks to Marta Garcia-Granero.
- ONEWAY with summarydata1 Performs a ONEWAY ANOVA plus several Homogeneity of Variances tests on summary data. Thanks to Marta Garcia-Granero
- Multiple Mann-Whitney tests (using a macro to have a procedure inside a LOOP)
- Hotelling's T**2 & Profile Analysis (thanks to Richard MacLennan)
- Do a T-Test with only the Means, SD and Ns (uses ANOVA)
- DoT-Test with only means, SD and Ns (thanks to Marta Garcia-Granero)this includes Hartley's F test, the standard T-test and Welch test, asymptotic and non asymptotic 95% CI are calculated.
- Cochran Hartley Critical Values This gives the tabulated critical values at 5% and 1% for both HOV tests. Thanks to Marta Garcia-Granero
- T Test: Measures of Effect Size and Nonoverlap, and Observed Power (thanks to Valentim Alferes) User can either analyse raw data or reproduce the SPSS T-Test standard output using summary statistics in published articles