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, 22 Dec 2017 15:06:36 +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/22/t1513951614lysrc0ygv9jyz21.htm/, Retrieved Wed, 15 May 2024 03:35:04 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310788, Retrieved Wed, 15 May 2024 03:35:04 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact69
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Simple Linear Regression] [eher] [2017-12-22 14:06:36] [ec772448347bb766a411d58621b503be] [Current]
Feedback Forum

Post a new message
Dataseries X:
53.1	52
64.1	54.9
75.3	60.5
66	54.8
73.6	60.1
73.2	60.3
53.5	49.8
60.6	53.8
73	64.8
72.4	62
75.8	65.2
79.6	60.1
77.8	61.2
75.7	63.6
88.5	68.6
72.9	63.1
80.8	66.5
86.6	71.9
63.8	58.1
69.2	61.5
76.5	66.2
77.1	72.3
75.3	67
69.5	62.9
64.3	66.4
66.7	65.6
77.3	70.9
75.3	68.4
73.4	66.4
78	67.6
61	64.1
58.4	62.1
73.4	70
82.3	74.4
72.2	67
76	64.8
64.3	70.7
70.8	64
74	72.5
71.4	70.4
70.1	63.6
77.6	69.8
61.2	67.7
52.1	66.4
74.4	78.9
73.1	79.9
70.9	69.1
80.7	81.2
62.9	66
69.3	71.8
82.3	86.1
76.2	76.1
70.8	70.5
87.3	83.3
62	74.8
66.9	73.4
84.4	86.5
82.6	82
77.7	80.8
87	91.5
76	77
76.3	72.3
88.8	83.5
81.2	79
74.5	76.7
98.1	83.1
63.3	71.1
67.7	75.5
85.8	90.9
78.6	85.4
87.2	84.8
106.4	83.8
75	79.3
80.4	79.9
94.8	93
77	78.1
91	82.3
96.7	87.3
69.2	74.6
69.5	80
93.7	91.3
98.5	94.2
93.3	90.9
100.4	88
87.4	81.6
89	77.4
106.1	91
92.5	79.9
96.6	83.4
113.3	91.6
87.6	85.2
89.2	84.1
115.6	87
133.2	92.8
111.1	89.2
113.1	87.3
102	89.5
109.3	86.8
111.1	92
116.8	92.2
107.5	86.4
120.5	92.9
95.5	91.2
87.9	80.3
118.6	102
116.3	99
98.8	89.2
102.9	103
80.4	80.4
87	83.4
97.4	97.6
87.2	87
110.6	84.4
101.1	94.1
69.1	88.9
77.4	82.3
95	94.7
93.2	94.5
96.3	91.6
93.9	96.8
78.5	87.9
90	99.9
109.2	109.5
94.3	91.2
93.1	89.4
114.5	109.7
78.5	96.9
88.3	94.1
114.8	104.4
112.2	100.8
106.9	107.4
119.7	108.9
97.1	95.2
106.3	102.7
131.7	130.9
106.7	104
124	106.5
117.2	106.1
87.8	97.8
91.9	112.2
125.1	114.5
115.4	105.8
117.7	101
124.3	101.2
104.8	96.5
109.6	99.5
139.5	123.8
105.3	94.6
112.4	95.8
128.9	105.4
91.6	104.4
98.7	105.2
117.8	112.7
117.4	114.8
110.5	108.9
103.1	103.8
95.8	102.5
98.2	98.1
117.2	118.2
108.5	114.8
113.2	109.9
120.2	116.7
102.8	116.9
89.4	104.4
119.8	113.5
126.9	123.8
114.4	116.4
117.4	114.1
109.4	102.8
111.1	112.7
121	121.1
116.6	120.8
119.5	117.8
121.2	130.4
101	110.9
92.7	105.4
125.5	137.6
123.4	133.3
110.3	123.3
118.8	122.8
97.1	110.2
107.6	101.4
131	128.7
117.9	120.6
111	110.1
131.4	121.6
101.8	113
93.9	115.9
138.5	131.1
131.1	127.4
124.9	123.9
126.6	120.8
102.7	108.5
121.6	112.9
132.8	129.6
123	121.3
116	119.1
135	140.8
93.7	127.4
98.4	128.1
129.8	136.6
121.9	126.5
124.8	120.8
126.9	144.3
102	116
117.7	123.4
144.8	138.6
113.3	118.3
129.3	124.2
135.7	136
94.3	127.4
106	131.6




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

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







Linear Regression Model
Y ~ X
coefficients:
EstimateStd. Errort valuePr(>|t|)
(Intercept)17.5013.1425.5710
X0.8410.03325.650
- - -
Residual Std. Err. 10.491 on 210 df
Multiple R-sq. 0.758
95% CI Multiple R-sq. [0.679, 0.809]
Adjusted R-sq. 0.757

\begin{tabular}{lllllllll}
\hline
Linear Regression Model \tabularnewline
Y ~ X \tabularnewline
coefficients: &   \tabularnewline
  & Estimate & Std. Error & t value & Pr(>|t|) \tabularnewline
(Intercept) & 17.501 & 3.142 & 5.571 & 0 \tabularnewline
X & 0.841 & 0.033 & 25.65 & 0 \tabularnewline
- - -  &   \tabularnewline
Residual Std. Err.  & 10.491  on  210 df \tabularnewline
Multiple R-sq.  & 0.758 \tabularnewline
95% CI Multiple R-sq.  & [0.679, 0.809] \tabularnewline
Adjusted R-sq.  & 0.757 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310788&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]17.501[/C][C]3.142[/C][C]5.571[/C][C]0[/C][/ROW]
[C]X[/C][C]0.841[/C][C]0.033[/C][C]25.65[/C][C]0[/C][/ROW]
[ROW][C]- - - [/C][C] [/C][/ROW]
[ROW][C]Residual Std. Err. [/C][C]10.491  on  210 df[/C][/ROW]
[ROW][C]Multiple R-sq. [/C][C]0.758[/C][/ROW]
[ROW][C]95% CI Multiple R-sq. [/C][C][0.679, 0.809][/C][/ROW]
[ROW][C]Adjusted R-sq. [/C][C]0.757[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310788&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310788&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)17.5013.1425.5710
X0.8410.03325.650
- - -
Residual Std. Err. 10.491 on 210 df
Multiple R-sq. 0.758
95% CI Multiple R-sq. [0.679, 0.809]
Adjusted R-sq. 0.757







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
ConsumerGoods172407.57972407.579657.8990
Residuals21023112.367110.059

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
ConsumerGoods & 1 & 72407.579 & 72407.579 & 657.899 & 0 \tabularnewline
Residuals & 210 & 23112.367 & 110.059 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310788&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]ConsumerGoods[/C][C]1[/C][C]72407.579[/C][C]72407.579[/C][C]657.899[/C][C]0[/C][/ROW]
[ROW][C]Residuals[/C][C]210[/C][C]23112.367[/C][C]110.059[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310788&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310788&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)
ConsumerGoods172407.57972407.579657.8990
Residuals21023112.367110.059



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()