Cuadros
Nos basaremos en el paquete de obtención de cuadros y tablas.
Escala básica
source ('C:/Users/rober/Documents/R/ts.brb.test/Rprofile.site' )
==========================
Motor Barbwin8 cargado
==========================
source ('C:/Users/rober/Documents/R/ts.brb.test/functions.R' )
data <- read_spss ("data/datos_para_cuadro (funcion).sav" )
# si hay ponderación
#data <- weight_by(data, P16)
Absolutos
digits= NULL
var_lab (data[c ("M_1A_1" ,"M_2A_1" ,"M_3A_1" ,"M_4A_1" ,"M_5A_1" ,"M_6A_1" ,"M_7A_1" ,"M_99A_1" )]) <- 'Percepción'
var_lab (data[c ("M_1B_1" ,"M_2B_1" ,"M_3B_1" ,"M_4B_1" ,"M_5B_1" ,"M_6B_1" ,"M_7B_1" ,"M_99B_1" )]) <- 'Conocimiento'
data %>%
tab_cols (total (label= '|' )) %>%
tab_weight (1 ) %>%
tab_cells (mrset_p ("M_1A_" ),mrset_p ("M_1B_" )) %>%
tab_stat_cases (label= 'texto1' , total_row_position = 'none' ) %>%
tab_cells (mrset_p ("M_2A_" ),mrset_p ("M_2B_" )) %>%
tab_stat_cases (label= 'texto2' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_3A_" ),mrset_p ("M_3B_" )) %>%
tab_stat_cases (label= 'texto3' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_4A_" ),mrset_p ("M_4B_" )) %>%
tab_stat_cases (label= 'texto4' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_5A_" ),mrset_p ("M_5B_" )) %>%
tab_stat_cases (label= 'texto5' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_6A_" ),mrset_p ("M_6B_" )) %>%
tab_stat_cases (label= 'texto6' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_7A_" ),mrset_p ("M_7B_" )) %>%
tab_stat_cases (label= 'texto7' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_99A_" ),mrset_p ("M_99B_" )) %>%
tab_stat_cases (label= 'texto99' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_pivot ()
Percepción
Tacto
79
15
77
91
10
42
3
3
Colores
60
46
54
62
6
28
8
4
Sudoración
51
24
88
59
19
20
10
6
Flexibilidad
51
16
91
58
10
17
13
12
Elasticidad
72
22
83
95
10
37
1
5
Ergonomía
45
22
85
51
11
21
13
13
Materiales
65
24
76
87
12
27
3
4
Notoriedad
66
20
69
82
6
30
19
3
Imagen
59
15
73
72
8
27
3
9
Competitividad
56
25
75
65
6
29
7
13
Especifidad
60
11
76
64
6
57
2
7
Alta tecnología
79
12
65
101
15
18
6
2
Modernidad
49
11
113
68
9
13
3
5
Conocimiento
A1
91
25
97
115
13
59
20
5
A2
79
50
89
92
13
41
9
12
A3
73
42
111
90
23
38
16
17
A4
73
24
113
83
13
62
15
17
A5
99
26
94
125
20
44
7
6
A6
72
28
132
86
17
29
15
17
A7
65
24
76
87
12
27
3
4
Porcentajes
digits= NULL
var_lab (data[c ("M_1A_1" ,"M_2A_1" ,"M_3A_1" ,"M_4A_1" ,"M_5A_1" ,"M_6A_1" ,"M_7A_1" ,"M_99A_1" )]) <- 'Percepción'
var_lab (data[c ("M_1B_1" ,"M_2B_1" ,"M_3B_1" ,"M_4B_1" ,"M_5B_1" ,"M_6B_1" ,"M_7B_1" ,"M_99B_1" )]) <- 'Conocimiento'
data %>%
tab_cols (total (label= '|' )) %>%
tab_weight (1 ) %>%
tab_cells (mrset_p ("M_1A_" ),mrset_p ("M_1B_" )) %>%
tab_stat_cpct (label= 'texto1' , total_row_position = 'none' ) %>%
tab_cells (mrset_p ("M_2A_" ),mrset_p ("M_2B_" )) %>%
tab_stat_cpct (label= 'texto2' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_3A_" ),mrset_p ("M_3B_" )) %>%
tab_stat_cpct (label= 'texto3' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_4A_" ),mrset_p ("M_4B_" )) %>%
tab_stat_cpct (label= 'texto4' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_5A_" ),mrset_p ("M_5B_" )) %>%
tab_stat_cpct (label= 'texto5' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_6A_" ),mrset_p ("M_6B_" )) %>%
tab_stat_cpct (label= 'texto6' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_7A_" ),mrset_p ("M_7B_" )) %>%
tab_stat_cpct (label= 'texto7' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_99A_" ),mrset_p ("M_99B_" )) %>%
tab_stat_cpct (label= 'texto99' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_pivot ()
Percepción
Tacto
57.7
18.1
47.0
58.7
20.4
40.0
7.5
7.0
Colores
43.8
55.4
32.9
40.0
12.2
26.7
20.0
9.3
Sudoración
37.2
28.9
53.7
38.1
38.8
19.0
25.0
14.0
Flexibilidad
37.2
19.3
55.5
37.4
20.4
16.2
32.5
27.9
Elasticidad
52.6
26.5
50.6
61.3
20.4
35.2
2.5
11.6
Ergonomía
32.8
26.5
51.8
32.9
22.4
20.0
32.5
30.2
Materiales
47.4
28.9
46.3
56.1
24.5
25.7
7.5
9.3
Notoriedad
48.2
24.1
42.1
52.9
12.2
28.6
47.5
7.0
Imagen
43.1
18.1
44.5
46.5
16.3
25.7
7.5
20.9
Competitividad
40.9
30.1
45.7
41.9
12.2
27.6
17.5
30.2
Especifidad
43.8
13.3
46.3
41.3
12.2
54.3
5.0
16.3
Alta tecnología
57.7
14.5
39.6
65.2
30.6
17.1
15.0
4.7
Modernidad
35.8
13.3
68.9
43.9
18.4
12.4
7.5
11.6
Conocimiento
A1
66.4
30.1
59.1
74.2
26.5
56.2
50.0
11.6
A2
57.7
60.2
54.3
59.4
26.5
39.0
22.5
27.9
A3
53.3
50.6
67.7
58.1
46.9
36.2
40.0
39.5
A4
53.3
28.9
68.9
53.5
26.5
59.0
37.5
39.5
A5
72.3
31.3
57.3
80.6
40.8
41.9
17.5
14.0
A6
52.6
33.7
80.5
55.5
34.7
27.6
37.5
39.5
A7
47.4
28.9
46.3
56.1
24.5
25.7
7.5
9.3
Porcentajes sobre respuestas
digits= NULL
var_lab (data[c ("M_1A_1" ,"M_2A_1" ,"M_3A_1" ,"M_4A_1" ,"M_5A_1" ,"M_6A_1" ,"M_7A_1" ,"M_99A_1" )]) <- 'Percepción'
var_lab (data[c ("M_1B_1" ,"M_2B_1" ,"M_3B_1" ,"M_4B_1" ,"M_5B_1" ,"M_6B_1" ,"M_7B_1" ,"M_99B_1" )]) <- 'Conocimiento'
data %>%
tab_cols (total (label= '|' )) %>%
tab_weight (1 ) %>%
tab_cells (mrset_p ("M_1A_" ),mrset_p ("M_1B_" )) %>%
tab_stat_cpct_responses (label= 'texto1' , total_row_position = 'none' ) %>%
tab_cells (mrset_p ("M_2A_" ),mrset_p ("M_2B_" )) %>%
tab_stat_cpct_responses (label= 'texto2' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_3A_" ),mrset_p ("M_3B_" )) %>%
tab_stat_cpct_responses (label= 'texto3' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_4A_" ),mrset_p ("M_4B_" )) %>%
tab_stat_cpct_responses (label= 'texto4' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_5A_" ),mrset_p ("M_5B_" )) %>%
tab_stat_cpct_responses (label= 'texto5' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_6A_" ),mrset_p ("M_6B_" )) %>%
tab_stat_cpct_responses (label= 'texto6' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_7A_" ),mrset_p ("M_7B_" )) %>%
tab_stat_cpct_responses (label= 'texto7' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_99A_" ),mrset_p ("M_99B_" )) %>%
tab_stat_cpct_responses (label= 'texto99' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_pivot ()
Percepción
Tacto
10.0
5.7
7.5
9.5
7.8
11.5
3.3
3.5
Colores
7.6
17.5
5.3
6.5
4.7
7.7
8.8
4.7
Sudoración
6.4
9.1
8.6
6.2
14.8
5.5
11.0
7.0
Flexibilidad
6.4
6.1
8.9
6.1
7.8
4.6
14.3
14.0
Elasticidad
9.1
8.4
8.1
9.9
7.8
10.1
1.1
5.8
Ergonomía
5.7
8.4
8.3
5.3
8.6
5.7
14.3
15.1
Materiales
8.2
9.1
7.4
9.1
9.4
7.4
3.3
4.7
Notoriedad
8.3
7.6
6.7
8.6
4.7
8.2
20.9
3.5
Imagen
7.4
5.7
7.1
7.5
6.2
7.4
3.3
10.5
Competitividad
7.1
9.5
7.3
6.8
4.7
7.9
7.7
15.1
Especifidad
7.6
4.2
7.4
6.7
4.7
15.6
2.2
8.1
Alta tecnología
10.0
4.6
6.3
10.6
11.7
4.9
6.6
2.3
Modernidad
6.2
4.2
11.0
7.1
7.0
3.6
3.3
5.8
Conocimiento
A1
16.5
11.4
13.6
17.0
11.7
19.7
23.5
6.4
A2
14.3
22.8
12.5
13.6
11.7
13.7
10.6
15.4
A3
13.2
19.2
15.6
13.3
20.7
12.7
18.8
21.8
A4
13.2
11.0
15.9
12.2
11.7
20.7
17.6
21.8
A5
17.9
11.9
13.2
18.4
18.0
14.7
8.2
7.7
A6
13.0
12.8
18.5
12.7
15.3
9.7
17.6
21.8
A7
11.8
11.0
10.7
12.8
10.8
9.0
3.5
5.1
Absolutos + Porcentaje
digits= NULL
var_lab (data[c ("M_1A_1" ,"M_2A_1" ,"M_3A_1" ,"M_4A_1" ,"M_5A_1" ,"M_6A_1" ,"M_7A_1" ,"M_99A_1" )]) <- 'Percepción'
var_lab (data[c ("M_1B_1" ,"M_2B_1" ,"M_3B_1" ,"M_4B_1" ,"M_5B_1" ,"M_6B_1" ,"M_7B_1" ,"M_99B_1" )]) <- 'Conocimiento'
data %>%
tab_cols (total (label= '|' )) %>%
tab_weight (1 ) %>%
tab_cells (mrset_p ("M_1A_" ),mrset_p ("M_1B_" )) %>%
tab_stat_cases (label= 'texto1' , total_row_position = 'none' ) %>%
tab_stat_cpct (label= 'texto1' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_2A_" ),mrset_p ("M_2B_" )) %>%
tab_stat_cases (label= 'texto2' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct (label= 'texto2' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_3A_" ),mrset_p ("M_3B_" )) %>%
tab_stat_cases (label= 'texto3' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct (label= 'texto3' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_4A_" ),mrset_p ("M_4B_" )) %>%
tab_stat_cases (label= 'texto4' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct (label= 'texto4' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_5A_" ),mrset_p ("M_5B_" )) %>%
tab_stat_cases (label= 'texto5' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct (label= 'texto5' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_6A_" ),mrset_p ("M_6B_" )) %>%
tab_stat_cases (label= 'texto6' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct (label= 'texto6' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_7A_" ),mrset_p ("M_7B_" )) %>%
tab_stat_cases (label= 'texto7' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct (label= 'texto7' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_99A_" ),mrset_p ("M_99B_" )) %>%
tab_stat_cases (label= 'texto99' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct (label= 'texto99' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_pivot ()
Percepción
Tacto
79
57.7
15
18.1
77
47.0
91
58.7
10
20.4
42
40.0
3
7.5
3
7.0
Colores
60
43.8
46
55.4
54
32.9
62
40.0
6
12.2
28
26.7
8
20.0
4
9.3
Sudoración
51
37.2
24
28.9
88
53.7
59
38.1
19
38.8
20
19.0
10
25.0
6
14.0
Flexibilidad
51
37.2
16
19.3
91
55.5
58
37.4
10
20.4
17
16.2
13
32.5
12
27.9
Elasticidad
72
52.6
22
26.5
83
50.6
95
61.3
10
20.4
37
35.2
1
2.5
5
11.6
Ergonomía
45
32.8
22
26.5
85
51.8
51
32.9
11
22.4
21
20.0
13
32.5
13
30.2
Materiales
65
47.4
24
28.9
76
46.3
87
56.1
12
24.5
27
25.7
3
7.5
4
9.3
Notoriedad
66
48.2
20
24.1
69
42.1
82
52.9
6
12.2
30
28.6
19
47.5
3
7.0
Imagen
59
43.1
15
18.1
73
44.5
72
46.5
8
16.3
27
25.7
3
7.5
9
20.9
Competitividad
56
40.9
25
30.1
75
45.7
65
41.9
6
12.2
29
27.6
7
17.5
13
30.2
Especifidad
60
43.8
11
13.3
76
46.3
64
41.3
6
12.2
57
54.3
2
5.0
7
16.3
Alta tecnología
79
57.7
12
14.5
65
39.6
101
65.2
15
30.6
18
17.1
6
15.0
2
4.7
Modernidad
49
35.8
11
13.3
113
68.9
68
43.9
9
18.4
13
12.4
3
7.5
5
11.6
Conocimiento
A1
91
66.4
25
30.1
97
59.1
115
74.2
13
26.5
59
56.2
20
50.0
5
11.6
A2
79
57.7
50
60.2
89
54.3
92
59.4
13
26.5
41
39.0
9
22.5
12
27.9
A3
73
53.3
42
50.6
111
67.7
90
58.1
23
46.9
38
36.2
16
40.0
17
39.5
A4
73
53.3
24
28.9
113
68.9
83
53.5
13
26.5
62
59.0
15
37.5
17
39.5
A5
99
72.3
26
31.3
94
57.3
125
80.6
20
40.8
44
41.9
7
17.5
6
14.0
A6
72
52.6
28
33.7
132
80.5
86
55.5
17
34.7
29
27.6
15
37.5
17
39.5
A7
65
47.4
24
28.9
76
46.3
87
56.1
12
24.5
27
25.7
3
7.5
4
9.3
Absolutos + Porcentaje respuestas
digits= NULL
var_lab (data[c ("M_1A_1" ,"M_2A_1" ,"M_3A_1" ,"M_4A_1" ,"M_5A_1" ,"M_6A_1" ,"M_7A_1" ,"M_99A_1" )]) <- 'Percepción'
var_lab (data[c ("M_1B_1" ,"M_2B_1" ,"M_3B_1" ,"M_4B_1" ,"M_5B_1" ,"M_6B_1" ,"M_7B_1" ,"M_99B_1" )]) <- 'Conocimiento'
data %>%
tab_cols (total (label= '|' )) %>%
tab_weight (1 ) %>%
tab_cells (mrset_p ("M_1A_" ),mrset_p ("M_1B_" )) %>%
tab_stat_cases (label= 'texto1' , total_row_position = 'none' ) %>%
tab_stat_cpct_responses (label= '%rsp.' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_2A_" ),mrset_p ("M_2B_" )) %>%
tab_stat_cases (label= 'texto2' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct_responses (label= '%rsp.' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_3A_" ),mrset_p ("M_3B_" )) %>%
tab_stat_cases (label= 'texto3' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct_responses (label= '%rsp.' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_4A_" ),mrset_p ("M_4B_" )) %>%
tab_stat_cases (label= 'texto4' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct_responses (label= '%rsp.' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_5A_" ),mrset_p ("M_5B_" )) %>%
tab_stat_cases (label= 'texto5' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct_responses (label= '%rsp.' ,total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_6A_" ),mrset_p ("M_6B_" )) %>%
tab_stat_cases (label= 'texto6' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct_responses (label= '%rsp.' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_7A_" ),mrset_p ("M_7B_" )) %>%
tab_stat_cases (label= 'texto7' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct_responses (label= '%rsp.' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_cells (mrset_p ("M_99A_" ),mrset_p ("M_99B_" )) %>%
tab_stat_cases (label= 'texto99' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_stat_cpct_responses (label= '%rsp.' , total_row_position = 'none' ) %>%
tab_last_hstack () %>%
tab_pivot ()
Percepción
Tacto
79
10.0
15
5.7
77
7.5
91
9.5
10
7.8
42
11.5
3
3.3
3
3.5
Colores
60
7.6
46
17.5
54
5.3
62
6.5
6
4.7
28
7.7
8
8.8
4
4.7
Sudoración
51
6.4
24
9.1
88
8.6
59
6.2
19
14.8
20
5.5
10
11.0
6
7.0
Flexibilidad
51
6.4
16
6.1
91
8.9
58
6.1
10
7.8
17
4.6
13
14.3
12
14.0
Elasticidad
72
9.1
22
8.4
83
8.1
95
9.9
10
7.8
37
10.1
1
1.1
5
5.8
Ergonomía
45
5.7
22
8.4
85
8.3
51
5.3
11
8.6
21
5.7
13
14.3
13
15.1
Materiales
65
8.2
24
9.1
76
7.4
87
9.1
12
9.4
27
7.4
3
3.3
4
4.7
Notoriedad
66
8.3
20
7.6
69
6.7
82
8.6
6
4.7
30
8.2
19
20.9
3
3.5
Imagen
59
7.4
15
5.7
73
7.1
72
7.5
8
6.2
27
7.4
3
3.3
9
10.5
Competitividad
56
7.1
25
9.5
75
7.3
65
6.8
6
4.7
29
7.9
7
7.7
13
15.1
Especifidad
60
7.6
11
4.2
76
7.4
64
6.7
6
4.7
57
15.6
2
2.2
7
8.1
Alta tecnología
79
10.0
12
4.6
65
6.3
101
10.6
15
11.7
18
4.9
6
6.6
2
2.3
Modernidad
49
6.2
11
4.2
113
11.0
68
7.1
9
7.0
13
3.6
3
3.3
5
5.8
Conocimiento
A1
91
16.5
25
11.4
97
13.6
115
17.0
13
11.7
59
19.7
20
23.5
5
6.4
A2
79
14.3
50
22.8
89
12.5
92
13.6
13
11.7
41
13.7
9
10.6
12
15.4
A3
73
13.2
42
19.2
111
15.6
90
13.3
23
20.7
38
12.7
16
18.8
17
21.8
A4
73
13.2
24
11.0
113
15.9
83
12.2
13
11.7
62
20.7
15
17.6
17
21.8
A5
99
17.9
26
11.9
94
13.2
125
18.4
20
18.0
44
14.7
7
8.2
6
7.7
A6
72
13.0
28
12.8
132
18.5
86
12.7
17
15.3
29
9.7
15
17.6
17
21.8
A7
65
11.8
24
11.0
76
10.7
87
12.8
12
10.8
27
9.0
3
3.5
4
5.1