Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

micEcon (version 0.1-7)

rSquared: Calculate R squared value

Description

Calculate R squared value.

Usage

rSquared( y, resid )

Arguments

y
vector of endogenous variables
resid
vector of residuals

Examples

Run this code
data( Blanciforti86 )
   reg <- lm( wFood1 ~ pFood1 + xFood, Blanciforti86 )
   rSquared( Blanciforti86$wFood1, reg$residuals )
   summary( reg )$r.squared  # returns the same value

Run the code above in your browser using DataLab