1 /* region: Generated preamble */ 2 /* Make sure the current directory is writable */ 3 data _null_; 4 length rc 4; 5 %let tworkloc="%sysfunc(getoption(work))"; 6 rc=dlgcdir(&tworkloc); 7 run; NOTE: The current working directory is now "/opt/sas/viya/config/var/tmp/compsrv/default/b9feba33-6b6a-46b5-97c4-523722625c69/SAS_workA24900000163_sas-compute-server-d9c 2ae4a-edc1-40a7-a86d-37bb6ac89300-75051". NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 8 9 /* Setup options */ 10 title; 11 footnote; 12 options validvarname=any; 13 options validmemname=extend; 14 options dtreset date number; 15 options device=png; 16 17 /* Setup macro variables */ 18 %let syscc=0; 19 %let _clientapp = %nrquote(%nrstr(SAS Studio)); 20 %let _clientappabbrev = %nrquote(%nrstr(Studio)); 21 %let _clientappversion=2026.03; 22 %let _clientversion=; 23 %let _sasservername=&SYSHOSTNAME; 24 %let _sashostname=&SYSHOSTNAME; 25 %let _sasprogramfilehost=&SYSHOSTNAME; 26 %let _clientuserid = %nrquote(%nrstr(adriana.vieira@iesb.edu.br)); 27 %let _clientusername = %nrquote(%nrstr(adriana.vieira@iesb.edu.br)); 28 %let clientmachine = %nrquote(%nrstr()); 29 %let _clientmachine = %nrquote(%nrstr()); 30 %let _clientmode = %nrquote(%nrstr(viya)); 31 %let sasworklocation="%sysfunc(getoption(work))/"; 32 filename _cwd &sasworklocation; 33 data _null_; 34 call symput('_sasworkingdir',pathname('_cwd')); 35 run; NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 36 filename _cwd; NOTE: Fileref _CWD has been deassigned. 37 %let _sasprogramfile = %nrquote(%nrstr(sascontent:/files/files/71b75531-00ae-49d4-aedd-8f2572a5dcb1)); 38 %let _baseurl = %nrquote(%nrstr(https://vfl-025.engage.sas.com/SASStudio)); 39 %let _execenv = %nrquote(%nrstr(SASStudio)); 40 %symdel _dataout_mime_type _dataout_name _dataout_url _dataout_table / nowarn; 41 %let _sasws_ = %bquote(%sysfunc(getoption(work))); 42 %let _saswstemp_ = %bquote(%sysfunc(getoption(work))); 43 44 /* Detect SAS/Graph and setup graph options */ 45 data _null_; 46 length rc $255; 47 call symput("graphinit",""); 48 call symput("graphterm",""); 49 rc=tslvl('sasxgopt','n'); 50 _error_=0; 51 if (rc^=' ') then do; 52 call symput("graphinit","goptions reset=all gsfname=_gsfname;"); 53 call symput("graphterm","goptions noaccessible;"); 54 end; 55 run; NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 56 data _null_; 57 length rc 4; 58 rc=sysprod("PRODNUM002"); 59 if (rc^=1) then do; 60 call symput("graphinit",""); 61 call symput("graphterm",""); 62 end; 63 run; NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 64 65 /* Setup ODS destinations */ 66 ods _all_ close; 67 %studio_results_directory; 68 filename _htmlout "&_results_prefix_..html"; 69 filename _listout "&_results_prefix_..lst"; 70 filename _gsfname temp; 71 filename _dataout "&_results_prefix_..dat"; 72 ods autonavigate off; 73 ods graphics on; 74 ods html5 (id=web) METATEXT='http-equiv="Content-Security-Policy" content="default-src ''none''; style-src ''unsafe-inline''; 74 ! img-src data: ;"' device=png gpath="&_saswstemp_" path="&_saswstemp_" encoding=utf8 file=_htmlout (title='Results:Resultado 74 ! Amostra Final 325 com peso Clusters por grupo de lotação.sas') style=Light2025 options(bitmap_mode='inline' outline='on' 74 ! svg_mode='inline' css_prefix=".ods_&SYS_COMPUTE_JOB_ID" body_id="div_&SYS_COMPUTE_JOB_ID" ); NOTE: Writing HTML5(WEB) Body file: _HTMLOUT 75 ods listing file=_listout; 76 &graphinit; 77 %studio_initialize_custom_output; 78 /* endregion */ 79 80 /* ===================================================================== 81 1. INICIALIZAÇÃO (SEM RECARREGAR — TABELA JÁ EXISTE NO CASLIB) 82 ===================================================================== */ 83 cas mysess; WARNING: A session with the name MYSESS already exists. 84 caslib _all_ assign; NOTE: A SAS Library associated with a caslib can only reference library member names that conform to SAS Library naming conventions. NOTE: CASLIB ACADEMIC for session MYSESS will be mapped to SAS Library ACADEMIC. NOTE: CASLIB ADML for session MYSESS will be mapped to SAS Library ADML. NOTE: CASLIB CASUSER(adriana.vieira@iesb.edu.br) for session MYSESS will be mapped to SAS Library CASUSER. NOTE: CASLIB CORTEXfr for session MYSESS will be mapped to SAS Library CORTEXFR. NOTE: CASLIB CPML for session MYSESS will be mapped to SAS Library CPML. NOTE: CASLIB CRVA83 for session MYSESS will be mapped to SAS Library CRVA83. NOTE: CASLIB FVVF for session MYSESS will be mapped to SAS Library FVVF. NOTE: CASLIB Formats for session MYSESS will be mapped to SAS Library FORMATS. NOTE: CASLIB GAINDS for session MYSESS will be mapped to SAS Library GAINDS. NOTE: CASLIB GAVA85 for session MYSESS will be mapped to SAS Library GAVA85. NOTE: CASLIB HELPDATA for session MYSESS will be mapped to SAS Library HELPDATA. NOTE: CASLIB INTN for session MYSESS will be mapped to SAS Library INTN. NOTE: CASLIB ModelPerformanceData for session MYSESS will not be mapped to SAS Library ModelPerformanceData. The CASLIB name is not valid for use as a libref. NOTE: CASLIB Models for session MYSESS will be mapped to SAS Library MODELS. NOTE: CASLIB ORVY for session MYSESS will be mapped to SAS Library ORVY. NOTE: CASLIB PIVY for session MYSESS will be mapped to SAS Library PIVY. NOTE: CASLIB POSI for session MYSESS will be mapped to SAS Library POSI. NOTE: CASLIB Public for session MYSESS will be mapped to SAS Library PUBLIC. NOTE: CASLIB ROSI for session MYSESS will be mapped to SAS Library ROSI. NOTE: CASLIB SVSO for session MYSESS will be mapped to SAS Library SVSO. NOTE: CASLIB SVTA for session MYSESS will be mapped to SAS Library SVTA. NOTE: CASLIB Samples for session MYSESS will be mapped to SAS Library SAMPLES. NOTE: CASLIB TSFM for session MYSESS will be mapped to SAS Library TSFM. NOTE: CASLIB TUNDATA for session MYSESS will be mapped to SAS Library TUNDATA. NOTE: CASLIB VBBF for session MYSESS will be mapped to SAS Library VBBF. NOTE: CASLIB VDMO for session MYSESS will be mapped to SAS Library VDMO. NOTE: CASLIB VFSP for session MYSESS will be mapped to SAS Library VFSP. NOTE: CASLIB VISUAL for session MYSESS will be mapped to SAS Library VISUAL. NOTE: CASLIB YVA1 for session MYSESS will be mapped to SAS Library YVA1. NOTE: CASLIB YVA2 for session MYSESS will be mapped to SAS Library YVA2. 85 libname mycas cas caslib="CASUSER"; NOTE: Libref MYCAS was successfully assigned as follows: Engine: CAS Physical Name: aa689d1d-a92e-d442-9020-fa0e772e3552 86 87 data tabela_inferencial_exclusao; 88 set mycas.RESULAMOSTRAFINAL; 89 90 /* A) Tratamento de Idade (P5) */ 91 Idade_Limpa = compress(dequote(strip(P5)), , 'kd'); 92 Idade_Num = input(Idade_Limpa, ?? best12.); 93 94 /* B) Tratamento de Experiência/Tempo de Casa (P7) */ 95 Ano_Limpo = compress(dequote(strip(P7)), , 'kd'); 96 if length(Ano_Limpo) >= 4 then do; 97 Ano_Num = input(substr(Ano_Limpo, 1, 4), ?? best12.); 98 if not missing(Ano_Num) and Ano_Num > 1900 then Experiencia_Anos = 2026 - Ano_Num; 99 else Experiencia_Anos = .; 100 end; 101 else do; 102 Experiencia_Anos = input(Ano_Limpo, ?? best12.); 103 end; 104 105 /* C) Atribuição Rígida dos Pesos Oficiais do PDF */ 106 unidade_id = input(compress(P1, , 'kd'), ?? 8.); 107 select(unidade_id); 108 when(1) peso_amostra = 0.8; 109 when(2) peso_amostra = 1.0; 110 when(3) peso_amostra = 1.1; 111 when(4) peso_amostra = 0.6; 112 when(5) peso_amostra = 1.3; 113 when(6) peso_amostra = .; 114 when(7) peso_amostra = 1.0; 115 when(8) peso_amostra = 0.7; 116 when(9) peso_amostra = 1.1; 117 when(10) peso_amostra = 1.0; 118 when(11) peso_amostra = 1.4; 119 when(12) peso_amostra = 1.0; 120 when(13) peso_amostra = 0.9; 121 when(14) peso_amostra = 1.3; 122 when(15) peso_amostra = 0.6; 123 when(16) peso_amostra = 0.9; 124 when(17) peso_amostra = 1.0; 125 when(18) peso_amostra = 1.1; 126 when(19) peso_amostra = 1.1; 127 when(20) peso_amostra = 1.0; 128 when(21) peso_amostra = 1.0; 129 otherwise peso_amostra = 1.0; 130 end; 131 132 /* D) Conversão das Variáveis Likert (Texto para Número) */ 133 N13 = input(compress(dequote(strip(P13)), , 'kd'), ?? best12.); 134 N14 = input(compress(dequote(strip(P14)), , 'kd'), ?? best12.); 135 N15 = input(compress(dequote(strip(P15)), , 'kd'), ?? best12.); 136 N16 = input(compress(dequote(strip(P16)), , 'kd'), ?? best12.); 137 N17 = input(compress(dequote(strip(P17)), , 'kd'), ?? best12.); 138 N18 = input(compress(dequote(strip(P18)), , 'kd'), ?? best12.); 139 N19 = input(compress(dequote(strip(P19)), , 'kd'), ?? best12.); 140 N20 = input(compress(dequote(strip(P20)), , 'kd'), ?? best12.); 141 N21 = input(compress(dequote(strip(P21)), , 'kd'), ?? best12.); 142 /* >>> NOVO: Bloco 4 — Indicadores Éticos (item único) <<< */ 143 N22 = input(compress(dequote(strip(P22)), , 'kd'), ?? best12.); 144 N23 = input(compress(dequote(strip(P23)), , 'kd'), ?? best12.); 145 N24 = input(compress(dequote(strip(P24)), , 'kd'), ?? best12.); 146 N25 = input(compress(dequote(strip(P25)), , 'kd'), ?? best12.); 147 N26 = input(compress(dequote(strip(P26)), , 'kd'), ?? best12.); 148 N27 = input(compress(dequote(strip(P27)), , 'kd'), ?? best12.); 149 N28 = input(compress(dequote(strip(P28)), , 'kd'), ?? best12.); 150 N29 = input(compress(dequote(strip(P29)), , 'kd'), ?? best12.); 151 N30 = input(compress(dequote(strip(P30)), , 'kd'), ?? best12.); 152 N31 = input(compress(dequote(strip(P31)), , 'kd'), ?? best12.); 153 N32 = input(compress(dequote(strip(P32)), , 'kd'), ?? best12.); 154 N33 = input(compress(dequote(strip(P33)), , 'kd'), ?? best12.); 155 N34 = input(compress(dequote(strip(P34)), , 'kd'), ?? best12.); 156 157 if Idade_Num > 100 or Idade_Num < 18 then Idade_Num = .; 158 if Experiencia_Anos < 0 or Experiencia_Anos > 60 then Experiencia_Anos = .; 159 160 /* Criação dos Construtos Reflexivos Válidos (Blocos 2, 3, 5 e 6) */ 161 Dim_Tecnica = mean(N13, N14, N15, N16, N17); 162 Dim_Comportament = mean(N18, N19, N20, N21); 163 Dim_Informacional= mean(N25, N26, N27, N28); 164 Dim_Ajuste_TTF = mean(N29, N30, N31, N32, N33, N34); 165 /* Bloco 4 NÃO gera construto — itens isolados N22, N23, N24 (α = 0,448) */ 166 167 length P1_Otimizada $60; 168 if P1 in ('Grupo 2 (Gabinetes de Ministros)', 'Grupo 13 (SEGJUD, SETPOESDC, SESDI1, SESDI2, SETR 1-8)', 169 'Grupo 9 (SETIN)', 'Grupo 18 (SEA)', 'Grupo 20 (CSJT)', 'Grupo 1 (GP, GVP. CGC)', 170 'Grupo 17 (SEGPES)', 'Grupo 14 (ASJIP, CDOC, CGEDM, CCADP)', 'Grupo 16 (GDGSET, ASJUR, COCONF, CSESP, CAAD)') 171 then P1_Otimizada = P1; 172 else if P1 in ('Grupo 3 (ASPAR, ARIN, ASPRODEC, OUV)', 'Grupo 4 (SEGP, ACEPRES, ACESI, DIEV)', 'Grupo 10 (SECOM)', 'Grupo 172! 12 (SEGGE)') 173 then P1_Otimizada = 'Macro-Área: Assessorias Estratégicas e Comunicação'; 174 else P1_Otimizada = 'Macro-Área: Secretarias de Apoio Operacional'; 175 run; NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). 91:42 95:40 133:40 134:40 135:40 136:40 137:40 138:40 139:40 140:40 141:40 143:40 144:40 145:40 146:40 147:40 148:40 149:40 150:40 151:40 152:40 153:40 154:40 155:40 NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I. NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 131 at 161:24 131 at 162:24 131 at 163:24 131 at 164:24 NOTE: There were 325 observations read from the data set MYCAS.RESULAMOSTRAFINAL. NOTE: The data set WORK.TABELA_INFERENCIAL_EXCLUSAO has 325 observations and 75 variables. NOTE: DATA statement used (Total process time): real time 0.04 seconds cpu time 0.03 seconds 176 177 /* ===================================================================== 178 2. MATRIZ DE CORRELAÇÃO DE SPEARMAN PONDERADA (4 CONSTRUTOS + 3 ITENS ÉTICOS) 179 ===================================================================== */ 180 title "Análise Inferencial: Conversão dos Construtos e Itens Éticos em Postos"; 181 proc rank data=tabela_inferencial_exclusao out=mycas.postos_puros; 182 var Dim_Tecnica Dim_Informacional Dim_Comportament Dim_Ajuste_TTF N22 N23 N24; 183 ranks rank_Tecnica rank_Informacional rank_Comportament rank_Ajuste 184 rank_Etico_Declaracao rank_Etico_Transparencia rank_Etico_Responsabilidade; 185 run; NOTE: The data set MYCAS.POSTOS_PUROS has 325 observations and 82 variables. NOTE: PROCEDURE RANK used (Total process time): real time 0.04 seconds cpu time 0.03 seconds 186 187 title "Análise Inferencial: Matriz de Spearman Ponderada (Construtos + Itens Éticos Isolados)"; 188 proc corr data=mycas.postos_puros pearson; 189 var rank_Tecnica rank_Informacional rank_Comportament rank_Ajuste 190 rank_Etico_Declaracao rank_Etico_Transparencia rank_Etico_Responsabilidade; 191 weight peso_amostra; 192 run; NOTE: The PROCEDURE CORR printed pages 8-9. NOTE: PROCEDURE CORR used (Total process time): real time 0.07 seconds cpu time 0.07 seconds 193 title; 194 195 /* ===================================================================== 196 3. ANÁLISE DE CLUSTERS (4 DIMENSÕES) E PERFILAMENTO COM ITENS ÉTICOS 197 ===================================================================== */ 198 proc fastclus data=tabela_inferencial_exclusao maxclusters=3 out=mycas.clusters_puros noprint; 199 var Dim_Tecnica Dim_Informacional Dim_Comportament Dim_Ajuste_TTF; 200 run; NOTE: The data set MYCAS.CLUSTERS_PUROS has 325 observations and 77 variables. NOTE: PROCEDURE FASTCLUS used (Total process time): real time 0.04 seconds cpu time 0.03 seconds 201 202 title "Análise Inferencial: Distribuição Proporcional dos Clusters Ponderados"; 203 proc freq data=mycas.clusters_puros; 204 tables cluster / nocum; 205 weight peso_amostra; 206 run; NOTE: There were 325 observations read from the data set MYCAS.CLUSTERS_PUROS. NOTE: The PROCEDURE FREQ printed page 10. NOTE: PROCEDURE FREQ used (Total process time): real time 0.04 seconds cpu time 0.03 seconds 207 208 title "Perfilamento dos Clusters Ponderados (Dimensões + Itens Éticos Isolados)"; 209 proc means data=mycas.clusters_puros mean; 210 class cluster; 211 var Dim_Tecnica Dim_Informacional Dim_Comportament Dim_Ajuste_TTF N22 N23 N24; 212 weight peso_amostra; 213 run; NOTE: The CAS aggregation.aggregate action will be used to perform the initial summarization. NOTE: The PROCEDURE MEANS printed page 11. NOTE: PROCEDURE MEANS used (Total process time): real time 0.08 seconds cpu time 0.03 seconds 214 title; 215 /* ===================================================================== 216 4. CLUSTERS POR LOTAÇÃO (CRUZAMENTO COM A MACRO-ÁREA) 217 ===================================================================== */ 218 219 /* 4.1 Distribuição dos 3 clusters DENTRO de cada Macro-Área de lotação */ 220 title "Distribuição dos 3 Perfis por Macro-Área de Lotação (Ponderada)"; 221 proc freq data=mycas.clusters_puros; 222 tables cluster * P1_Otimizada / nocol nopercent; 223 weight peso_amostra; 224 run; NOTE: There were 325 observations read from the data set MYCAS.CLUSTERS_PUROS. NOTE: The PROCEDURE FREQ printed page 12. NOTE: PROCEDURE FREQ used (Total process time): real time 0.05 seconds cpu time 0.05 seconds 225 title; 226 227 /* 4.2 Perfil médio das dimensões e itens éticos por Cluster × Macro-Área */ 228 title "Perfil dos 3 Perfis por Cluster e Macro-Área de Lotação (Ponderado)"; 229 proc means data=mycas.clusters_puros mean; 230 class cluster P1_Otimizada; 231 var Dim_Tecnica Dim_Informacional Dim_Comportament Dim_Ajuste_TTF N22 N23 N24; 232 weight peso_amostra; 233 run; NOTE: The CAS aggregation.aggregate action will be used to perform the initial summarization. NOTE: The PROCEDURE MEANS printed pages 13-17. NOTE: PROCEDURE MEANS used (Total process time): real time 0.13 seconds cpu time 0.09 seconds 234 title; 235 236 /* region: Generated postamble */ 237 /* Error recovery */ 238 %studio_error_recovery; 239 /* Close ODS destinations */ 240 &graphterm; ;*';*";*/;run;quit; 241 quit;run; 242 ods html5 (id=web) close; 243 ods listing close; 244 %if %sysfunc(fileref(_gsfname)) lt 0 %then %do; 245 filename _gsfname clear; NOTE: Fileref _GSFNAME has been deassigned. 246 %end; 247 %studio_capture_custom_output; 248 /* endregion */ 249