5 Annexes
6 Annexe 1: Moyennes d'habitants par
niveau de dépendance
Niveaux de dépendance
|
Lyon
|
Toulouse
|
Rennes
|
Très forte
|
1053
|
609
|
868
|
Fort
|
2430
|
1828
|
2089
|
Moyenne
|
5383
|
4218
|
4288
|
Faible
|
34904
|
26624
|
21790
|
7 Annexe 2: Pourcentage de population
par niveau de dépendance
Niveaux de dépendance
|
Lyon
|
Toulouse
|
Rennes
|
Très forte
|
8
|
12
|
8
|
Forte
|
14
|
11
|
16
|
Très forte et forte
|
22
|
23
|
24
|
Moyenne
|
10
|
12
|
23
|
Faible
|
68
|
65
|
53
|
Moyenne et faible
|
78
|
77
|
76
|
8 Annexe 3: Méthodologie
détaillée
Les tableaux de données de ce mémoire ont
été produits à l'aide du logiciel SAS 9.1, à partir
de bases de données de recensement et de la base permanente des
équipements. Nous détaillerons ici les calculs effectués,
en prenant l'exemple de ceux réalisés pour l'aire urbaine de
Lyon.
Etape 1: Sélection des communes dans les
départements de l'aire urbaine, et attribution d'un indice de
dépendance automobile.
data a; set bpe2007.bpe07_commerces;
if DEP in ('01','38','42','69');
drop NB_B103 NB_B204 NB_B205 NB_B206 NB_B303 NB_B305 NB_B306
NB_B307 NB_B308 NB_B309 NB_B310 NB_B311 NB_B312;
run;
data b; set bpe2007.bpe07_services;
if DEP in ('01','38','42','69');
drop psdc99 NB_A101 NB_A102 NB_A103 NB_A104 NB_A205 NB_A301
NB_A302 NB_A303 NB_A304 NB_A401 NB_A402 NB_A403 NB_A404 NB_A405
NB_A406 NB_A502 NB_A503 NB_A505 NB_A506 NB_A507;
run;
data c; set bpe2007.bpe07_sante;
if DEP in ('01','38','42','69');
drop psdc99 NB_D202 NB_D203 NB_D204 NB_D205 NB_D206 NB_D207
NB_D208 NB_D209 NB_D210 NB_D211 NB_D212 NB_D213 NB_D231 NB_D232
NB_D233 NB_D234 NB_D235 NB_D236 NB_D237 NB_D238 NB_D239
NB_D240;
run;
data d; set bpe2007.bpe07_ets_sante;
if DEP in ('01','38','42','69');
drop psdc99 NB_D101 NB_D101_NB_LITS NB_D102 NB_D102_NB_LITS
NB_D103 NB_D103_NB_LITS NB_D104 NB_D105 NB_D106 NB_D107
NB_D107_NB_LITS NB_D108 NB_D109 NB_D110 NB_D111 NB_D112 NB_D302
NB_D303 NB_D304 NB_D305 NB_D306;
run;
data e; set bpe2007.au07;
if '01000'<codgeo<'02000' or '38000'<codgeo<'39000'
or '42000'<codgeo<'43000' or '69000'<codgeo<'70000';
run;
proc sort data=a; by CODGEO;
proc sort data=b; by CODGEO;
proc sort data=c; by CODGEO;
proc sort data=d; by CODGEO;
proc sort data=e; by codgeo;
data m; merge a b c d e; by CODGEO;
run;
data bpe2007.class_comm_2007; set m;
nb_b200=nb_b201+nb_b202; nb_b100=nb_b101+nb_b102;
cla07='0';
if nb_b201>0 or nb_b202>0
then cla07='1';
if nb_b101>0 or nb_b102>0
then cla07='2';
if nb_b100>0 and
nb_b203>0 and nb_b301>0 and
nb_b302>0 and nb_b304>0 and
nb_a201>0 and nb_a203>0
and nb_a501>0 and
nb_a504>0 and nb_d201>0 and
nb_d221>0 and nb_d301>0 then
cla07='3';
run;
proc sort
data=bpe2007.class_comm_2007; by cla07; run;
proc freq
data=bpe2007.class_comm_2007; tables cla07; run;
Etape 2: Sélection des communes de l'aire urbaine
data RP06.FD_MIGCOM_LYON_2006_AU; set
RP06.FD_MIGCOM_LYON_2006_AU;
if commune in ('01005','01021','01027','01032','01043','01045',
'01047' ,'01049','01052','01054','01062','01088','01092','01099'
,'01105','01129','01142','01156'
,'01198','01207','01213','01224','01235','01238','01244' , '01248','01249',
'01250','01260','01261','01262','01275','01276',
'01285','01290','01297','01299','01318','01322','01325'
,'01333','01339','01342','01347','01349','01353' ,'01359','01361','01362',
'01366','01371','01376','01378','01382','01390'
,'01398','01418','01423','01424','01427','01434','01443','01446','01449','01450'
,'38010','38011','38015','38026','38035','38048','38067','38081','38083','38085','38087','38097','38102','38109','38136','38138','38144',
'38146','38172','38176','38184','38189','38190','38193','38197'
,'38210','38215','38260','38282','38288','38294','38295','38316' ,'38339',
'38365','38389','38392','38408' ,'38415','38449','38451','38467','38475'
,'38480' ,'38484','38488','38494','38507'
,'38515','38519','38530','38532','38535'
,'38537','38539','38542','38553','38554 ','38557','38558','42083'
,'42307','69003' ,'69004','69005','69008','69009','69010','69017'
,'69020','69021','69022','69024','69026','69027'
,'69028','69029','69030','69031','69032','69033'
,'69034','69039','69040','69042','69043','69044','69046'
,'69047','69048','69049','69050','69051','69052','69055'
,'69056','69057','69059','69063','69067','69068','69069'
,'69071','69072','69075','69076','69078','69080','69081'
,'69083','69085','69086','69087','69088','69089','69090'
,'69091','69094','69096','69097','69100','69106','69111'
,'69112','69113','69116','69117','69118','69119','69121'
,'69122','69123','69125','69126','69127','69131','69133'
,'69134','69136','69138','69140','69141','69142','69143'
,'69144','69146','69148','69149','69152','69153','69154'
,'69163','69166','69168','69170'
,'69171','69173','69175','69176','69177','69179','69180'
,'69184','69190','69191','69194','69195','69199','69202'
,'69203','69204','69205','69207','69208','69212','69213'
,'69216','69219','69221','69222','69227','69228','69230'
,'69231','69233','69234','69236','69237','69239','69241'
,'69244','69245','69249','69250','69252','69255','69256'
,'69259','69260','69266','69268','69269','69270','69271'
,'69272','69273','69275','69276','69277','69278','69279'
,'69280','69281','69282','69283','69284','69285','69286'
,'69287','69288','69289','69290','69291','69292','69293'
,'69294','69295','69296','69297','69298','69299');
run;
Etape 3: Transformation du fichier de recensement:
attribution, pour chaque ménage, de la commune de départ et de
ses caractéristiques (simplifiées). Régressions
logistiques selon deux modèles (ménages aisés et
ménages modestes), afin de déterminer les facteurs expliquants le
déménagement.
data RP06.FD_MIGCOM_LYON_2006_FINAL; set
RP06.FD_MIGCOM_LYON_2006_FINAL;
where lprm='1' and typmr NE 'ZZ';
d=substr(commune,1,2);
dran=substr(dcran,1,2);
/******classes de communes de départ*********/
emig='EA';
if dcran in
('01005','01021','01027','01032','01043','01045','01047','01049','01052','01054','01062','01088','01092','01099','01105',
'01129','01142','01156','01198','01207','01213','01224','01235','01238','01244','01248','01249','01250','01260','01261','01262',
'01275','01276','01285','01290','01297','01299','01318','01322','01325','01333','01339','01342','01347','01349','01353','01359',
'01361','01362','01366','01371','01376','01378','01382','01390','01398','01418','01423','01424','01427','01434','01443','01446',
'01449','01450','38010','38011','38015','38026','38035','38048','38067','38081','38083','38085','38087','38097','38102','38109',
'38136','38138','38144','38146','38172','38176','38184','38189','38190','38193','38197','38210','38215','38260','38282','38288',
'38294','38295','38316','38339','38365','38389','38392','38408','38415','38449','38451','38467','38475','38480','38484','38488',
'38494','38507','38515','38519','38530','38532','38535','38537','38539','38542','38553','38554','38557','38558','42083','42307',
'69003','69004','69005','69008','69009','69010','69017','69020','69021','69022','69024','69026','69027','69028','69029','69030',
'69031','69032','69033','69034','69039','69040','69042','69043','69044','69046','69047','69048','69049','69050','69051','69052',
'69055','69056','69057','69059','69063','69067','69068','69069','69071','69072','69075','69076','69078','69080','69081','69083',
'69085','69086','69087','69088','69089','69090','69091','69094','69096','69097','69100','69106','69111','69112','69113','69116',
'69117','69118','69119','69121','69122','69125','69126','69127','69131','69133','69134','69136','69138','69140','69141',
'69142','69143','69144','69146','69148','69149','69152','69153','69154','69163','69166','69168','69170','69171','69173','69175',
'69176','69177','69179','69180','69184','69190','69191','69194','69195','69199','69202','69203','69204','69205','69207','69208',
'69212','69213','69216','69219','69221','69222','69227','69228','69230','69231','69233','69234','69236','69237','69239','69241',
'69244','69245','69249','69250','69252','69255','69256','69259','69260','69266','69268','69269','69270','69271','69272','69273',
'69275','69276','69277','69278','69279','69280','69281','69282','69283','69284','69285','69286','69287','69288','69289','69290',
'69291','69292','69293','69294','69295','69296','69297','69298','69299')
then emig='EP';
if dcran in ('69123') then emig='EL';
/******classes de communes de départ*********/
immig='EA';
if commune in
('01005','01021','01027','01032','01043','01045','01047','01049','01052','01054','01062','01088','01092','01099','01105',
'01129','01142','01156','01198','01207','01213','01224','01235','01238','01244','01248','01249','01250','01260','01261','01262',
'01275','01276','01285','01290','01297','01299','01318','01322','01325','01333','01339','01342','01347','01349','01353','01359',
'01361','01362','01366','01371','01376','01378','01382','01390','01398','01418','01423','01424','01427','01434','01443','01446',
'01449','01450','38010','38011','38015','38026','38035','38048','38067','38081','38083','38085','38087','38097','38102','38109',
'38136','38138','38144','38146','38172','38176','38184','38189','38190','38193','38197','38210','38215','38260','38282','38288',
'38294','38295','38316','38339','38365','38389','38392','38408','38415','38449','38451','38467','38475','38480','38484','38488',
'38494','38507','38515','38519','38530','38532','38535','38537','38539','38542','38553','38554','38557','38558','42083','42307',
'69003','69004','69005','69008','69009','69010','69017','69020','69021','69022','69024','69026','69027','69028','69029','69030',
'69031','69032','69033','69034','69039','69040','69042','69043','69044','69046','69047','69048','69049','69050','69051','69052',
'69055','69056','69057','69059','69063','69067','69068','69069','69071','69072','69075','69076','69078','69080','69081','69083',
'69085','69086','69087','69088','69089','69090','69091','69094','69096','69097','69100','69106','69111','69112','69113','69116',
'69117','69118','69119','69121','69122','69125','69126','69127','69131','69133','69134','69136','69138','69140','69141',
'69142','69143','69144','69146','69148','69149','69152','69153','69154','69163','69166','69168','69170','69171','69173','69175',
'69176','69177','69179','69180','69184','69190','69191','69194','69195','69199','69202','69203','69204','69205','69207','69208',
'69212','69213','69216','69219','69221','69222','69227','69228','69230','69231','69233','69234','69236','69237','69239','69241',
'69244','69245','69249','69250','69252','69255','69256','69259','69260','69266','69268','69269','69270','69271','69272','69273',
'69275','69276','69277','69278','69279','69280','69281','69282','69283','69284','69285','69286','69287','69288','69289','69290',
'69291','69292','69293','69294','69295','69296','69297','69298','69299')
then immig='EP';
if commune in ('69123') then immig='EL';
/*********variable origine***********/
origine='AU'; if dcran in
('01005','01021','01027','01032','01043','01045','01047','01049','01052','01054','01062','01088','01092','01099','01105',
'01129','01142','01156','01198','01207','01213','01224','01235','01238','01244','01248','01249','01250','01260','01261','01262',
'01275','01276','01285','01290','01297','01299','01318','01322','01325','01333','01339','01342','01347','01349','01353','01359',
'01361','01362','01366','01371','01376','01378','01382','01390','01398','01418','01423','01424','01427','01434','01443','01446',
'01449','01450','38010','38011','38015','38026','38035','38048','38067','38081','38083','38085','38087','38097','38102','38109',
'38136','38138','38144','38146','38172','38176','38184','38189','38190','38193','38197','38210','38215','38260','38282','38288',
'38294','38295','38316','38339','38365','38389','38392','38408','38415','38449','38451','38467','38475','38480','38484','38488',
'38494','38507','38515','38519','38530','38532','38535','38537','38539','38542','38553','38554','38557','38558','42083','42307',
'69003','69004','69005','69008','69009','69010','69017','69020','69021','69022','69024','69026','69027','69028','69029','69030',
'69031','69032','69033','69034','69039','69040','69042','69043','69044','69046','69047','69048','69049','69050','69051','69052',
'69055','69056','69057','69059','69063','69067','69068','69069','69071','69072','69075','69076','69078','69080','69081','69083',
'69085','69086','69087','69088','69089','69090','69091','69094','69096','69097','69100','69106','69111','69112','69113','69116',
'69117','69118','69119','69121','69122','69125','69126','69127','69131','69133','69134','69136','69138','69140','69141',
'69142','69143','69144','69146','69148','69149','69152','69153','69154','69163','69166','69168','69170','69171','69173','69175',
'69176','69177','69179','69180','69184','69190','69191','69194','69195','69199','69202','69203','69204','69205','69207','69208',
'69212','69213','69216','69219','69221','69222','69227','69228','69230','69231','69233','69234','69236','69237','69239','69241',
'69244','69245','69249','69250','69252','69255','69256','69259','69260','69266','69268','69269','69270','69271','69272','69273',
'69275','69276','69277','69278','69279','69280','69281','69282','69283','69284','69285','69286','69287','69288','69289','69290',
'69291','69292','69293','69294','69295','69296','69297','69298','69299')
then origine='PL';
if dcran in ('69123') then origine='LY'; if iran='1' then
origine='AA';
if iran='2' then origine='CO';
if diplm<'15' then diplm='01'; if diplm='16' then
diplm='15';
if typmr='12' then typmr='11'; if typmr='32' then typmr='31'; if
typmr='43' then typmr='42';
if iran>'3' then iran='3';
/****simplifications diverses****/
/*statut d'occupation*/if stocd>'30' then stocd='30';
/*type de logement*/if typl>'3' then typl='3';
/*type d'activite*/if tact>'13' then tact='13';
/*nbr de personnes*/if nperr>'5' then nperr='5';
/*type de ménage*/if typmr='2' then typmr='1';
/*PCS*/if csm in ('3','4','5','6') then cs3='a'; if csm in ('7')
then cs3='r'; if csm in ('8') then cs3='i';
/*diplome*/if diplm<'5' then diplm=1; if
diplm='5' then diplm='6';
/*lieu de naissance*/if INAI>'3' then INAI='3';
/*année d'emménagement*/if ANEMC>'4' then
ANEMC='4';
/*********simplification age du ménage***********/
if agemen8 in ('00','15') then agemen8='20';
if agemen8 in ('65','80') then agemen8='55';
/****creation d'une variable qui distingue les
célibataires des couples modestes et aises*****/
if typmr in ('11','12') and csm in ('3','4','5','6') then
typo_men='1';
if csm in ('3','4','5','6') and typmr in ('31','32') then
typo_men='2';
if csm in ('5','6') and typmr in ('41','42','43','44') then
typo_men='3';
if csm in ('3','4') and typmr in ('41','42','43','44') then
typo_men='4';
/******trajectoires résidentielles*******/
/******immigration détaillée********/
if claran07='0' and cla07='0' and iran>'2' then
mig_det='E0';
if claran07>'0' and cla07='0' then mig_det='D0';
if claran07<'1' and cla07='1' then mig_det='M1';
if claran07='1' and cla07='1' and iran>'2' then
mig_det='E1';
if claran07>'1' and cla07='1' then mig_det='D1';
if claran07<'2' and cla07='2' then mig_det='M2';
if claran07='2' and cla07='2' and iran>'2' then
mig_det='E2';
if claran07>'2' and cla07='2' then mig_det='D2';
if claran07<'3' and cla07='3' then mig_det='M3';
if claran07='3' and cla07='3' and iran>'2' then
mig_det='E3';
if claran07=' ' then mig_det='AU';
if dcran='69123' then mig_det='PA';
/*********immigration condensée********/
if mig_det='E0' or mig_det='E1' or mig_det='E2' or mig_det='E3'
then mig='E';
if mig_det='M1' or mig_det='M2' or mig_det='M3' then mig='M';
if mig_det='D0' or mig_det='D1' or mig_det='D2' then mig='D';
if mig_det='AU' then mig='A';
if mig_det='LY' then mig='L';
/********niveaux franchis*********/
if mig='A' then niv_f='AU'; if mig='E' then niv_f='EE';
if claran07='1' and cla07='0' then niv_f='D1';
if claran07='2' and cla07='1' then niv_f='D1';
if claran07='3' and cla07='2' then niv_f='D1';
if mig='L' and cla07='3' then niv_f='D1';
if claran07='2' and cla07='0' then niv_f='D2';
if claran07='3' and cla07='1' then niv_f='D2';
if mig='L' and cla07='2' then niv_f='D2';
if claran07='3' and cla07='0' then niv_f='D3';
if mig='L' and cla07<'2' then niv_f='D3';
if claran07='0' and cla07='1' then niv_f='M1';
if claran07='1' and cla07='2' then niv_f='M1';
if claran07='2' and cla07='3' then niv_f='M1';
if claran07='0' and cla07='2' then niv_f='M2';
if claran07='1' and cla07='3' then niv_f='M2';
if claran07='0' and cla07='3' then niv_f='M2';
/********niveaux franchis emigrations*********/
if claran07='0' and cla07>'0' then e_niv='M';
if claran07='1' and cla07>'1' then e_niv='M';
if claran07='2' and cla07>'2' then e_niv='M';
if claran07='1' and cla07<'1' then e_niv='D';
if claran07='2' and cla07<'2' then e_niv='D';
if claran07='3' and cla07<'3' then e_niv='D';
if immig='EP' then e_niv='L';
if immig='EA' then e_niv='A';
if claran07=cla07 then e_niv='E';
/********niveaux franchis*********/
if claran07='1' and cla07='0' then e_det='D1';
if claran07='2' and cla07='1' then e_det='D1';
if claran07='3' and cla07='2' then e_det='D1';
if claran07='2' and cla07='0' then e_det='D2';
if claran07='3' and cla07='1' then e_det='D2';
if claran07='3' and cla07='0' then e_det='D2';
if claran07='0' and cla07='1' then e_det='M1';
if claran07='1' and cla07='2' then e_det='M1';
if claran07='2' and cla07='3' then e_det='M1';
if claran07='0' and cla07='2' then e_det='M2';
if claran07='1' and cla07='3' then e_det='M2';
if claran07='0' and cla07='3' then e_det='M2';
if claran07=cla07 then e_det='EE';
if immig='EP' then e_det='LY';
if immig='EA' then e_det='AU';
run;
/*dans ce programme on fait des régressions logistiques
pour voir qui a tendance à faire quel type de trajectoires
résidentielles
C'est le fichier le plus utilisé pour faire les sorties de
la communication pour MSFS*/
/*creation de variables binaires*/
data a; set RP06.FD_MIGCOM_LYON_2006_FINAL;
where cs1 in ('3','4','5','6') and emig='EP';
/*nb demenagements et pop totale*/ dem=0; if
iran='3' then dem=1; nb=1;
/*decomposition cat_men*/LI=0;
WO=0;
if cs1 in ('5','6') then LI=1; if cs1 in
('3','4') then WO=1;
if cs1 in ('5','6') then cat_men=0; if cs1 in
('3','4') then cat_men=1;
/*cat_men demenageant*/CLm=0;
LIm=0; WOm=0;
if LI=1 and dem=1 then
LIm=1;
if WO=1 and dem=1 then
WOm=1;
/*statut d'occupation*/if stocd>'22' then stocd='23';
/*statut d'occupation*/
prop=0; loca=0;
loch=0;
if stocd='10' then prop=1; if stocd='21' then
loca=1;
if stocd='22' then loch=1;
propli=0; locali=0;
lochli=0;
if stocd='10' and LI=1 then
propli=1; if stocd='21' and LI=1 then
locali=1;
if stocd='22' and LI=1 then
lochli=1;
AU=0; LY=0;
DE=0; EG=0; MO=0;
if e_niv='A' then AU=1; if e_niv='L' then
PA=1; if e_niv='D' then DE=1; if e_niv='E'
then EG=1;
if e_niv='M' then MO=1; MM=0;
if MO=1 or PA=1 then MM=1;
run;
run;
/*on fait une petite boucle pour avoir des pourcentages de
ménages et de logement dans les communes étudiées*/
proc summary data=a; var LI WO
prop loca loch propli locali lochli;
class commune; output out=e sum=; run;
data e; set e; if commune=' ' then delete;
if LI=. and WO=. then delete;
pLI=LI/(LI+WO)*100;
pWO=WO/(LI+WO)*100;
pprop=prop/(prop+loca+loch)*100;
ploca=loca/(prop+loca+loch)*100;
ploch=loch/(prop+loca+loch)*100;
ppropli=propli/(propli+locali+lochli)*100;
plocali=locali/(propli+locali+lochli)*100;
plochli=lochli/(propli+locali+lochli)*100;
keep commune pLI pWO pprop ploca ploch ppropLI plocaLI
plochLI;
run;
/*et on fusionne ce nouveau fichier*/
proc sort data=a; by commune;
proc sort data=e; by commune;
run;
data c; merge a e; by commune; if
dem=. then delete; *if pLIm=0 or pLIm=100 or pLIm=. then
delete;
*if dciranm=' ' then delete; run;
proc sort data=c; by dem;
run;
proc freq data=c; *weight
IPONDI;
where stocd NE '23' and NES5 NE 'ES'; tables claran07 AGEMEN8
NPERR stocd NES5 CS1 NES5*CS1 ANEMC INAI TYPL; run;
/********************/ods html file='C:\Documents and
Settings\Thema.SYLVAIN\Mes
documents\MaximeW\Résultats\SAS\logistique_lyon.xls';/********************/
proc logistic data=c
DESCENDING;
where stocd NE '23' and NES5 NE 'ES' and CS1 in ('3','4') and
typl NE '3';
*freq IPONDI;
class dem claran07 AGEMEN8 NPERR cat_men stocd(ref='10') NES5 CS1
ANEMC INAI TYPL/ param=ref;
model dem /*e_niv*/= /* cat_men*/ claran07 AGEMEN8 NPERR stocd
NES5 CS1 /*ANEMC*/ INAI TYPL/*link=glogit*/ ;
*output out=out predprobs = I;
*output out=g predicted=probest;
run;
proc logistic data=c
DESCENDING;
where stocd NE '23' and NES5 NE 'ES' and CS1 in ('5','6') and
typl NE '3';
*freq IPONDI;
class dem claran07 AGEMEN8 NPERR cat_men stocd(ref='10') NES5 CS1
ANEMC INAI TYPL/ param=ref;
model dem /*e_niv*/= /* cat_men*/ claran07 AGEMEN8 NPERR stocd
NES5 CS1 /*ANEMC*/ INAI TYPL/*link=glogit*/ ;
*output out=out predprobs = I;
*output out=g predicted=probest;
run;
/*************************/ods html close;
run;/*************************/
/********************/ods html file='C:\Documents and
Settings\Thema.SYLVAIN\Mes
documents\MaximeW\Résultats\SAS\logistique_lyon.xls';/********************/
proc logistic data=c
DESCENDING;
where LI=1 and stocd NE '23' and NES5 NE 'ES'
and typl NE '3';
*freq IPONDI;
class dem(ref='0') claran07 AGEMEN8 NPERR stocd(ref='10') NES5
CS1 ANEMC INAI TYPL(ref='1')/ param=ref;
model dem /*e_niv*/= /* cat_men*/ claran07 AGEMEN8 NPERR stocd
NES5 CS1 ANEMC INAI TYPL/*link=glogit*/ ;
*output out=out predprobs = I;
*output out=g predicted=probest;
run;
proc logistic data=c
DESCENDING;
where WO=1 and stocd NE '23' and NES5 NE 'ES'
and typl NE '3';
*freq IPONDI;
class dem(ref='0') claran07 AGEMEN8 NPERR stocd(ref='10') NES5
CS1 ANEMC INAI TYPL(ref='1')/ param=ref;
model dem /*e_niv*/= /* cat_men*/ claran07 AGEMEN8 NPERR stocd
NES5 CS1 ANEMC INAI TYPL/*link=glogit*/ ;
*output out=out predprobs = I;
*output out=g predicted=probest;
run;
/*************************/ods html close;
run;/*************************/
proc logistic data=c
DESCENDING;
where dem=1 and stocd NE '23' and NES5 NE 'ES'
and typl NE '3';
*freq IPONDI;
class MM claran07 AGEMEN8 NPERR stocd(ref='10') NES5 CS1 ANEMC
INAI TYPL(ref='1')/ param=ref;
model MO=/* cat_men claran07*/ AGEMEN8 NPERR stocd NES5 LI ANEMC
INAI TYPL/*link=glogit*/ ;
*output out=out predprobs = I;
*output out=g predicted=probest;
run;
Etape 4: Préparation à la deuxième
régression, afin de voir les profils des migrants pour chaque
destination.
data cla07.communes_lyon_au; set
cla07.communes_lyon_au;
keep cla07 commune;
run;
data cla07.lyon_final; set cla07.lyon_final;
keep dcran commune;
run;
data cla07.communes_lyon_au_2; set
cla07.communes_lyon_au_2; rename commune=dcran cla07=claran07;
run;
proc sort
data=CLA07.COMMUNES_lyon_au_2; by dcran; run;
data cla07.lyon_final_2; merge
cla07.communes_lyon_au_2 cla07.lyon_final; by dcran; run;
proc sort
data=CLA07.COMMUNES_lyon_au; by commune; run;
proc sort
data=CLA07.lyon_final_2; by commune; run;
data cla07.lyon_final_3; set cla07.lyon_final_3;
difference=cla07-claran07; run;
Etape 5: Création de variables binaires, puis
régression logistique.
data cla07.lyon_final_3; set
cla07.lyon_final_3;
if dcran=commune then delete;
if difference='.' then delete;
run;
data cla07.lyon_final_3; set
cla07.lyon_final_3;
if commune in ('69123') then centre='1';
if commune in
('01005','01021','01027','01032','01043','01045','01047','01049','01052','01054','01062','01088','01092','01099','01105',
'01129','01142','01156','01198','01207','01213','01224','01235','01238','01244','01248','01249','01250','01260','01261','01262',
'01275','01276','01285','01290','01297','01299','01318','01322','01325','01333','01339','01342','01347','01349','01353','01359',
'01361','01362','01366','01371','01376','01378','01382','01390','01398','01418','01423','01424','01427','01434','01443','01446',
'01449','01450','38010','38011','38015','38026','38035','38048','38067','38081','38083','38085','38087','38097','38102','38109',
'38136','38138','38144','38146','38172','38176','38184','38189','38190','38193','38197','38210','38215','38260','38282','38288',
'38294','38295','38316','38339','38365','38389','38392','38408','38415','38449','38451','38467','38475','38480','38484','38488',
'38494','38507','38515','38519','38530','38532','38535','38537','38539','38542','38553','38554','38557','38558','42083','42307',
'69003','69004','69005','69008','69009','69010','69017','69020','69021','69022','69024','69026','69027','69028','69029','69030',
'69031','69032','69033','69034','69039','69040','69042','69043','69044','69046','69047','69048','69049','69050','69051','69052',
'69055','69056','69057','69059','69063','69067','69068','69069','69071','69072','69075','69076','69078','69080','69081','69083',
'69085','69086','69087','69088','69089','69090','69091','69094','69096','69097','69100','69106','69111','69112','69113','69116',
'69117','69118','69119','69121','69122','69125','69126','69127','69131','69133','69134','69136','69138','69140','69141',
'69142','69143','69144','69146','69148','69149','69152','69153','69154','69163','69166','69168','69170','69171','69173','69175',
'69176','69177','69179','69180','69184','69190','69191','69194','69195','69199','69202','69203','69204','69205','69207','69208',
'69212','69213','69216','69219','69221','69222','69227','69228','69230','69231','69233','69234','69236','69237','69239','69241',
'69244','69245','69249','69250','69252','69255','69256','69259','69260','69266','69268','69269','69270','69271','69272','69273',
'69275','69276','69277','69278','69279','69280','69281','69282','69283','69284','69285','69286','69287','69288','69289','69290',
'69291','69292','69293','69294','69295','69296','69297','69298','69299')
then centre='0';
run;
data cla07.lyon_final_3; set
cla07.lyon_final_3;
if difference in ('-3','-2','-1') then M='1';
if difference in ('0','1','2','3') then M='0';
run;
data cla07.lyon_final_3; set
cla07.lyon_final_3;
if difference in ('0') then E='1';
if difference in ('-3','-2','-1','1','2','3') then E='0';
run;
data cla07.lyon_final_3; set
cla07.lyon_final_3;
if difference in ('3','2','1') and centre='0' then D='1';
if difference in ('0','-1','-2','-3') then D='0';
run;
data rp06.fd_migcom_lyon_2006_final; set
rp06.fd_migcom_lyon_2006_final;
if nperr>'5' then nperr='5';
if agemen8 in ('00','15') then agemen8='20';
if agemen8 in ('65','80') then agemen8='55';
if csm in ('5','6') then modeste=1;
if csm in ('3','4') then modeste=0;
run;
data rp06.fd_migcom_lyon_2006_final; set
rp06.fd_migcom_lyon_2006_final;
keep commune nperr agemen8 modeste;
run;
proc sort
data=rp06.fd_migcom_lyon_2006_final; by commune; run;
proc sort
data=cla07.lyon_final_3; by commune; run;
data cla07.lyon_final_3; merge
cla07.lyon_final_3 rp06.fd_migcom_lyon_2006_final; by commune;
run;
data cla07.lyon_final_3; set
cla07.lyon_final_3;
keep claran07 dcran commune cla07 difference centre m e d nperr
agemen8 modeste;
run;
ods html file='C:\Documents and Settings\Thema.SYLVAIN\Mes
documents\MaximeW\Résultats\SAS\resultat_lyon.xls';
proc logistic
data=reg2505.lyon_final_3 DESCENDING;
class agemen8 nperr modeste / param=ref;
model m = agemen8 nperr modeste ;
run;
ods html close; run;
|
|