Eksempler på R-squared værdier
xxxxxxxxxx
# data indskrives
logColi=c(2.80,2.86,2.88,2.86,3.07,3.10,3.19,3.33,3.32,3.32,3.41,3.26,
3.28,3.35,3.34,3.33,3.40,3.47,3.44,3.50,3.36,3.61,3.65,3.75,3.72,
3.72,3.74,3.79,3.84,3.84,3.82,3.88,3.85,3.81,3.87,3.87,3.88,3.98,
3.97,4.02,4.04,4.06,4.23,4.52,4.28,4.35,4.43,4.52,4.36,4.68,4.67,
4.88,4.98,4.88,5.02,5.14,5.23,5.24,5.35,5.33,5.31,5.39,5.43,5.44,
5.48,5.51,5.53,5.56,5.64,5.66,5.73,5.79,5.90,5.83,5.86,5.85,5.79,
5.77,5.99,6.11,6.33,6.32,6.34,6.19,6.29,6.74,6.89,5.49,5.50,5.52,
5.55,5.79,5.79,4.00,3.79,3.32,3.38,2.83)
logGlu=c(-1.05,-1.04,-1.10,-1.21,-1.28,-1.57,-0.56,-0.54,-0.59,-0.68,
-0.77,-1.12,-1.02,-1.32,-1.28,-1.16,-1.10,-1.07,-0.99,-0.85,-1.05,
-1.06,-0.78,-0.82,-0.90,-1.06,-1.17,-1.04,-1.03,-1.07,-0.26,-0.32,
-0.54,-0.61,-0.68,-0.75,-0.80,-0.79,-0.65,-0.71,-0.66,-0.59,-0.79,
-0.86,-0.53,-0.34,-0.33,-0.40,-0.10,0.32,0.21,0.04,-0.29,0.37,
0.45,0.56,0.14,0.89,0.78,0.89,1.01,1.08,1.22,1.10,1.15,1.08,1.04,
0.97,1.12,1.35,1.49,1.28,1.09,1.06,1.00,0.83,0.77,0.64,1.56,1.73,
1.79,1.42,1.22,1.03,1.01,1.83,1.53,1.12,1.06,1.06,0.99,0.67,0.70,
-0.75,-1.08,-1.06,-1.01,-1.05)
afstand=c(0.032,0.034,0.214,0.263,0.275,0.275,0.450,0.500,0.500,
0.630,0.800,0.900,0.900,0.900,0.900,1.000,1.100,1.100,1.400,1.700,
2.000,2.000,2.000,2.000)
hast=c(170,290,-130,-70,-185,-220,200,290,270,200,300,-30,650,150,
500,920,450,500,500,960,500,850,800,1090)
c("Opstart er gennemført: logColi, logGlu, afstand og hast er indskrevet")
xxxxxxxxxx
# Opstart ovenfor skal være kørt
par(mfrow=c(1,2))
# data med logGlu og logColi
lmUD=lm(logGlu~logColi)
plot(logColi,logGlu)
abline(lmUD)
text(2.8,1.6,pos=4,labels=round(summary(lmUD)$r.squared,2))
# data med hast og afstand
lmUD=lm(hast~afstand)
plot(afstand,hast)
abline(lmUD)
text(0.03,1010,pos=4,labels=round(summary(lmUD)$r.squared,2))
c("Figur er dannet")