I have very little experience working with weights, so please correct me if my understanding is wrong.
I'm trying to create a summary table of unadjusted rates of quality of care between the TM and MA groups. I was able to produce a table with Proc Ttest and ODS. However, the survey uses a complex design. I need to add a weight variable and, it appears, replicate weight variables. Unfortunately, Proc Ttest can accommodate a weight variable but not replicate weights.
Just to experiment, I tried running Proc Ttest with the weight variable, and the sig score for the variables improved. That confuses me, because the study documentation says "To permit the calculation of random errors due to sampling, a series of replicate weights were computed. Unless the complex nature is taken into account, estimates of the variance of a survey statistic may be biased downward." In other words, not using weights means underestimating the variance. And if the true variance is actually higher, shouldn't that reduce the significance level? One particular variable I looked at has a probt score of 0.0158 when unweighted, and 0.0025 when weighted.
Based on what I found in the study documentation, I'm trying to use Proc Surveyfreq instead. However, this is confusing me as well. The Pr > ChiSq score is now <.0001 for every variable, even those that were not significant when I used Proc Ttest.
Here is the code, with sample data and Proc TTest commented out. I'm only including 1 of the replicate weights here, but there are actually 100 of them:
data have;
infile datalines dsd dlm=',' truncover;
input ACC_HCTROUBL_r ACC_HCDELAY_r ADRD_group TM_group
PUFFWGT PUFF001;
datalines;
3,1,1,0,1310.792231,1957.576268
2,1,1,1,10621.60998,18588.46812
3,2,1,1,3042.093381,5484.728615
3,2,1,1,3166.358963,5497.289892
3,2,1,0,1481.272986,432.6313548
2,2,1,1,6147.605583,9371.965632
2,1,1,1,14001.79093,16689.25322
3,1,1,1,2035.685768,530.211881
2,1,1,1,6356.258972,1899.874476
3,2,1,0,1487.104781,2018.636444
2,1,1,0,5002.553584,1364.125425
2,2,1,1,2493.79145,4039.542597
3,2,1,0,2260.257377,3495.675613
2,2,0,1,9358.048737,2835.543292
3,2,1,1,2978.506348,4932.378916
3,2,1,1,2794.906054,5118.430973
3,1,1,0,1663.418821,519.7549258
3,2,1,0,2083.459361,3067.105973
2,1,1,0,5106.785048,8672.202644
3,1,1,1,3447.574748,854.6276748
3,2,1,1,2819.233426,899.849234
3,2,1,0,4067.38684,6463.15598
3,2,1,1,1249.96647,2053.666234
3,2,1,1,1730.237908,3058.307502
3,2,1,1,4932.936202,1479.55826
; RUN;
/*PROC TTEST plots=none data=have;
CLASS TM_group;
VAR ACC_HCTROUBL_r ACC_HCDELAY_r;
WEIGHT PUFFWGT;
REPWEIGHT PUFF001; /*REPWEIGHT PUFF001-PUFF100;*/
RUN;*/
PROC SURVEYFREQ data=have VARMETHOD = brr (fay=.30);
TABLE ACC_HCTROUBL_r ACC_HCDELAY_r * TM_group / row chisq lrchisq;
WEIGHT PUFFWGT;
REPWEIGHT PUFF001; /*REPWEIGHT PUFF001-PUFF100;*/
WHERE ADRD_group ^= 1;
RUN;
... View more
Hi, SAS CI360 engage email captures email opt-outs as events. Could this be passed as part of API call from CI360 to another system instead of the option of using an agent to stream the events?
... View more
I have long data and wrote code to track changes in 2 variables over time. However, the second entry for each userID is wrong. My data, code, and screenshot of results below. What is wrong with the code?
data fake_data;
input userID $ event_date date9. response $ code $;
format event_date date9.;
datalines;
1693 01Dec2014 Y V
1693 01Jan2015 Y V
1693 01Feb2015 Y V
1693 01Mar2015 M G
1693 01Apr2015 M G
1693 01May2015 M G
1129 01Feb2018 Y V
1129 01Mar2018 Y V
1129 01Apr2018 N R
1129 01May2018 N R
1129 01Jun2018 M R
1129 01Jul2018 M R
1345 01Aug2016 N R
1345 01Sep2016 N R
1345 01Oct2016 N R
1345 01Nov2016 N R
1345 01Dec2016 M R
1345 01Jan2017 M G
1345 01Feb2017 Y G
1345 01Mar2017 Y G
1345 01Apr2017 Y G
1345 01May2017 Y G
;
proc sort data = fake_data out=fake_data_nodupkey nodupkey; by userID event_date; run;
data flag_vars;
set fake_data_nodupkey;
by userID event_date;
if first.userID then do;
prev_response = response;
prev_code = code;
end;
else do;
prev_response = lag(response);
prev_code = lag(code);
end;
response_change = 0;
if response ne prev_response then response_change = 1;
code_change = 0;
if code ne prev_code then code_change = 1;
run;
proc print data=flag_vars;
run;
... View more
The idea of the industry project program is not new. Lots of postgraduate degree programs offer capstone projects or work integrated learning opportunity with an industry partner. So why is this program different?
Well it’s the way that SAS Australia runs the program.
First – SAS works with those universities who as part of the SAS Global Academic Program collaborate with SAS around either an undergraduate or postgraduate teaching program. It means students are already learning about AI, Data and Technology before they arrive at the industry project program.
Second – participant have the opportunity to work with either SAS or our customers. This means the industry project program offers a wide range of business challenge scenarios for the teams to engage with.
Third – we provide access to the latest and greatest AI technology platform where the students can build and teste their hypothesis and models. And the app is based in the cloud, making it quick and easy for teams to focus on the important stuff: solving the business problem.
Fourth – teams are introduced to the analytics lifecycle and guided how to use this methodology to drive insights about the data being used and the hypothesis being tested.
Finally – industry mentors advise how the teams should project manage the project, provide regular feedback on the teams progression and work with the teams to prepare a presentation that is delivered to industry and subject matter experts.
Here’s one we prepared earlier
Recently two University of Canberra students, Milica Gallardo Petkovich and Tzuwei Tsai, took part in the industry project program. Both students were learning about AI, Data and technology as part of their degree program. They project that both students worked on was to develop a data-driven solutions for home loan origination scorecard.
The project main goal was to leverage AI and SAS Viya for Learners to enhance risk management and decision-making in the Australian Mortgage Industry. 20 students participated, forming 4 groups, who each worked collaboratively to address this real-world problem.
5 mentor sessions were run where the students presented their work to date to a team of industry mentors with the valuable feedback and coaching helping the students develop their technology, AI and business problem solving skills.
In fact SAS was so impressed with 2 students – we hired them. You can read their story here.
What Next?
Simple. If you are reading this article and interested to know more, reach out to us at academic@oz.sas.com. If you’re in industry and want to leverage the connections that the SAS Academic Program has in Australia to recruit students to participate in your industry project, let us know. Or if you just want to be introduced to one of the many higher education partners we work with, we here to help. And if you’re a academic and want to know more about the SAS Global Academic Program, we’re here to help.
... View more
Hello, I ran a linear mixed model with repeated measures using PROC MIXED. I used the RCORR statement to obtain the intraclass correlation coefficient (ICC) for the non-independent variable 'score' across readers. Is there a function within PROC MIXED that outputs the 95% CI and p-value for the ICC? PROC MIXED DATA=final COVTEST;
CLASS subject_id reader (REF='1');
MODEL score = reader / S CL;
REPEATED / SUBJECT=subject_id TYPE=cs R RCORR;
RUN; Thank you for your help!
... View more