Logistic regression, comparing group means

proc glimmix data=asdf namelen=32;
where disaster_type /*age_desc*/ ne "";
class GROUPING_D_RISK_PT;

model &out
=
GROUPING_D_RISK_PT

/solution ddfm=kr dist=binomial link=logit s STDCOEF ;

lsmeans GROUPING_D_RISK_PT / ilink diff;

output out=gmxout residual=resid;
ods output
ParameterEstimates=kaz1
CovParms=uekawa1
nobs=jeana
ModelInfo=estes
dimensions=diminfo
ConvergenceStatus=concon
FitStatistics=FITSTAT
Diffs=DIF_RESULT
;
run;

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;