I am attempting to extract topics from a collection of customer comments. I would like to be able to parse common phrases. I read the documentation for the multi term parameters within the parse statement. However I am not getting it to work. How can I pass the phrases"I don't know", "improve training" or "everything is fine"?
... View more
Hello,
I used the codes at below to estimate the propensity score and logistic regression for inverse probability weighting.
How can I test the balance of the standardised mean differences before and after adjustment?
How to obtain the synthetic n values derived from weights?
Thanks
/***CREATING PROPENSITY SCORES********/
proc sort data=tab_imput; by _imputation_;run;
proc logistic data=tab_imput desc;
class var1 var2 var3 var4 var5 var6 var7 var8 var9 ;
model mut= var var1 var2 var3 var4 var5 var6 var7 var8 var9/link=logit rsquare ;
output out=denom p=d;
by _imputation_;
run;
proc logistic data=tab_imput desc;
model mut=;
output out=num p=n;
by _imputation_;
run;
proc sort data=tab_imput ;
by anonymat;run;
proc sort data=denom;
by anonymat;run;
proc sort data=num;
by anonymat;run;
data tab_imput_pscore;
merge tab_imput denom num;
by anonymat;
if mut=1 then uw=1/d; else if mut=0 then uw=1/(1-d);
if mut=1 then sw=n/d; else if mut=0 then sw=(1-n)/(1-d);
run;
proc sort data=tab_imput_pscore; by _imputation_;run;
/***PROPENSITY SCORE WEIGHTED OUTCOME MODEL****/
ods graphics on;
proc logistic data=tab_imput_pscore desc;
class mut(ref='no') / param=reference ;
model vif (event='no') = mut/ rsquare clodds=wald lackfit ;
weight sw ;
by _imputation_;
oddsratio mut;
ods output parameterEstimates = ipw_mut ;
run;
ods graphics off;
proc mianalyze parms=ipw_mut ;
modeleffects mut;
ods output parameterEstimates = ipw_mut1;
run;
data ipw_mut2; set ipw_mut1;
OR_est=EXP(ESTIMATE);
LCI_OR=OR_est*EXP(-1.96*STDERR);
UCI_OR=OR_est*EXP(+1.96*STDERR);
run;
proc print data=ipw_mut2;
var Parm OR_est LCI_OR UCI_OR Probt ;
run;
... View more
Hello SAS Community, Our team recently transitioned from Base SAS 9.4 to SAS Studio using Viya 4. We're encountering some challenges adapting our existing program that converts .dat files into SAS datasets for further analysis. These .dat files, received quarterly from IT, act as snapshots of our database on specific dates. We use them to generate numerous datasets used across various departments. Previously, in Base SAS 9.4, we successfully used the following code %let tm = sp124; /*update term*/ filename extract "X:\ircensus\scf extracts from ISC\&tm\_syra600ro_cron_gr.dat"; data bgx&tm; attrib bstuid informat=$char9. /* spriden_id */ SEXAPPL informat=$char1. /* spbpers_sex */ ethnic informat=$char33. /* combination of spbpers_ethn_cde & gorprac_race_cde */ byrtmapp informat=$char6. /* saradap_term_code_entry */ bapplnum informat=$char2. /* saradap_appl_num */ RELCODE1 informat=$char2. /* spbpers_lgcy_code=Y */ bhonors informat=$char4. /* saraatt_atts_code=HNRE */ natnbirth informat= $char3. /* sabsupl_natn_code_birth */ firstgen informat =$char1. /* first gen from ug admissions */ . . . . ; infile extract length=linelen delimiter='^' lrecl=1000 ls=1200 firstobs=2 missover; format bstupidm 8. JUNORGPA 5.2 satverb satmath satm satr 3. bbirthdt bdtaprec bdtapent bstactdt badactdt date9. ; input bstuid SEXAPPL ethnic byrtmapp bapplnum. . . . . . ; label bstuid = 'spriden_id' bstutype = 'saradap_styp_code' SEXAPPL = 'spbpers_sex' ethnic = 'spbpers_ethn_cde=NH,2=H,gorprac_race_cde=W,2=B,3=H,4=A,5=N,6=U' satm = 'sortest_test_score, sortest_tesc_code=SATM, SAT Math 2016' satr = 'sortest_test_score, sortest_tesc_code=SATR, SAT Reading 2016' . . . ; run; We'd greatly appreciate any guidance on replicating this functionality or converting the code for use within SAS Studio. Any insights or suggestions would be immensely helpful! Best Regards, Bhaskar
... View more
Hi, I was wondering whether it is correct to analyze the dependent variable X on a Likert scale (scale 1 -5) with the independent variables TRT (1, 2, 3 and 4) and product (A, B and C) with this model: proc logistic; class trt product; model X (EVENT='1')=trt product; run; or this one: proc glm; class trt product; model X=trt product/solution; means trt product/hovtest; lsmeans trt product/pdiff adjust=tukey ; run; Thank you in advance, Alen
... View more