09-01-2015
neq1337
Calcite | Level 5
Member since
12-08-2012
- 5 Posts
- 0 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by neq1337
Subject Views Posted 934 12-29-2012 11:55 AM 984 12-29-2012 10:09 AM 2290 12-08-2012 03:32 PM 2290 12-08-2012 03:10 PM 2414 12-08-2012 02:01 PM -
Activity Feed for neq1337
- Posted Re: Dividing sum of boolean by number of obs in a period on SAS Procedures. 12-29-2012 11:55 AM
- Posted Dividing sum of boolean by number of obs in a period on SAS Procedures. 12-29-2012 10:09 AM
- Posted Re: Finding maximum value in a column within a subset/group on SAS Programming. 12-08-2012 03:32 PM
- Posted Re: Finding maximum value in a column within a subset/group on SAS Programming. 12-08-2012 03:10 PM
- Posted Finding maximum value in a column within a subset/group on SAS Programming. 12-08-2012 02:01 PM
12-29-2012
11:55 AM
Thanks. I tried this before, but somehow I didn't notice that I have to apply "percent" format and I thought the figures are wrong .
... View more
12-29-2012
10:09 AM
I have a problem with quite a simple proc step. proc tabulate data=some_data; class time; var boolean1; table time, n boolean Time Number of obs in a given time (n) sum of boolean variable What i want 1 100 10 (10/100)*100% 2 200 50 (50/200)*100% 3 300 60 (60/300)*100% 4 400 80 (80/400)*100% ... .. ... But actually, I want to get the percent of the sum of boolean variable over a number of observations in a given period. I tried boolean*rowpctn, different denominators for pctn<>, but none of this worked. Could you please help me?
... View more
12-08-2012
03:32 PM
Thank you for prompt response, it works perfectly.
... View more
12-08-2012
03:10 PM
You are right, this is not obvious, but that is the way I want them to be (it makes sense in the original dataset). max3_value=4 is OK, as it is a max(2,3,4).
... View more
12-08-2012
02:01 PM
Hello, I have a data similar to the one below, but without the max3_value column. This is the one I would like to find, but I do not know how. max3_value takes the last 3 values of the value column (within a group of person) and finds the maximum value of them. Of course, if it is the first or the second observation, it outputs a missing value. For example: max3_value=10 in period 3 for person A is calculated as a max(10,5,3). I thought of transposing the data with lagged values, but still I do not know how calculate it within groups of person. I would kindly appreciate any help. person period value max3_value A 1 10 . A 2 5 . A 3 3 10 A 4 5 5 A 5 2 5 A 6 3 5 A 7 4 4 A 8 14 14 B 1 6 . B 2 5 . B 3 1 6 B 4 1 4 B 5 4 4
... View more