Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_Simple Regression Y ~ X.wasp
Title produced by softwareSimple Linear Regression
Date of computationMon, 17 Dec 2018 17:40:25 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2018/Dec/17/t1545064932ijzdrfx8ekyh6i5.htm/, Retrieved Thu, 02 May 2024 09:07:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=315917, Retrieved Thu, 02 May 2024 09:07:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact116
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Simple Linear Regression] [SLRM X1 en X9] [2018-12-17 16:40:25] [1fa0b6d83deab05e8f8a52e2846ed0da] [Current]
Feedback Forum

Post a new message
Dataseries X:
62.4 57.6
67.4 64.3
76.1 73.1
67.4 64.2
74.5 72.7
72.6 70.7
60.5 57.3
66.1 63.2
76.5 74.3
76.8 74
77 74.2
71 67.3
74.8 71.5
73.7 71.8
80.5 79.3
71.8 70.4
76.9 75.4
79.9 79.2
65.9 63.3
69.5 67
75.1 73.1
79.6 77.8
75.2 72.4
68 64.2
72.8 68.9
71.5 68.9
78.5 76.1
76.8 74.7
75.3 72.8
76.7 74.9
69.7 66.9
67.8 64.2
77.5 76
82.5 80.7
75.3 72.2
70.9 67.4
76 72.1
73.7 70.8
79.7 77.2
77.8 75.4
73.3 70.5
78.3 76.7
71.9 68.8
67 63
82 80.6
83.7 81.7
74.8 72.2
80 76.9
74.3 69.5
76.8 74
89 87.5
81.9 80.5
76.8 74.8
88.9 89.2
75.8 73.5
75.5 73.9
89.1 89.5
88 87.4
85.9 84.3
89.3 86.9
82.9 79.9
81.2 78.6
90.5 89.4
86.4 85.6
81.8 81
91.3 92.8
73.4 71.4
76.6 75.5
91 92.2
87 86.7
89.7 89.5
90.7 88.4
86.5 83.3
86.6 84.7
98.8 99
84.4 84.1
91.4 92.4
95.7 97.6
78.5 77.4
81.7 81.2
94.3 96.5
98.5 100
95.4 96.2
91.7 90.8
92.8 91.3
90.5 89.4
102.2 102.9
91.8 92.1
95 96.6
102 105
88.9 90
89.6 89.8
97.9 100.4
108.6 111.3
100.8 101.1
95.1 93.9
101 100.4
100.9 102.2
102.5 104.5
105.4 109.1
98.4 101.4
105.3 109.5
96.5 98.6
88.1 88.4
107.9 112.3
107 109.8
92.5 92.5
95.7 94.2
85.2 80.4
85.5 83.5
94.7 94.2
86.2 86
88.8 88.7
93.4 94.8
83.4 81.8
82.9 79.8
96.7 96.6
96.2 95.7
92.8 91.8
92.8 89.2
90 85.5
95.4 93.6
108.3 108.4
96.3 96.6
95 94.8
109 112.2
92 91.6
92.3 91.5
107 109.5
105.5 106.9
105.4 105.9
103.9 103.5
99.2 97.3
102.2 103.2
121.5 125.7
102.3 104.4
110 113
105.9 109.2
91.9 92.4
100 101.4
111.7 115.6
104.9 107.3
103.3 105.1
101.8 102.2
100.8 99.6
104.2 102.6
116.5 122.2
97.9 99.3
100.7 102.8
107 111.7
96.3 98.3
96 98.6
104.5 109
107.4 112.8
102.4 105.5
94.9 94.8
98.8 98.3
96.8 96.5
108.2 109.8
103.8 108
102.3 106.5
107.2 111.5
102 104.2
92.6 93.9
105.2 109.8
113 117
105.6 106.5
101.6 100.1
101.7 101.7
102.7 104
109 112.3
105.5 111.1
103.3 107.7
108.6 114.8
98.2 101.6
90 93
112.4 120.9
111.9 118.7
102.1 106.3
102.4 104.8
101.7 101.8
98.7 100.3
114 120
105.1 111.3
98.3 103.5
110 118.3
96.5 101.8
92.2 97.3
112 120.3
111.4 117.5
107.5 110.9
103.4 105.3
103.5 100.7
107.4 107.8
117.6 119.1
110.2 112.9
104.3 108.4
115.9 123.9
98.9 101.2
101.9 103.6
113.5 119.8
109.5 112.9
110 111.8
114.2 115.6
106.9 104.8
109.2 110.5
124.2 128.8
104.7 108.6
111.9 117.1
119 124.6
102.9 104.2
106.3 108.3




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time9 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=315917&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]9 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=315917&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=315917&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R ServerBig Analytics Cloud Computing Center







