Learn R Programming

sptemExp (version 0.1.4)

rSquared: Coefficient of Determination

Description

A function to calculate the rSquared.

Usage

rSquared(obs, res)

Arguments

obs

A vector of the observed values.

res

A vector of residuals

Value

rsquared value

Examples

Run this code
# NOT RUN {
  obs=runif(400,1,100)
  pre=obs+rnorm(400,5,10)
  res=obs-pre
  rSquared(obs,res)
# }

Run the code above in your browser using DataLab