Hello,
I have the below code which is part of larger code that will stop running the rest of the program if there is a difference in the proc compare. It is working okay but I am curious if there is a way to rename the _type_ variable that is created for the comparison. Right now it list BASE and COMPARE which is great but for a user that isn't aware I would like to rename to the actual file names. Is this possible?
%let diff_count = 0;
/* Compare the TO_TAX and FROM_TAX BUWfiles */
PROC COMPARE BASE=WORK.TO_TAX_MODIFIED brief transpose COMPARE=WORK.FROM_TAX_MODIFIED OUT=COMPARISON OUTBASE OUTCOMP OUTDIF LISTOBS OUTNOEQUAL BRIEFSUMMARY;
VAR member_number account_number payer_id ;
title 'COMPARING FILE SENT AND RECEIVED FROM';
RUN;
DATA _NULL_;
SET COMPARISON END=eof;
IF eof THEN CALL SYMPUT('diff_count', _N_);
RUN;
... View more
I am currently working on the analysis of animal behaviour (frequency and duration) in a 2 x 2 factorial design, on two days (d2 and d16). Behavioural frequencies were analysed with proc glimmix with a Poisson distribution and Log link function, and a multiplicative overdispersion parameter: proc glimmix data=behav;
by Obs_Day;
class Batch Sanitary Diet;
model Fighting_Total_number = Batch Sanitary|Diet / dist=Poisson link=log;
random _residual_;
lsmeans Batch Sanitary|Diet / pdiff;
run; Durations were analysed with proc glimmix, with a binomial distribution and logit link function, and a multiplicative overdispersion parameter: proc glimmix data = behav;
NLoptions Maxiter = 2000;
by Obs_Day;
class Batch Sanitary Diet;
model Fighting_Total_duration = Batch Sanitary|Diet / dist = binomial link = logit;
random _residual_ ;
lsmeans Batch Sanitary|Diet / pdiff;
run; These are standard methods used by my department for such analyses. However, I was later told that because one treatment group had 0 incidences of a certain behaviour on d2, I cannot use proc glimmix. Is that so? If yes, what is the alternative? I would appreciate any help from the community.
... View more
How to create a tabulated report based on data:
Column CATEGORY in H means a horizontal report. TITLE_LEVELS indicate how many levels of title there are. TITLE_LEVEL1 is the main header, TITLE_LEVEL2 is the sub-header of TITLE_LEVEL1, and TITLE_LEVEL3 is the sub-header of TITLE_LEVEL2.
All columns are Character data type
proc tabulate data=datset;
class TITLE_LEVEL1 TITLE_LEVEL2 TITLE_LEVEL3 Column1 ;
table TITLE_LEVEL1*
TITLE_LEVEL2*TITLE_LEVEL3;
run;
i have data
i want
PFA
... View more
I am currently analyzing the impact of an intervention on medication numbers using difference-in-difference analysis, but I have encountered several challenges. Following the SAS support instructions, I conducted the difference-in-difference analysis. However, I noticed a discrepancy between my results and SAS's example (Usage Note 61830: Estimating the difference in differences of means). In the example, the value of 'Mean Estimate' in 'Contrast Estimate Results' is identical to the 'Estimate' in 'Least Squares Means Estimate'. However, in my case, these values were different. I suspect this could be due to my use of the negative binomial distribution with a log link, resulting in exponential values. Consequently, I am unsure whether to rely on the 'Mean Estimate' in 'Contrast Estimate Results' or the 'Estimate' in 'Least Squares Means Estimate', and how to interpret the results." Contrast Estimate Results Label Mean Estimate Mean Confidence Limits L'Beta Estimate Standard Error diff in diff 1.51 1.49 0.41 0.0051 a*b Least Squares Means a b Estimate Standard Error z value Pr > |z| 1 1 0.77 0.00434 178.19 <.0001 1 0 0.03 0.00508 6.5 <.0001 0 1 0.72 0.00408 177.71 <.0001 0 0 0.40 0.00426 93.11 <.0001 Least Squares Means Estimate Effect Label Estimation Standard Error z value Pr > |z| time*hospitalize diff in diff 0.41 0.00509 81.01 <.0001
... View more