From 7e1986267c55a4331288f251496973688c2a6766 Mon Sep 17 00:00:00 2001 From: sime94 Date: Sat, 28 Dec 2024 16:20:09 +0100 Subject: [PATCH] add AIC and BIC for first model --- src/main/R/badWeather/regressionAnalysis.R | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/R/badWeather/regressionAnalysis.R b/src/main/R/badWeather/regressionAnalysis.R index 01a9d88..8cd1dc4 100644 --- a/src/main/R/badWeather/regressionAnalysis.R +++ b/src/main/R/badWeather/regressionAnalysis.R @@ -682,10 +682,25 @@ summary(test) confint(test) ############################################## first regression models for different time periods #################################################################################################### -first_model_general <- lm(noRides ~ tavg+trend,data = result_data) +first_model_general <- lm(noRides ~ wdir+tmax+tavg+tmin+snow+trend, data = result_data) summary(first_model_general) confint(first_model_general) +AIC_first_model_general <- AIC(first_model_general) +BIC_first_model_general <- BIC(first_model_general) + +first_model_tavg <- lm(noRides ~ wdir+tavg+snow+trend, data = result_data) +summary(first_model_tavg) + +first_model_tmax <- lm(noRides ~ wdir+tmax+snow+trend, data = result_data) +summary(first_model_tmax) + +first_model_tmin <- lm(noRides ~ wdir+tmin+snow+trend, data = result_data) +summary(first_model_tmin) + + + + first_model_ioki <- lm(noRides ~ tavg+trend,data = ioki_data) summary(first_model_ioki) confint(first_model_ioki)