rmse: #' Intercept, slope of the linear model fit and Shapiro-Wilk...

Description Usage Arguments Value

View source: R/fun_eval_performance.R

Description

#' Intercept, slope of the linear model fit and Shapiro-Wilk normality test of the residuals #' #' @param x vector of x values #' @param y vector of y values #' #' @return the intercept and slope of the linear fit and p value of Shapiro-Wilk normality test #' @export linFit <- function(x, y) ind <- which(is.infinite(x) | is.infinite(y)) if (length(ind)>0) x <- x[-ind] y <- y[-ind] if((sum(is.na(x)==F) > 3) &&(sum(is.na(y)==F)>3) && (length(unique(x[is.na(x) ==F]))>1)) mod <- lm(y~x) coef <- summary(mod)$coefficients tst <- shapiro.test(mod$residuals)#p-value > 0.05 implies that the distribution of the data is not significantly different from normal distribution out <- c(coef[1,1], coef[2,1], tst$p.value)# intercept and slope else(out <- c(NA,NA,NA)) out RMSE

Usage

1
rmse(val, meas)

Arguments

val

vector of x values

meas

vector of y values

Value

the RMSE of the two vectors


RETURN-project/BenchmarkRecovery documentation built on July 13, 2021, 5:47 p.m.