I have data where there are numeric values (can be 0 also)for corresponding weekdays (1=monday, 2=tuesday, 7=sunday etc). I want to find out if my values (say, for temperature for example) depends on a weekday (like bigger values on mondays and smaller on sundays) by different statistical tests. I have simulated data but also measured. How can I test this possible dependence by kruskal-wallis test?
weekday var
1 2.530400e+00
4 8.576923e-09
6 2.530400e+00
1 7.541218e-06
2 2.530400e+00
1 4.360349e+01...
And second thing; By this table, is a weekday or "temperature" my dependent variable and what nature are they (ordinal, categorical..)?
Data:
df <- structure(list(weekday = c(1, 4, 6, 1, 2, 1), var = c(2.5304,
8.576923e-09, 2.5304, 7.541218e-06, 2.5304, 43.60349)), .Names = c("weekday",
"var"), row.names = c(NA, -6L), class = "data.frame")
Without going into the package I tried stats::t.test(df$weekday, df$var)
. Does that look reasonable with the data given in your question?