Bonsoir,

J'ai un soucis avec un code étant celui-ci :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
proc means data=rentastock minimum P1 P5 P10 P25 median P75 P90 P95 P99 maximum; 
var PRODUCTION; 
 
data rentastock;
set rentastock;
if PRODUCTION => minimum and PRODUCTION <= P1
	then CAT='1er centile';
if PRODUCTION => P1 and PRODUCTION <= P5
	then CAT='5e centile';
if PRODUCTION => P5 and PRODUCTION <= P10
	then CAT='10e centile';
if PRODUCTION => P10 and PRODUCTION <= P25
	then CAT='25e centile';
if PRODUCTION => P25 and PRODUCTION <= mean
	then CAT='2e quartile';
if PRODUCTION => mean and PRODUCTION <= P75
	then CAT='3e quartile';
if PRODUCTION => P75 and PRODUCTION <= P90
	then CAT='90e centile';
if PRODUCTION => P90 and PRODUCTION <= P95
	then CAT='95e centile';
if PRODUCTION => P95 and PRODUCTION <= P99
	then CAT='99e centile';
if PRODUCTION => P99 and PRODUCTION <= maximum
	then CAT='dernier centile';
run;
 
proc means data=rentastock sum; 
var PRODUCTION; 
class CAT;
run;
En fait je souhaite fait la somme de la variable Production mais en créant des classes qui sont en fait définies par des centiles: min P1 P5 P10 P25 mean P75 P90 P95 P99 max. Donc je crée les centiles avec une proc means ensuite je forme les groupes voulus et enfin je refais une somme sur ces mêmes catégories;;;
Seulement, en exécutant le code montré ci-dessus SAS m'affiche le message:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
Variable P1 non initialisée
Variable P5 non initialisée
(ainsi de suite)
Any suggestion? je prends tout!

Merci!

Bonne soirée

REMI