* Before you run Duhachek and Iacobucci's syntax you will need * to get a vector form of your variable covariance matrix. * Follow these instructions closely to get your alpha SE and 95% C.I. * First run the macro below (everything from define to !enddefine) define !covariance (myvars=!charend('#') / myn=!tokens(1) ) matrix. get X /variables !myvars. print X/title = "Submited Dataset". compute n=!myn. compute col1=make(n,1,1). compute colsum=t(X)*col1. compute means=colsum/n. print means/title = "Variable Means". compute xbarix=col1*t(means). compute xminxbar=X-xbarix. compute ssncp=t(xminxbar)*xminxbar. print ssncp/title = "Sum-of-squares and Cross-products". compute covx=(ssncp)/(n-1). print covx /title = "Covariance Matrix". compute scovx=1. loop i=1 to nrow(covx). . loop j=1 to ncol(covx). . compute scovx={scovx,covx(i,j)}. . end loop. end loop. compute scovx2=scovx(1,2:ncol(scovx)). print scovx2/title = "Covariances as single vector (use for Duhachek)". end matrix. !enddefine. * Next you will need to call on the macro which will produce the vector * form of your variable covariance matrix. Note, the covariances are based on * unbiased estimations (n-1). The macro call is fairly simple: * !covariance myvars=variable1 variable2 variable3 etc # myn=yoursamplesize. * Use the above format (without the leading asterix) to compute the covariances * from your own data. After you list all of your variables you should space and * place a pound sign at the end of the list to tell the macro that you have * ended imputing your variables. Last specify your sample size; myn should be * the numeric value of your sample size (i.e. N=215 then myn=215). * Next is the SPSS code to compute Coefficient Alpha, Standard Error, and Confidence Intervals. * The user needs to supply the number of items in the scale (numbitem), * sample size (numbsubj), and vector form of the covariance matrix (itemcov). * Remember, If you paste the vector form of your covariance matrix from the * macro earlier you will need to delete the tab spaces and replace them with * commas and semicolons (commas within variable covariances and semicolons * between variables). In example if your have a 2x2 covariance matrix that * that looks like this: * V1 V2 * V1 12 8 * V2 8 12 * Your vector form of this covariance matrix should look like this: * {12,8;8,12} Note the commas are between cells from within each * variable and semicolons between the last covariance of the first * variable (V1) and the first covariance of the second variable (V2). * Enter your number of items, number of observations and your vector form * of the covariances and run the syntax from matrix all the way down. matrix. compute numbitem = . compute numbsubj = . compute itemcov = { }. compute one=make(numbitem,1,1). compute jtphij=transpos(one). compute jtphij=jtphij*itemcov. compute jtphij=jtphij*one. compute trmy=trace(itemcov). compute trmy=trmy/jtphij. compute myalpha=1-trmy. compute nn1=numbitem-1. compute nn1=numbitem/nn1. compute myalpha=nn1*myalpha. compute trphisq=itemcov*itemcov. compute trphisq=trace(trphisq). compute trsqphi=trace(itemcov). compute trsqphi=trsqphi**2. compute ttp=itemcov*itemcov. compute jtphisqj=transpos(one). compute jtphisqj=jtphisqj*ttp. compute jtphisqj=jtphisqj*one. compute omega=trphisq+trsqphi. compute omega=jtphij*omega. compute omegab=trace(itemcov). compute omegab=omegab*jtphisqj. compute omega=omega-(2*omegab). compute omega=(2/(jtphij**3))*omega. compute s2=(numbitem**2) / ((numbitem-1)**2). compute s2=s2*omega. compute se=sqrt(s2/numbsubj). compute cimin95=myalpha-(1.96*se). compute cimax95=myalpha+(1.96*se). print myalpha /format =f8.3/title= "Your coefficient alpha is:". print se /format=f8.3/title="Your alpha standard error is:". print cimin95 /format =f8.3/title= "The lower 95% confidence limit follows:". print cimax95 /format =f8.3/title= "The upper 95% confidence limit follows:". print /title= "Dawn Iacobucci and Adam Duhachek (2003), Advancing Alpha: Measuring". print /title= "Reliability with Confidence. Journal of Consumer Psychology, 13 (4) 478-487.". end matrix.