Skip to main content
1-Visitor
March 31, 2012
Question

This is probably a simple fix. Simple linear regression

I don't understand why I'm getting an error for r^2. It should =1. If I change the name to rsquared, rsquared= just prints out a vector. Once I fix that, will the graph finally plot?

I attached that data file in case you need it.

2 replies

12-Amethyst
March 31, 2012

Your problem is mainly with vectorizing, do not vectoirze arguments of functions that operate on vectors.

You cannot use r^2 directly as a variable, us rsquared or the Chemistry notation.

Please check the r^2, not sure that is waht you want

Translate
24-Ruby IV
April 2, 2012

To use record "r^2" for the variable you need to use the keyboard shortcut "ctrl + shift + j" and "ctrl + shift + k":

Pic_1.png

Translate