Linear Regression Model
Y ~ X
coefficients:
EstimateStd. Errort valuePr(>|t|)
(Intercept)14.2040.58624.2180
X0.8430.006136.2240
- - -
Residual Std. Err. 1.47 on 210 df
Multiple R-sq. 0.989
95% CI Multiple R-sq. [0.985, 0.991]
Adjusted R-sq. 0.989

\begin{tabular}{lllllllll}
\hline
Linear Regression Model \tabularnewline
Y ~ X \tabularnewline
coefficients: &   \tabularnewline
  & Estimate & Std. Error & t value & Pr(>|t|) \tabularnewline
(Intercept) & 14.204 & 0.586 & 24.218 & 0 \tabularnewline
X & 0.843 & 0.006 & 136.224 & 0 \tabularnewline
- - -  &   \tabularnewline
Residual Std. Err.  & 1.47  on  210 df \tabularnewline
Multiple R-sq.  & 0.989 \tabularnewline
95% CI Multiple R-sq.  & [0.985, 0.991] \tabularnewline
Adjusted R-sq.  & 0.989 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=315917&T=1

[TABLE]
[ROW][C]Linear Regression Model[/C][/ROW]
[ROW][C]Y ~ X[/C][/ROW]
[ROW][C]coefficients:[/C][C] [/C][/ROW]
[ROW][C] [/C][C]Estimate[/C][C]Std. Error[/C][C]t value[/C][C]Pr(>|t|)[/C][/ROW]
[C](Intercept)[/C][C]14.204[/C][C]0.586[/C][C]24.218[/C][C]0[/C][/ROW]
[C]X[/C][C]0.843[/C][C]0.006[/C][C]136.224[/C][C]0[/C][/ROW]
[ROW][C]- - - [/C][C] [/C][/ROW]
[ROW][C]Residual Std. Err. [/C][C]1.47  on  210 df[/C][/ROW]
[ROW][C]Multiple R-sq. [/C][C]0.989[/C][/ROW]
[ROW][C]95% CI Multiple R-sq. [/C][C][0.985, 0.991][/C][/ROW]
[ROW][C]Adjusted R-sq. [/C][C]0.989[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=315917&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=315917&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Linear Regression Model
Y ~ X
coefficients:
EstimateStd. Errort valuePr(>|t|)
(Intercept)14.2040.58624.2180
X0.8430.006136.2240
- - -
Residual Std. Err. 1.47 on 210 df
Multiple R-sq. 0.989
95% CI Multiple R-sq. [0.985, 0.991]
Adjusted R-sq. 0.989







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
X9140080.25640080.25618557.0560
Residuals210453.5662.16

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
X9 & 1 & 40080.256 & 40080.256 & 18557.056 & 0 \tabularnewline
Residuals & 210 & 453.566 & 2.16 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=315917&T=2

[TABLE]
[ROW][C]ANOVA Statistics[/C][/ROW]
[ROW][C] [/C][C]Df[/C][C]Sum Sq[/C][C]Mean Sq[/C][C]F value[/C][C]Pr(>F)[/C][/ROW]
[ROW][C]X9[/C][C]1[/C][C]40080.256[/C][C]40080.256[/C][C]18557.056[/C][C]0[/C][/ROW]
[ROW][C]Residuals[/C][C]210[/C][C]453.566[/C][C]2.16[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=315917&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=315917&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
X9140080.25640080.25618557.0560
Residuals210453.5662.16



Parameters (Session):
Parameters (R input):
par1 = 1 ; par2 = 2 ; par3 = TRUE ;
R code (references can be found in the software module):
library(boot)
cat1 <- as.numeric(par1)
cat2<- as.numeric(par2)
intercept<-as.logical(par3)
x <- na.omit(t(x))
rsq <- function(formula, data, indices) {
d <- data[indices,] # allows boot to select sample
fit <- lm(formula, data=d)
return(summary(fit)$r.square)
}
xdf<-data.frame(na.omit(t(y)))
(V1<-dimnames(y)[[1]][cat1])
(V2<-dimnames(y)[[1]][cat2])
xdf <- data.frame(xdf[[cat1]], xdf[[cat2]])
names(xdf)<-c('Y', 'X')
if(intercept == FALSE) (lmxdf<-lm(Y~ X - 1, data = xdf) ) else (lmxdf<-lm(Y~ X, data = xdf) )
(results <- boot(data=xdf, statistic=rsq, R=1000, formula=Y~X))
sumlmxdf<-summary(lmxdf)
(aov.xdf<-aov(lmxdf) )
(anova.xdf<-anova(lmxdf) )
load(file='createtable')
a<-table.start()
nc <- ncol(sumlmxdf$'coefficients')
nr <- nrow(sumlmxdf$'coefficients')
a<-table.row.start(a)
a<-table.element(a,'Linear Regression Model', nc+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, lmxdf$call['formula'],nc+1)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'coefficients:',1,TRUE)
a<-table.element(a, ' ',nc,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, ' ',1,TRUE)
for(i in 1 : nc){
a<-table.element(a, dimnames(sumlmxdf$'coefficients')[[2]][i],1,TRUE)
}#end header
a<-table.row.end(a)
for(i in 1: nr){
a<-table.element(a,dimnames(sumlmxdf$'coefficients')[[1]][i] ,1,TRUE)
for(j in 1 : nc){
a<-table.element(a, round(sumlmxdf$coefficients[i, j], digits=3), 1 ,FALSE)
}
a<-table.row.end(a)
}
a<-table.row.start(a)
a<-table.element(a, '- - - ',1,TRUE)
a<-table.element(a, ' ',nc,FALSE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Std. Err. ',1,TRUE)
a<-table.element(a, paste(round(sumlmxdf$'sigma', digits=3), ' on ', sumlmxdf$'df'[2], 'df') ,nc, FALSE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R-sq. ',1,TRUE)
a<-table.element(a, round(sumlmxdf$'r.squared', digits=3) ,nc, FALSE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, '95% CI Multiple R-sq. ',1,TRUE)
a<-table.element(a, paste('[',round(boot.ci(results,type='bca')$bca[1,4], digits=3),', ', round(boot.ci(results,type='bca')$bca[1,5], digits=3), ']',sep='') ,nc, FALSE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-sq. ',1,TRUE)
a<-table.element(a, round(sumlmxdf$'adj.r.squared', digits=3) ,nc, FALSE)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'ANOVA Statistics', 5+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, ' ',1,TRUE)
a<-table.element(a, 'Df',1,TRUE)
a<-table.element(a, 'Sum Sq',1,TRUE)
a<-table.element(a, 'Mean Sq',1,TRUE)
a<-table.element(a, 'F value',1,TRUE)
a<-table.element(a, 'Pr(>F)',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, V2,1,TRUE)
a<-table.element(a, anova.xdf$Df[1])
a<-table.element(a, round(anova.xdf$'Sum Sq'[1], digits=3))
a<-table.element(a, round(anova.xdf$'Mean Sq'[1], digits=3))
a<-table.element(a, round(anova.xdf$'F value'[1], digits=3))
a<-table.element(a, round(anova.xdf$'Pr(>F)'[1], digits=3))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residuals',1,TRUE)
a<-table.element(a, anova.xdf$Df[2])
a<-table.element(a, round(anova.xdf$'Sum Sq'[2], digits=3))
a<-table.element(a, round(anova.xdf$'Mean Sq'[2], digits=3))
a<-table.element(a, ' ')
a<-table.element(a, ' ')
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
bitmap(file='regressionplot.png')
plot(Y~ X, data=xdf, xlab=V2, ylab=V1, main='Regression Solution')
if(intercept == TRUE) abline(coef(lmxdf), col='red')
if(intercept == FALSE) abline(0.0, coef(lmxdf), col='red')
dev.off()
library(car)
bitmap(file='residualsQQplot.png')
qqPlot(resid(lmxdf), main='QQplot of Residuals of Fit')
dev.off()
bitmap(file='residualsplot.png')
plot(xdf$X, resid(lmxdf), main='Scatterplot of Residuals of Model Fit')
dev.off()
bitmap(file='cooksDistanceLmplot.png')
plot(lmxdf, which=4)
dev.off()