/*************************************************/ /* Written by: */ /* */ /* G. John Geldhof */ /* Graduate Student, Department of Psychology */ /* University of Kansas */ /* */ /* For: */ /* */ /* HTTP://QUANT.KU.EDU */ /* */ /*************************************************/ /* This file contains example code for calculating omega based on McDonald (1985, 1999; see Zinbarg, Revelle, Yovel, & Li, 2005). A synopsis of the instructions is as follows: - load your data into SAS (example data is provided below the example code) - Use PROC CALIS to obtain factor loadings; indicators should load onto a single factor that has its latent variance fixed to 1.0 - Create a scale score for the items you are calculating omega for (i.e., the items' mean for each subject - Calculate omega by hand using: Omega = ((sum(lambdas))^2)/var(scale score) */ /****************************************************************************************************************/ /****************************************************************************************************************/ /*First obtain factor loadings, labeled as the parameter estimates for l1, l2, and l3 in this model. They will be in the Estimation Results > Manifest Variable Equations section of the output*/ proc calis cov data = omega method=ml outest = outcfa; lineqs /* Format: {Variable Name} = {parameter label for output} {factor label} + {label for residual variance}*/ pa1_c1 = l1 f1 + e1, pa2_c1 = l2 f1 + e2, pa3_c1 = l3 f1 + e3; std f1=1, /*latent variance*/ e1 - e3 = ee:; /*specifies parameters as errors; change to include all of the errors you specified above*/ run; /*Example Output: PA1_C1 = 0.7704*f1 + 1.0000 e1 Std Err 0.0624 l1 t Value 12.3452 PA2_C1 = 0.9073*f1 + 1.0000 e2 Std Err 0.0738 l2 t Value 12.2952 PA3_C1 = 0.7339*f1 + 1.0000 e3 Std Err 0.0618 l3 t Value 11.8681 Variances of Exogenous Variables Standard Variable Parameter Estimate Error t Value f1 1.00000 e1 ee1 0.06584 0.01659 3.97 e2 ee2 0.09549 0.02337 4.09 e3 ee3 0.08728 0.01766 4.94 so, l1 = .7704; l2 = .9073; and l3 = .7339 */ /****************************************************************************************************************/ /****************************************************************************************************************/ /*Create a scale score*/ data omega;set omega; scale = sum (of pa1_c1 -- pa3_c1); /*Change to reflect all of the variables you are calculating omega for*/ run; /*obtain the variance of the scale score*/ proc means data=omega var; var scale; run; /*Example Output: The MEANS Procedure Analysis Variable : scale Variance ------------ 6.0642061 ------------ */ /****************************************************************************************************************/ /****************************************************************************************************************/ * Omega = ((sum(lambdas))^2)/var(scale) * Here, Omega = (.7704 + .9073 + .7339)^2/6.0642061 = approx .96; *The same procedure for variables na1_c1 na2_c1 and na3_c1 results in omega = approx .93 /****************************************************************************************************************/ /* Example Data */ /****************************************************************************************************************/ data omega; input PA1_C1 PA2_C1 PA3_C1 NA1_C1 NA2_C1 NA3_C1 PA1_C2 PA2_C2 PA3_C2 NA1_C2 NA2_C2 NA3_C2; cards; 3 2 2.5 3.5 2.5 3.5 3.2 2.3 2.1 1.5 1.4 1.8 2 2 2.5 1.5 1 1.5 2 1.5 2 1.5 1 1.5 3 3 3 2 2 2 3 3 3 1.5 1 1 3 3 3 1.5 1 1 3 3 3 1.5 1.5 1 3.5 3.5 3.5 1.5 1 1.5 3 3 3 1 1 1 3 2.5 3.5 1.5 1 1 3 3.5 3 1.5 1 1 2 1.5 2 2 3 2 2 2 3 2 2.5 2 4 4 4 2 1 1.5 4 4 4 2 1.5 2 2.5 2.5 2.5 2.5 2 1 2 1 2.5 2.6 2.8 1.3 2.5 3 3 3.5 2 3 4.2 3.8 3.3 1.8 1 2.3 3 3.5 2.5 1.5 1 1.5 3.5 4 3.5 2 2 2.5 1.5 1.5 2.5 2 2 1.5 2.6 1.6 2.4 2.2 1.7 1.6 3 2 2.5 1.5 1 1 3 3 3 1 1 1 4 4 4 4 4 4 4.3 2.6 2.9 3.2 2.9 3.6 4 4 4 4 4 4 3.8 2.9 2.8 3.5 3 2.5 3 2.5 3 1.5 1.5 1 4 3 4 2.5 1.5 2 2.5 2 2 4 3 1.5 3 3.5 3 2.5 2.5 1.5 2 1.5 3 3.5 2 1.5 4 4 4 3 2.5 2.5 2 2 2 2 2 2 2.8 2.3 2.9 2 2 2 3 3 3 2 1 1 3 3 3 1.5 1 1 4 4 4 3 4 3.5 3.2 4.6 3.5 2.7 2.7 2.3 2 1.5 2 3.5 2 2.5 3.4 2 1.4 2.4 1 2.1 3 2 3.5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