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 computationFri, 15 Dec 2017 12:18:55 +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/2017/Dec/15/t1513338574j8lge0xkrgrop7g.htm/, Retrieved Wed, 15 May 2024 04:06:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=309660, Retrieved Wed, 15 May 2024 04:06:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact64
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Simple Linear Regression] [] [2017-12-15 11:18:55] [deec28e763260dad9f228be262d61467] [Current]
Feedback Forum

Post a new message
Dataseries X:
36.43	10.81
38.72	11.46
49.66	14.65
37.7	11.09
34.72	10.15
51.52	14.98
32.26	9.35
51.88	15.04
50.13	14.41
144.69	5.14
159.08	5.65
146.64	5.21
121.21	4.23
116.45	4.07
117.19	4.09
133.82	4.67
136.98	4.78
121.07	4.23
90.99	3.17
91.51	3.19
116.48	4.06
120.43	3.82
125.72	3.99
114.31	3.62
116.63	3.7
157.88	5.01
115.46	3.46
152.5	4.58
147.38	4.42
147.38	4.42
127.7	3.83
129.52	3.73
120.51	3.47
114.97	3.31
116.23	3.35
117.8	3.39
146.61	3.9
148.85	3.96
114.77	3.05
127.83	3.4
153.35	4.08
154.94	4
148.37	3.83
152.96	3.95
161.02	4.16
154.34	3.99
144.24	3.73
178.7	4.62
121.86	3.15
150.66	3.89
196.75	2.69
250.12	3.42
228.32	3.12
238.36	3.26
198.25	2.71
324.08	2.26
431.54	3.01
267.83	1.87
331.21	2.31
248.52	1.73
367.71	2.56
320.22	2.23
51.87	6.72
51.3	6.65
69.23	8.97
57.51	7.45
58.3	7.55
55.8	7.23
68.21	8.84
66.63	8.63
49.41	6.37
49.34	6.36
49.02	6.32
50.24	6.47
49.81	6.42
49.25	6.35
49.25	6.35
49.81	6.42
49.25	13.03
49.34	13.05
48.54	12.84
44.97	11.87
52.31	13.8
53.5	6.01
52.35	5.88
65.47	7.36
68	7.64
66.05	7.42
62.11	6.97
114.06	4.46
97.89	3.82
112.57	4.4
112.42	4.39
118.16	4.62
129.41	5.05
120.64	4.71
326.84	1.83
328.86	1.84
332.35	1.86
296.16	1.66
89.47	4.73
100.05	5.29
93.24	4.93
92.74	4.91
113.08	5.98
113.8	6.02
83.81	4.43
113.16	5.99
81.89	4.33
97.53	5.16
89.43	4.73
88.18	4.66
87.7	4.64
91.17	4.82
113.59	4.12
116.72	4.23
115.92	4.2
118.11	4.28
114.45	4.15
115.78	4.17




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time7 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 time7 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309660&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]7 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=309660&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309660&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 time7 seconds
R ServerBig Analytics Cloud Computing Center







Linear Regression Model
Y ~ X
coefficients:
EstimateStd. Errort valuePr(>|t|)
(Intercept)214.38111.56318.540
X-16.4271.838-8.9370
- - -
Residual Std. Err. 61.243 on 118 df
Multiple R-sq. 0.404
95% CI Multiple R-sq. [0.327, 0.461]
Adjusted R-sq. 0.399

\begin{tabular}{lllllllll}
\hline
Linear Regression Model \tabularnewline
Y ~ X \tabularnewline
coefficients: &   \tabularnewline
  & Estimate & Std. Error & t value & Pr(>|t|) \tabularnewline
(Intercept) & 214.381 & 11.563 & 18.54 & 0 \tabularnewline
X & -16.427 & 1.838 & -8.937 & 0 \tabularnewline
- - -  &   \tabularnewline
Residual Std. Err.  & 61.243  on  118 df \tabularnewline
Multiple R-sq.  & 0.404 \tabularnewline
95% CI Multiple R-sq.  & [0.327, 0.461] \tabularnewline
Adjusted R-sq.  & 0.399 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309660&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]214.381[/C][C]11.563[/C][C]18.54[/C][C]0[/C][/ROW]
[C]X[/C][C]-16.427[/C][C]1.838[/C][C]-8.937[/C][C]0[/C][/ROW]
[ROW][C]- - - [/C][C] [/C][/ROW]
[ROW][C]Residual Std. Err. [/C][C]61.243  on  118 df[/C][/ROW]
[ROW][C]Multiple R-sq. [/C][C]0.404[/C][/ROW]
[ROW][C]95% CI Multiple R-sq. [/C][C][0.327, 0.461][/C][/ROW]
[ROW][C]Adjusted R-sq. [/C][C]0.399[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309660&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309660&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)214.38111.56318.540
X-16.4271.838-8.9370
- - -
Residual Std. Err. 61.243 on 118 df
Multiple R-sq. 0.404
95% CI Multiple R-sq. [0.327, 0.461]
Adjusted R-sq. 0.399







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
PUV1299567.936299567.93679.870
Residuals118442581.433750.69

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
PUV & 1 & 299567.936 & 299567.936 & 79.87 & 0 \tabularnewline
Residuals & 118 & 442581.43 & 3750.69 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309660&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]PUV[/C][C]1[/C][C]299567.936[/C][C]299567.936[/C][C]79.87[/C][C]0[/C][/ROW]
[ROW][C]Residuals[/C][C]118[/C][C]442581.43[/C][C]3750.69[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309660&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309660&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)
PUV1299567.936299567.93679.870
Residuals118442581.433750.69



Parameters (Session):
par1 = 1 ; par2 = 2 ; par3 = TRUE ;
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()