rSquared {micEcon}R Documentation

Calculate R squared value

Description

Calculate R squared value.

Usage

rSquared( y, resid )

Arguments

y vector of endogenous variables
resid vector of residuals

Author(s)

Arne Henningsen

Examples

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

[Package micEcon version 0.5-14 Index]