I want to find ou whether we can predict the number of suicides in a given country, knowing the % of urban population it has.
For that matter I am going to use the following variables from the GapMinder dataset:
- Urban Rate
- Suicides per 100K people
2.- Code used (SAS)
LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly;
DATA new; set mydata.gapminder;
PROC SORT; BY COUNTRY;
PROC CORR; VAR urbanrate suicideper100TH;
RUN;
3.- Results:
| 2 Variables: | urbanrate suicideper100th |
|---|
| Estadísticos simples | |||||||
|---|---|---|---|---|---|---|---|
| Variable | N | Media | Dev std | Suma | Mínimo | Máximo | Etiqueta |
| urbanrate | 203 | 56.76936 | 23.84493 | 11524 | 10.40000 | 100.00000 | urbanrate |
| suicideper100th | 191 | 9.64084 | 6.30018 | 1841 | 0.20145 | 35.75287 | SUICIDEPER100TH |
| Coeficientes de correlación Pearson Prob > |r| suponiendo H0: Rho=0 Número de observaciones | ||
|---|---|---|
| urbanrate | suicideper100th | |
urbanrate
urbanrate
|
1.00000
203
|
-0.13038
0.0761
186
|
suicideper100th
SUICIDEPER100TH
|
-0.13038
0.0761
186
|
1.00000
191
|
4.- Interpretation:
There is almost no linear relation between the Urban Rate of a country and its number of suicides. We cannot make predictions.
Even if the r value was strong enough for us to make predictions, the p value of 0,0761 (higher than 0.05) does not allow us to refuse the null hypothesis which claims there is no relation vetween the variables.
No hay comentarios:
Publicar un comentario