06-30-2021
ash
Fluorite | Level 6
Member since
06-23-2011
- 6 Posts
- 3 Likes Given
- 0 Solutions
- 0 Likes Received
About
Last name now Fowlkes, but can't change here without hassle.
-
Latest posts by ash
Subject Views Posted 735 03-26-2020 12:52 PM 744 03-26-2020 12:39 PM 2453 04-06-2015 12:41 PM 923 02-24-2011 12:30 PM 1193 01-24-2011 10:03 AM 1215 01-21-2011 03:42 PM -
Activity Feed for ash
- Posted Re: using last. for observations with multiple on SAS Programming. 03-26-2020 12:52 PM
- Liked Re: using last. for observations with multiple for novinosrin. 03-26-2020 12:49 PM
- Posted using last. for observations with multiple on SAS Programming. 03-26-2020 12:39 PM
- Liked Re: character date to Date9. for Fugue. 05-23-2016 01:58 PM
- Liked Re: Create ID variable for multiple records per individual for ballardw. 04-06-2015 12:47 PM
- Posted Create ID variable for multiple records per individual on SAS Data Management. 04-06-2015 12:41 PM
- Posted making color assignments permanent in stacked graphics on Graphics Programming. 02-24-2011 12:30 PM
- Posted Re: gbarline with stacked bars and a percentage for the line on Graphics Programming. 01-24-2011 10:03 AM
- Posted gbarline with stacked bars and a percentage for the line on Graphics Programming. 01-21-2011 03:42 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 3 1
03-26-2020
12:52 PM
Thank you. That's probably the only combo I hadn't tried, since I thought that would have kept only the last visitdate (from my example, I would think that would have kept: ID = 1 and only the last row of the last visitdate (12/25/2019).
... View more
03-26-2020
12:39 PM
I have a dataset of patient records with multiple rows per visit date and multiple visit dates. I used first. to create a cumulative sum of costs across the rows for a single date and a record counter. Now I want to drop all rows except the one with my cumulative sum (the highest counter) for each patient and visit date.
Example data:
idno
visitdate
pay
cumupay
counter
1
5/5/2019
5
5
1
1
5/5/2019
5
10
2
1
10/31/2019
5
5
1
1
12/25/2019
5
5
1
1
12/25/2019
5
10
2
1
12/25/2019
5
15
3
2
7/4/2019
7
7
1
2
7/4/2019
7
14
2
3
9/2/2019
9
9
1
... View more
04-06-2015
12:41 PM
Hi, I have an id variable, and I have multiple observations per id (patients with multiple specimens). I want to create a new ID variable containing 1 for the first ID, 2 for the second, and so on. I have a date variable. This in preparation for transposing the dataset to have one row per patient with columns for the variables related to specimen 1, specimen 2, etc. Open to ideas of better ways to do this, but I was going to use the new ID variable as my prefix.
... View more
02-24-2011
12:30 PM
I'm using pattern assignments in gchart for observations in 6 categories - I have patterns 1-6. I'm also creating multiple charts at once using the "by" statement (one chart for each group). If a group does not have an observation in a category, then SAS reassigns what category a pattern refers to, and thus changes the color dynamic for the whole graph. So, I'm making 50 graphs (one for each state), and I'm getting ~50 different color schemes for categories. Is there a way to assign the colors to the categories, non-dynamically?
Code:
pattern1 v=solid c=yellow;
pattern2 v=solid c=stlg;
pattern3 v=solid c=steel;
pattern4 v=solid c=LIPB;
pattern5 v=solid c=orange;
pattern6 v=solid c=lightgray;
proc gbarline data=six;
by state;
bar graphcode/ sumvar= pcr_count
subgroup = subtype
clipref
width=5
FRAME MIDPOINTS=5 TO 58 BY 1
type=sum
coutline=black
raxis=axis1
maxis=axis2
legend=legend1;
plot / sumvar=flupos type=mean
axis=axis3
legend=legend2;
run;quit;
... View more
01-24-2011
10:03 AM
Hi!
FLUPOS is a 0/1 variable.
The "where ili=1 and pcr_count=1" statement should allow the denominator to be the number of records in the dataset. This would then plot the % flu positive, with stacked bars showing the tally of the flu positives by subgroup (the types of flu).
In the code below, my bar statement says "bar graphcode/sumvar=ili", which gives me a stack that inclues flu negatives as a part of the bar. However, I want the plot line to be limited only to the flu positives out of the # ili (oy, I hope that made sense).
I'm using SAS 9.2
... View more
01-21-2011
03:42 PM
I am trying to insert a calculation into the plot statement in gbarline. I have code that successfully produces my stacked bars, but I cannot get the line to be a percentage. The datafile contains one record per observation, which seems to be necessary for the bars to stack correctly. Is it possible for the line to be a calculation?
I've tried putting the calculation into the plot stmt: plot / type=percent (flupos/pcr_count)
I've also tried putting the necessary denominator in the where statement as below.
proc gbarline data=six;
bar graphcode/ sumvar= ili
subgroup = subtype
clipref
width=5
FRAME MIDPOINTS=6 TO 58 BY 1
type=sum
coutline=black
raxis=axis1
maxis=axis2
legend=legend1;
plot flupos / type=percent
axis=axis3
legend=legend2;
where ili=1 and pcr_count=1;
format subtype subtype. graphcode graphcode.;
run;quit;
... View more