Question
Greetings Could someone, please, help with this R programming exercise. Thank you Using `cor()` compute correclation coefficients for height vs. earn age vs. earn ed
Greetings
Could someone, please, help with this R programming exercise. Thank you
Using `cor()` compute correclation coefficients for
height vs. earn
age vs. earn
ed vs. earn
Spurious correlation
The following is data on US spending on science, space, and technology in millions of today's dollars
and Suicides by hanging strangulation and suffocation for the years 1999 to 2009
Compute the correlation between these variables
tech_spending <- c(18079, 18594, 19753, 20734, 20831, 23029, 23597, 23584, 25525, 27731, 29449)
suicides <- c(5427, 5688, 6198, 6462, 6635, 7336, 7248, 7491, 8161, 8578, 9000)
Height data:
earn | height | sex | ed | age | race |
50000 | 74.42444 | male | 16 | 45 | white |
60000 | 65.53754 | female | 16 | 58 | white |
30000 | 63.6292 | female | 16 | 29 | white |
50000 | 63.10856 | female | 16 | 91 | other |
51000 | 63.40248 | female | 17 | 39 | white |
9000 | 64.39951 | female | 15 | 26 | white |
29000 | 61.65633 | female | 12 | 49 | white |
32000 | 72.69854 | male | 17 | 46 | white |
2000 | 72.03947 | male | 15 | 21 | hispanic |
27000 | 72.23493 | male | 12 | 26 | white |
6530 | 69.51215 | male | 16 | 65 | white |
30000 | 68.03161 | male | 11 | 34 | white |
12000 | 67.55693 | male | 12 | 27 | white |
12000 | 65.43059 | female | 12 | 51 | white |
22000 | 65.66285 | female | 16 | 35 | white |
17000 | 67.75877 | male | 12 | 58 | white |
40000 | 68.35184 | female | 14 | 29 | white |
44000 | 69.60957 | male | 13 | 44 | white |
7000 | 64.18457 | female | 12 | 55 | black |
53000 | 73.07461 | male | 13 | 35 | black |
5000 | 62.37553 | female | 13 | 51 | white |
14000 | 63.02393 | female | 14 | 21 | white |
5500 | 67.2299 | male | 14 | 22 | white |
40000 | 65.55111 | female | 12 | 41 | white |
34000 | 72.07965 | male | 12 | 45 | white |
10000 | 63.09113 | female | 12 | 35 | black |
27000 | 64.32355 | female | 16 | 60 | white |
50000 | 71.64285 | male | 16 | 38 | white |
41000 | 76.79309 | male | 16 | 33 | white |
15000 | 63.89391 | female | 14 | 25 | white |
25000 | 63.80262 | female | 12 | 33 | white |
75000 | 71.59223 | male | 17 | 39 | white |
27000 | 67.52196 | male | 17 | 31 | white |
12000 | 64.39435 | female | 12 | 26 | white |
7500 | 61.17822 | female | 14 | 78 | white |
30000 | 66.98388 | female | 14 | 31 | black |
21000 | 65.31646 | female | 12 | 57 | white |
27000 | 63.57419 | female | 14 | 26 | white |
3000 | 66.611 | female | 15 | 65 | white |
25000 | 64.91176 | female | 12 | 30 | white |
24000 | 64.78968 | female | 12 | 41 | white |
32000 | 66.93769 | female | 18 | 29 | white |
10000 | 68.17281 | female | 17 | 30 | white |
11000 | 60.45066 | female | 12 | 21 | hispanic |
18700 | 64.79325 | female | 13 | 32 | white |
20000 | 61.81492 | female | 12 | 29 | white |
3500 | 71.57215 | male | 10 | 18 | white |
13000 | 67.31441 | male | 8 | 56 | black |
25000 | 69.89987 | male | 12 | 65 | white |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started