Recent Activity
I am estimating rates and rate ratios of an outcome using proc genmod with a poisson distribution for multiply imputed data. Sample code is below. I do not include the follow on steps (e.g., proc mianalyze, etc.) for brevity.
proc genmod data=imputed_data;
by _imputation_;
CLASS group (ref='A') age (ref='<25') status (ref='Jr') sex (ref='Male');
MODEL numcount = group age status sex /dist=poisson link=log offset=logdenomcount;
lsmeans eth/ exp diff cl om=imputed_data;
estimate "A" intercept 1 group 0 0 1 /exp ;
estimate "B" intercept 1 group 1 0 0/ exp;
estimate "C" intercept 1 group 0 1 0/ exp;
ods output ParameterEstimates=gm_fcs1 estimates=model_est lsmeans=allestimates diffs=relrisk;
ods select none;
run;
For an estimated rate for Group A, I want the model covariates (age, status, sex) to be weighted according to actual covariate distribution of my entire sample due to imbalances across levels of variables by group. (In other words, what would the rate be for group A (or B or C) if its age, sex, and status distribution were the same as the entire study population?) If I am understanding the documentation correctly, then I want to use the om= or obsmargins option so that the "coefficients (are changed) to be proportional to those found in the OM-data-set" as mentioned here. In other words, I don't want estimates per the LSmeans default, which "estimate the marginal means over a balanced population" as stated here.
Two questions: 1) Is my reason for wanting the "om" option correct? I can elaborate if further clarification is needed. 2) Am I applying the "om" option incorrectly? My estimates are not changing when I add om, om=imputed_data, obsmargins, or obsmargins=imputed_data. I tested rates with both lsmeans and estimates, and rate ratios with ParameterEstimates and diffs and they are each the same, respectively. Thank you for your feedback!
... View more

0
5
Is it possible to generate different groupings for different variables in the Rank Procedure? Lets say I have variables A and B and I want to rank A into quartiles but B into terciles. I know this can be done with two procedures, but could it be done in one?
... View more

0
1
One way to copy a dataset from let's say path1 to path2 is to use the libname and data statement as below
%let path1= something;
%let path2=something else;
%let fname=be_auto_prmjun2024;
libname source spde "&path1.";
libname dest spde "&path2";
data dest.&fname.;
set source.&fname;
run;
if we have many files, we coud use a filelist and a call execute and repeat the above script
What will be the unix command that we could use to copy spde file containing only the string prm (stand for premium) from many subfolders to other subfolders and of course only spde file.
Please provide the good unix command
Please p
... View more

0
2
I want to identify whether a particular custom function is being used, and if so, determine which rule set/code files/custom functions are using it.
In the case of a Rule set, I can easily do this by clicking on the "View Used By Report" , which lists all objects that use a specific rule set. However, this functionality doesn’t seem to be available for custom functions.
SAS Version: Stable 2024.09
... View more

0
1
data v_sort;
input v1$ v2$ V3$ ;
cards;
A B C
F K J
D E F
C K J
K L W
S V R
;
run;
how to sort all variables
... View more

0
7
Unanswered topics
These topics from the past 30 days have no replies. Can you help?