02-26-2024
Miracle
Barite | Level 11
Member since
06-23-2011
- 315 Posts
- 136 Likes Given
- 13 Solutions
- 50 Likes Received
-
Latest posts by Miracle
Subject Views Posted 937 12-12-2021 09:32 PM 4584 08-25-2021 12:44 PM 1767 08-25-2021 12:42 PM 1838 08-20-2021 04:49 AM 1960 08-18-2021 05:15 AM 1735 08-11-2021 10:36 AM 1186 08-05-2021 11:00 AM 1805 08-05-2021 10:27 AM 1230 08-05-2021 10:25 AM 1903 08-04-2021 07:00 AM -
Activity Feed for Miracle
- Got a Like for Re: proc sort and dupout: how to get the pairs of duplicates. 08-02-2023 08:17 AM
- Posted Re: How to output p value for covariance parameter estimates when using PROC GLIMMIX? on SAS Programming. 12-12-2021 09:32 PM
- Posted Re: Exposure-adjusted event rate on SAS Health and Life Sciences. 08-25-2021 12:44 PM
- Liked Re: Exposure-adjusted event rate for MelissaM. 08-25-2021 12:43 PM
- Posted Re: Assign id on SAS Procedures. 08-25-2021 12:42 PM
- Liked Re: Assign id for Kurt_Bremser. 08-20-2021 04:50 AM
- Posted Re: Assign id on SAS Procedures. 08-20-2021 04:49 AM
- Posted Assign id on SAS Procedures. 08-18-2021 05:15 AM
- Liked Re: proc sql: combine data with string dates for Patrick. 08-12-2021 12:43 AM
- Posted Re: proc sql: combine data with string dates on SAS Procedures. 08-11-2021 10:36 AM
- Got a Like for Re: Replicate every id by all possible unique group present in data. 08-05-2021 11:14 AM
- Posted Re: Replicate every id by all possible unique group present in data on SAS Programming. 08-05-2021 11:00 AM
- Posted Re: proc sql: combine data with string dates on SAS Procedures. 08-05-2021 10:27 AM
- Tagged Re: proc sql: combine data with string dates on SAS Procedures. 08-05-2021 10:27 AM
- Posted Replicate every id by all possible unique group present in data on SAS Programming. 08-05-2021 10:25 AM
- Posted proc sql: combine data with string dates on SAS Procedures. 08-04-2021 07:00 AM
- Posted Incorrect year from character date to SAS date on SAS Programming. 07-14-2021 07:40 AM
- Posted Re: Exposure-adjusted event rate on SAS Health and Life Sciences. 04-14-2021 08:59 AM
- Liked Re: Exposure-adjusted event rate for Doc_Duke. 04-13-2021 09:58 PM
- Liked Re: Conditionally run proc mixed within macro for PaigeMiller. 04-13-2021 09:57 PM
-
Posts I Liked
Subject Likes Author Latest Post 4 4 1 1 1 -
My Liked Posts
Subject Likes Posted 1 02-13-2017 09:32 PM 1 08-05-2021 11:00 AM 1 10-29-2020 09:21 AM 1 04-18-2018 10:56 PM 1 03-09-2018 10:26 PM
12-12-2021
09:32 PM
Hi @di_niu0 . This output section can be obtained by using the ods output statement where it is stored in CovParms in SAS. HTH.
ods trace on;
ods output CovParms=outds;
proc glimmix data=schools method=quad;
class school_id class_id;
model score = class_id / solution dist=binary link=logit;
random intercept / subject=school_id solution;
run;
ods output close;
ods trace off;
... View more
08-20-2021
04:49 AM
Thanks @Kurt_Bremser for your solution using datastep. But I need to perform this manipulation using proc sql. BTW, this is not homework. I try to use proc sql more for my work now. Thanks a lot.
... View more
08-18-2021
05:15 AM
Dear All,
May I know how do go from 'have' to 'want' using proc sql?
Thanks a lot.
have studyid test
abc110 1
abc110 2
abc110 3
abc201 1
abc201 2
abc405 1
abc405 2
want studyid test n
abc110 1 1
abc110 2 1
abc110 3 1
abc201 1 2
abc201 2 2
abc405 1 3
abc405 2 3
... View more
08-11-2021
10:36 AM
Dear @Patrick and All, I have another question please. How do I combine the demographic dataset that contains more patients to this sql please? So every patient from the demographic dataset will show in the final dataset regardless whether they are present in x or y dataset.
Thanks a lot. Again!
... View more
08-05-2021
11:00 AM
1 Like
Thanks @maguiremq for your quick reply. I was thinking something like datastep by reading a macro variable containing all the unique grp then using do loop to repeat for every row but I dunno how exactly. This is much easier and should do for now.
... View more
08-05-2021
10:27 AM
Thanks a lot @Patrick.
It's a very detailed explanation for someone who isn't a sql person. I really appreciate it.
... View more
- Tags:
- hanks
08-05-2021
10:25 AM
Dear All, Can I please seek your help on how to achieve this? For example, I would like turn data X into data Y.
Thanks a lot.
Data X
Data Y
id grp
id grp
1 A
1 A
1 B
1 B
2 A
1 C
2 C
2 A
3 A
2 B
3 B
2 C
3 C
3 A
4 C
3 B
3 C
4 A
4 B
4 C
... View more
08-04-2021
07:00 AM
Dear All, Can I please seek your help on how to combine this 2 proc sql together? The first proc sql is to obtaine the date of first and last treatment.
The second proc sql is to identify treatment emergent AE. Instead of two separate proc sql, how can I achieve this by using one proc sql? Thanks a lot.
proc sql;
create table txdat as
select id,
min(input(ECSTD,yymmdd10.)) format=is8601da. length=8 as trtstd,
max(input(ECEND,yymmdd10.)) format=is8601da. length=8 as trtend
from ec
group by id;
quit;
proc sql;
create table chk as
select coalesce (x.id,y.id) as id,
x.trtstd,
y.AEYN,
y.aeterm,
case when AESTDT <> "" then input(y.AESTDT,is8601da.) else . end as aestd format=is8601da. length=8,
case when AESTDT <> "" and trtstd <> . and calculated aestd >= trtstd then 1 else 0 end as teae,
y.tmp
from txdat as x
full join ae as y
on x.id=y.id;
quit;
... View more
07-14-2021
07:40 AM
Dear All,
Could you please point me out the what's wrong with my code? Why it is giving me the year of 2020 instead of 2021? Thanks a lot.
data _null_;
strdate="13 APR 2021";
sasdate=input(strdate,date9.);
format sasdate yymmdd10.;
put strdate=;
put sasdate=;
run;
strdate=13 APR 2021
sasdate=2020-04-13
... View more
04-14-2021
08:59 AM
Thanks @ChrisNZ for your reply. I can see many on exposure-adjusted incidence rate only. Would you mind to share me the link specifically for exposure-adjusted event rate please?
Thanks in advance.
... View more
04-12-2021
05:53 AM
Dear All, Could you please to point out what have I done wrong given the following errors?
Thanking you in advance.
ERROR: Required operator not found in expression: &sub eq
ERROR: The macro REPEAT will stop executing.
ods output LSMeans=LSM_all_¶m
SliceDiffs=SDiff_all_¶m;
proc mixed data=inds;
%if &sub ne %then by &byvar;
where PARNAM1C="¶m" and 1<=vis<=13;
class id resp tx sex vis / ref=first;
model chg=resp tx sex resp*vis / s ddfm=kenwardroger;
lsmeans resp*vis / cl;
repeated vis / subject=id type=&cov;
slice resp*VIS / sliceby=vis pdiff cl;
run;
ods output close;
... View more
03-24-2021
02:09 PM
Dear All, My apologies that this is not a SAS question. But I'm wondering if anyone is able to explain to me on how exposure-adjusted event rate is calculated? Especially the denominator. Is the denominator the sum of differences between treatment start date and discontinuation/completion date from all patients? Thanking you in advance.
... View more