Kick-start Your Data Exploration Journey with SAS Information Catalog
Recent Library Articles
Recently in the SAS Community Library: @smanoj introduces you to the SAS Information Catalog, which provides a powerful search engine to find needed data assets.
Hello SAS community,
I have a dataset with a variable number_images with values 1 or 2 which indicate whether an image was read for a bunch of variable (n=110) at T0 or/and T2
this is what I get from proc freq number_images nmissT0 nmissT2 1 0 110 1 1 110 1 2 110 1 3 110 1 4 110 1 5 110 1 6 110 1 7 110 1 8 110 1 9 110 1 10 110 1 12 110 1 14 110 1 15 110 1 18 110 1 31 110 1 93 110 1 110 0 1 110 1 1 110 2 1 110 6 1 110 10 1 110 12 1 110 13 1 110 14 2 0 0
If number_images=1, the image could have been read at either of the timepoints. I want to keep number_images =1 but be able to distinguish those with readings at T1 or T2 only
if nmissT0=110 then the images was only read at T2 if nmissT2=110 then the images was only read at T0 if nmiss is <110, then the image was read at least for some features at one timepoint- not concerned with that part for this question
I would like to update number_images to have something like this but I know this won't work proc format; value n_imagf 1="1: V0 readings only" 1="1: V2 readings only" 2="2: V0, V2 readings"
What can I do instead so number of images still shows 1 and is numeric? if number_images=1 and nmissT0=110 then number_images=1??
Can anyone help?
Thanks, Maggie
... View more
I want to find the relative risk and risk difference and their corresponding 95% CIs to compare adverse events in a treatment group compared to a placebo group.
What 95% CI can handle zero counts using PROC FREQ (or a different procedure)? I was going to use Wald and Agresti-Caffo, respectively, but it looks like Wald can't handle zero counts and since we have a small sample size (n<10), perhaps that's not the best option in general...
... View more
I am using the SAS elarning courses in my institution course, and assigning as homework the Virtual lab-based demos and/or activities. I want the students to be able to save their final product work of an activity/demo and upload it in the dropbox of the brightspace D2L LMS.
Are there options that enable the user to do so? if so, what is the best/easiest option? Thanks.
Kaddour
... View more
How can I change this macro to create all the variables in one data set? I want First_ADD and Second_ADD in the out flag data set. I want to do this for multiple varibles using the macro but it keeps overwriting itself and keeping the last flag that was created by the macro. Thank you!
%MACRO FLAG(VAR1,VAR2,FLAGNAME); DATA FLAG; SET RULE1; &FLAGNAME=0; DO _N_=1 to countw(&VAR1,',') while(&FLAGNAME=0); word=scan(&VAR1,_N_,','); if word=' ' then continue; if indexw(trim(&VAR2),trim(word),',') then &FLAGNAME=1; end; drop word; run; %MEND FLAG;
%FLAG(Addresses1,Addresses2,First_ADD); %FLAG(Addresses1,Addresses3,Second_ADD);
... View more
Hi all, I'm running ZINB via PROC GENMOD. Most models have run smoothly but I am running into an issue with one of my models. I'm using various child characteristics to predict zero-inflated behavioral and emotional count outcomes. Most IVs are continuous except for medication status (yes vs no). For one particular outcome, the logit portion of the model does not produce a p-value for my categorical variable, and produces the same value for the estimate and CIs; I'm not receiving any error messages. My online searches have yielded results predominately re: missing values. Here is my code and output for the logit model. Any resources/thoughts would be greatly appreciated! TITLE 'ZINB, DV = Anger Emo log'; PROC GENMOD DATA = datafile; CLASS Meds; MODEL Emotion_anger = meds time x1 x2 x3 / link = log dist = zinb offset = log_var; ZEROMODEL meds time x1 x2 x3; RUN; Logit Model Output: Analysis Of Maximum Likelihood Zero Inflation Parameter EstimatesParameter Estimate; SE; Wald 95% CI; Wald Chi-Square; p-value Intercept; df = 1 -25.4554 0.7635 -26.9518 -23.9591 1111.72 <.0001 Meds yes; df = 0 24.4313 0.0000 24.4313 24.4313 . . Meds no; df = 0 0.0000 0.0000 0.0000 0.0000 . . time; df = 1 0.0725 0.1813 -0.2828 0.4279 0.16 0.6891 x1; df = 1 5.3979 1.9872 1.5031 9.2927 7.38 0.0066 x2; df = 1 4.1286 1.5235 1.1425 7.1146 7.34 0.0067 x3; df = 1 -0.1602 0.0610 -0.2798 -0.0406 6.89 0.0087
... View more