Concerning rangestat from SSC

Hi,

I am looking for a way to combine rangestat with a percentile function. In the dataset below, my goal is by firm for each date to get the value of the 94%-percentile of all previous observations of the variable "value". I know that it is possible to get the median with the rangestat function, but is it also possible to combine rangestat function with a specific percentile?

Thanks a lot in advance and regards
Marian Appel-Graham


Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int date str1 firm byte value
21915 "A"  1
21916 "A"  2
21917 "A"  3
21918 "A"  4
21919 "A"  5
21920 "A"  6
21921 "A"  7
21922 "A"  8
21923 "A"  9
21924 "A" 10
21925 "A" 11
21926 "A" 12
21927 "A" 13
21928 "A" 14
21929 "A" 15
21930 "A" 16
21931 "A" 17
21932 "A" 18
21933 "A" 19
21934 "A" 20
21935 "A" 21
21936 "A" 22
21937 "A" 23
21938 "A" 24
21939 "A" 25
21940 "A" 26
21941 "A" 27
21942 "A" 28
21943 "A" 29
21944 "A" 30
21945 "A" 31
21946 "A" 32
21947 "A" 33
21948 "A" 34
21949 "A" 35
21950 "A" 36
21951 "A" 37
21952 "A" 38
21953 "A" 39
21954 "A" 40
21955 "A" 41
21956 "A" 42
21957 "A" 43
21958 "A" 44
21959 "A" 45
21960 "A" 46
21961 "A" 47
21962 "A" 48
21963 "A" 49
21915 "B"  2
21916 "B"  4
21917 "B"  6
21918 "B"  8
21919 "B" 10
21920 "B" 12
21921 "B" 14
21922 "B" 16
21923 "B" 18
21924 "B" 20
21925 "B" 22
21926 "B" 24
21927 "B" 26
21928 "B" 28
21929 "B" 30
21930 "B" 32
21931 "B" 34
21932 "B" 36
21933 "B" 38
21934 "B" 40
21935 "B" 42
21936 "B" 44
21937 "B" 46
21938 "B" 48
21939 "B" 50
21940 "B" 52
21941 "B" 54
21942 "B" 56
21943 "B" 58
21944 "B" 60
21945 "B" 62
21946 "B" 64
21947 "B" 66
21948 "B" 68
21949 "B" 70
21950 "B" 72
21951 "B" 74
21952 "B" 76
21953 "B" 78
21954 "B" 80
21955 "B" 82
21956 "B" 84
21957 "B" 86
21958 "B" 88
21959 "B" 90
21960 "B" 92
21961 "B" 94
21962 "B" 96
21963 "B" 98
end
format %tdnn/dd/CCYY date