Odds ratio using PROC MEANS and a data step

proc means data=amy stackodsoutput mean min max n;
class A B;
var X ;
ods output summary=kaz_mean;
run;

proc transpose data=kaz_mean out=amyt;
by B;
var Mean;run;

data amyt2;
set amyt;
/*http://en.wikipedia.org/wiki/Odds_ratio
test using the set values. This should return odds ratio of 36
col1=0.9;
col2=0.2;
*/

odds_ratio= ( col2/(1-col2)) /(col1/(1-col1)) ;

run;

Rasch data

data raschdata;
input
ID $ 1-10
Q01 11 Q02 12 Q03 13 Q04 14 Q05 15 Q06 16 Q07 17 Q08 18 Q09 19 Q10 20
Q11 21 Q12 22 Q13 23 Q14 24 Q15 25 Q16 26 Q17 27 Q18 28;
cards ;
Richard M 111111100000000000
Tracie F 111111111100000000
Walter M 111111111001000000
Blaise M 111100101000000000
Ron M 111111111100000000
William M 111111111100000000
Susan F 111111111111101000
Linda F 111111111100000000
Kim F 111111111100000000
Carol F 111111111110000000
Pete M 111011111000000000
Brenda F 111110101100000000
Mike M 111110011111000000
Zula F 111111111110000000
Frank M 111111111111100000
Dorothy F 111111111010000000
Rod M 111101111100000000
Britton F 111111111100100000
Janet F 111111111000000000
David M 111111111100100000
Thomas M 111111111110100000
Betty F 111111111111000000
Bert M 111111111100110000
Rick M 111111111110100110
Don M 111011000000000000
Barbara F 111111111100000000
Adam M 111111100000000000
Audrey F 111111111010000000
Anne F 111111001110010000
Lisa F 111111111000000000
James M 111111111100000000
Joe M 111111111110000000
Martha F 111100100100000000
Elsie F 111111111101010000
Helen F 111000000000000000
;
run;

PROC CALIS to do confirmatory factor analysis or even Rasch model???

I'd like to investigate if I can do CFA or Rasch model using PROC CALIS.

unt.edu/rss/class/Jon/SAS_SC/SEM/SAS_Module8_SEM.htm

I made this up.

PROC CALIS COVARIANCE CORR RESIDUAL MODIFICATION data=one;
LINEQS
risk_1n= F1 + E1,
risk_2n = F1 + E2,
risk_3n= F1 + E3,
risk_4n= F2 + E4,
risk_5n= F2 + E5,
risk_6n= F2 + E6;
STD
F1 = 1,
F2 = 1,
E1-E6 = VARE1-VARE6;
COV
F1 F2 = CF1F2;
VAR risk_1n risk_2n risk_3n risk_4n risk_5n risk_6n;
RUN;

PROC IMPORT & EXPORT

PROC EXPORT DATA= all3
OUTFILE= "C:\ ... \name_of_file.xlsx"
DBMS=EXCEL REPLACE;
SHEET="data check";
RUN;

PROC IMPORT OUT= WORK.asdf
DATAFILE= ".xlsx"
DBMS=EXCEL REPLACE;
RANGE="'Administrative Data$'";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;

Dummy variables in logistic regression models

Why do switching of values in a dummy variable and the use of class statement in PROC LOGISTIC change the coefficients in logistic regression?

(1) and (2) produce the same results. (3) and (4) produce the same results.

(1)
proc logistic data=here.asdf descending ;
model college= boy ;
run;

(2)
proc logistic data=here.asdf descending ;
class girl;
model college= girl ;
run;

(3)
proc logistic data=here.asdf descending ;
model college= girl;
run;

(4)
proc logistic data=here.asdf descending ;
class boy;
model college= boy ;
run;

(1) Estimates (2) Estimates (3) Estimates (4) Estimates
Intercept

0.5346

 Intercept

0.3645

 Intercept

0.1945

 Intercept

0.3645

boy      

-0.3401

 girl    

-0.1701

 girl

0.3401

 boy      

0.1701

               
Odds ratio

0.712

 

0.712

 

1.405

 

1.405