I have been reading about the
r value and its purpose, however the below image has altered my understanding(that r value represents Direction and Strength and also Slope Angle).
The Wikipedia image below proves that Slope Angle cannot be determined from the
r value at all.
My problem is that I cannot seem to produce a scatter plot with a perfect
r value 1.0 other than in a 45° angled slope.
Here is some R code to illustrate.
a = 1:100 b = 401:500 plot(b,a) plot(b,a)
Image of result of code on the left and my goal on the right.
How can I produce a 10° slope with 4 value 1.0?
@kjetil b halvorsen When you say "you must use a plot with equal scales on x and y-axes!"
Both variables a,b contain exactly 100 components, wouldn't that create equal axes?
@whuber Doing what you advised produces a slope with a 45° angle, see below
slope = .82 a = 1:100 b = slope * a plot(a,b)