Rsquared {tslars}R Documentation

Compute $R^2$

Description

Function that returns an Rsquared of a linear OLS regression without intercept.

Usage

Rsquared(x, y)

Arguments

x the matrix of predictors
y the vector of the response

Value

The $R^2$ of regression y on x.

Author(s)

Sarah Gelper

Examples


y <- rnorm(100)
x <- matrix(rnorm(300),ncol=3)
Rsq <- Rsquared(x,y)

[Package tslars version 1.0 Index]