Hello, I use an multiple imputation and I realize two tests, so I adjusted the pvalue with the bonferonni method. But, how can I have the adjusted p-value with PROC MIANALYZE ? Here my code : proc mixed data=v1_v2_im method=reml; class PRDT (ref="Placebo") TV_VISIT_TMP(ref="V1") SUBJID; model changeVn_V0 = PRDT TV_VISIT_TMP PRDT*TV_VISIT_TMP / s ddfm=kenwardroger; repeated TV_VISIT_TMP / subject=SUBJID type=CS; lsmeans PRDT*TV_VISIT_TMP / slice=TV_VISIT_TMP cl diff adjust=bon; slice PRDT*TV_VISIT_TMP / sliceby(TV_VISIT_TMP="V1") cl pdiff=control("Placebo" "V1"); slice PRDT*TV_VISIT_TMP / sliceby(TV_VISIT_TMP="V2") cl pdiff=control("Placebo" "V2"); by _Imputation_; ods output SolutionF=mixparms; ods output SliceDiffs=slice; ods output Slices=slice2; ods output Diffs=difs; run; It's in the table "Difs" that there are pvalues adjusted. But, I don't know how to use PROC MIANALYZE to pooling adjusted pvalues ? Thanks for your answer. Clémence
... View more
Hi guys,
suppose to have the following:
data DB; input ID :$20. Discharge :date9. Discharge_n :date9.; format Discharge :date9. Discharge_n :date9.; cards; 0001 13FEB2019 . 0001 01FEB2019 28FEB2019 0002 01FEB2020 . 0002 04FEB2020 28FEB2020 ;
then you want to update Discharge (all the fields, missings and not) with the variable Discharge_n to get:
data DB1;
input ID :$20. Discharge :date9. Discharge_n :date9.;
format Discharge date9. Discharge_n :date9.;
cards;
0001 28FEB2019 .
0001 28FEB2019 28FEB2019
0002 28FEB2020 .
0002 28FEB2020 28FEB2020
;
If I use the rule: if discharge_n > discharge only the corresponding row will be updated but I would like to update all rows corresponding to the same ID.
Can anyone help me please?
Thank you in advance
... View more
I have a dataset that I am trying to use a multi-dimensional array to transpose the data from 2 variables, however I am having issues because the array not only needs to be dynamic, but also allow me to group certain records together using multiple variables.
This is my source table:
id
action_date
status
status_date
1
01/01/2024
A
01/01/2024
1
01/01/2024
A
02/01/2024
1
01/01/2024
B
03/01/2024
1
01/01/2024
C
04/01/2024
1
01/01/2024
D
05/01/2024
2
01/01/2024
A
01/01/2024
2
01/01/2024
A
02/01/2024
2
01/01/2024
A
03/01/2024
2
01/01/2024
A
04/01/2024
2
01/01/2024
A
05/01/2024
1
25/01/2024
A
25/01/2024
1
25/01/2024
A
26/01/2024
1
25/01/2024
A
27/01/2024
1
25/01/2024
A
28/01/2024
1
25/01/2024
A
29/01/2024
55
26/01/2024
A
26/01/2024
55
26/01/2024
D
27/01/2024
55
26/01/2024
D
28/01/2024
As you will see:
ID1 has 10 rows with 2 x different action_dates
ID2 has 5 rows with 1 x action date
ID55 only has 3 rows all with the same action date.
* Note: status and status_date are the variables I want to transpose into adjacent columns (i.e. status1, status_date1, status2, status_date2, status3, status_date3 etc.)
* Note: The same ID can appear more than once - I want these to be treated independently, grouping by the action_date for that ID.
* Note: Some ID's dont always have 5 rows which is why I need the array to be dynamic to ensure the output is consistent. (As displayed in the example below - if the ID only has 3 rows out of the maximum 5 I want it to populate the first 3 columns and leave the last 2 blank.)
This is my desired output:
id
action_date
status1
status_date1
status2
status_date2
status3
status_date3
status4
status_date4
status5
status_date5
1
01/01/2024
A
01/01/2024
A
02/01/2024
B
03/01/2024
C
04/01/2024
D
05/01/2024
2
01/01/2024
A
01/01/2024
A
02/01/2024
A
03/01/2024
A
04/01/2024
A
05/01/2024
1
25/01/2024
A
25/01/2024
A
26/01/2024
A
27/01/2024
A
28/01/2024
A
28/01/2024
55
26/01/2024
A
26/01/2024
D
27/01/2024
D
28/01/2024
This is my starting array code.
data output;
set input;
array status[5] $2. status_1-status_5;
array status_day[5] status_day_1-status_day_5;
format status_day_1-status_day_5 date9.;
do i = 1 to 5;
status[i] = status;
status_day[i] = status_day;
end;
run;
... View more
Hi,
I would like to deduplicate the dataset 'have' with the constraint that for each 'group' there will be an observation for each 'id' and that across ids within 'group' all the 'x' values are different.
My dataset want should be like this:
group
id
x
a
2
1
a
3
2
a
4
3
b
2
1
b
3
3
b
4
4
b
5
2
I would appreciate very much a range of techniques.
thank you very much in advance
... View more
It takes all kinds of minds on a team – people with diverse backgrounds and skill levels – to do amazing things. If you are looking to join a team, let’s find you a group. Or maybe your team needs more hackers. If so, please follow these steps:
STEP 1. Reply to this post with your search criteria. Include the follow details:
“I’m looking for a team.” or “I’m looking for a team member.”
Track name
Skills
Your LinkedIn and/or GitHub profile (if applicable)
Here’s an example:
Interest: I’m looking for a team
Track: Energy
Skills: SAS Viya
Social: https://www.linkedin.com/in/christine-brown-47425316/
STEP 2. Create your replies following this order to maintain consistency in the thread.
STEP 3. Contact a potential new teammate using the SAS Support Communities' private messaging feature to discuss if a team or member is a good fit.
STEP 4. You need to be a member of a team in order to Register.
STEP 5: If you have any edits to your team after you Register, send an email to sashackathon@sas.com. The Event Team needs to know about any changes to your team and members. Also, don’t forget to update your team profile on the SAS Hacker's Hub.
Happy hacking!
... View more