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 computationThu, 21 Dec 2017 22:54:28 +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/21/t151389337063im510ppgn6efn.htm/, Retrieved Tue, 14 May 2024 02:52:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310740, Retrieved Tue, 14 May 2024 02:52:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact56
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Simple Linear Regression] [] [2017-12-21 21:54:28] [3e750cbf09f2d23face9e1dcccb73239] [Current]
Feedback Forum

Post a new message
Dataseries X:
342185	24
1500000	0
121448	10
65000	4
10714	45
13383	2
15101	4
94420	9
30000	3
30657	10
45835	7
68267	40
35250	5
25302	4
14250	8
28232	6
13731	1
16000	2
10879	0
36000	3
526837	44
34837	5
3370	0
17101	14
11242	37
91945	3
326	4
28161	0
14534	8
52515	11
18816	6
15848	4
100000	26
138135	0
86750	37
600	5
30000	0
17859	4
20050	39
52000	8
168	0
31730	3
10182	5
51840	5
20000	45
12000	2
1500	0
52000	15
12051	5
26067	4
39466	7
113	0
21000	7
250	0
147368	19
20900	1
51366	3
18450	4
12745	57
9441	4
136647	47
45702	8
25109	42
46500	0
0	52
16362	5
90000	5
1074611	29
72495	5
42066	10
41400	10
24000	7
20000	79
1025	38
70000	5
0	0
3449547	43
10614	3
10882	60
40378	7
1000	79
12544	0
18269	8
710	3
46231	4
293770	9
12759	4
11159	9
9901	2
29657	0
6333	2
2689175	26
73467	40
23000	35
10393	79
300	0
11164	5
23300	0
23000	10
25000	10
54213	2
6541	4
5280	0
9964	44
80471	41
6986	43
3963	0
39700	6
10501	5
18515	55
86507	11
69910	3
61092	0
9841	5
10000	76
150	0
41214	0
877	2
202000	20
18000	0
28467	15
13877	5
12500	18
5000	20
12558	6
25000	23
45250	0
18127	0
25856	14
37000	12
18513	3
17504	0
3353	6
48124	17
637957	47
13104	32
10000	0
28607	0
18736	0
337	3
15869	0
0	4
22123	2
85791	0
17660	6
9233	1
2676	8
10572	0
21634	5
10000	5
10000	3
24659	9
9695	45
20000	8
11325	5
56670	4
913564	47
50959	10
95100	32
1536426	46
75000	5
28747	5
22200	9
142000	34
53779	0
3800	3
9573	38
16897	0
500	2
18463	30
13670	3
20833	70
0	0
24880	5
31253	4
123441	22
16725	54
0	0
127299	3
10477	3
13986	50
0	0
18352	50
3600	0
70000	15
31100	9
63989	5
14548	40
33673	5
79780	7
20400	5
3807	0
22253	6
153210	24
37240	0
9740	3
11322	45
731320	45
56175	6
9866	5
19000	44
67423	4
28373	50
18500	30
50400	30
0	0
27317	10
22906	3
257037	7
33000	50
7500	0
22000	7
80000	7
5000	0
2000	79
40000	0
46297	55
10214	45
18125	2
249600	14
9950	17
30000	3
5000	0
18600	7
339895	30
112534	10
16620	11
23852	7
25300	5
10037	5
10050	4
14768	0
9187	0
31297	15
21507	0
3843	4
68350	6
14171	7
27021	3
33240	3
59811	6
111680	4
22465	3
615	0
59450	19
10860	7
19889	6
10300	28
68728	4
30000	5
10000	10
51456	3
24312	8
36782	9
10339	6
149066	13
557506	10
104879	9
23609	60
135	0
101514	30
23000	12
58675	3
9517	4
275000	0
20000	30
131500	7
43010	2
12150	9
6833	0
13067	0
0	15
2576191	65
64300	20
10243	8
15860	22
11632	4
15795	6
270000	24
13000	10
5000	3
26586	9
20000	9
78420	0
350	4
13618	10
5000	0
110000	8
7000	3
2800	0
21986	8
1181943	48
33545	11
18782	9
3000	0
9690	27
220514	10
10092	9
14051	30
9625	2
18155	3
34553	6
93288	9
15185	0
10000	25
81400	0
6350	1
25324	6
42538	5
9200	70
0	0
12700	5
192600	36
28756	6
10783	79
0	0
43292	5
142729	4
20000	0
9606	8
49281	26
9483	5
0	2
16483	37
18288	5
25685	7
11015	4
10400	21
24700	4
11720	3
1493	0
38000	0
38000	4
12580	44
83274	5
28500	4
15383	0
14428	7
23709	3
300000	80
65000	0
60200	5
15533	4
122779	7
646685	26
20000	0
16166	3
565	1
20000	0
10020	4
852950	48
20443	8
85000	20
239508	25
14600	24
124161	7
31300	17
20000	0
11491	5
16645	0
11742	3
4100	6
18854	2
49530	22
30000	10
110400	0
30000	5
15000	0
10100	2
43857	9
37960	10
16873	20
1492082	49
73190	10
579585	4
116144	10
640000	51
289653	9
9329	7
235000	14
10500	3
23259	3
25000	2
94700	2
20118	2
272418	23
27114	2
46597	2
293015	20
1929657	0
641874	15
46649	5
20712	7
36063	6
2620	0
57050	2
14000	0
39970	12
147750	28
250	20
64479	9
23314	2
11019	5
227425	4
500	4
11600	9
53324	0
30093	7
10000	5
0	5
25696	2
83800	4
102893	0
86486	8
31500	3
52025	6
3041	5
17500	0
750	1
139500	14
40300	8
44996	23
18255	7
6402	0
19628	18




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

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







Linear Regression Model
Y ~ X
coefficients:
EstimateStd. Errort valuePr(>|t|)
(Intercept)37228.74118286.9492.0360.042
X4705.474865.9625.4340
- - -
Residual Std. Err. 303313.786 on 423 df
Multiple R-sq. 0.065
95% CI Multiple R-sq. [0.02, 0.141]
Adjusted R-sq. 0.063

\begin{tabular}{lllllllll}
\hline
Linear Regression Model \tabularnewline
Y ~ X \tabularnewline
coefficients: &   \tabularnewline
  & Estimate & Std. Error & t value & Pr(>|t|) \tabularnewline
(Intercept) & 37228.741 & 18286.949 & 2.036 & 0.042 \tabularnewline
X & 4705.474 & 865.962 & 5.434 & 0 \tabularnewline
- - -  &   \tabularnewline
Residual Std. Err.  & 303313.786  on  423 df \tabularnewline
Multiple R-sq.  & 0.065 \tabularnewline
95% CI Multiple R-sq.  & [0.02, 0.141] \tabularnewline
Adjusted R-sq.  & 0.063 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310740&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]37228.741[/C][C]18286.949[/C][C]2.036[/C][C]0.042[/C][/ROW]
[C]X[/C][C]4705.474[/C][C]865.962[/C][C]5.434[/C][C]0[/C][/ROW]
[ROW][C]- - - [/C][C] [/C][/ROW]
[ROW][C]Residual Std. Err. [/C][C]303313.786  on  423 df[/C][/ROW]
[ROW][C]Multiple R-sq. [/C][C]0.065[/C][/ROW]
[ROW][C]95% CI Multiple R-sq. [/C][C][0.02, 0.141][/C][/ROW]
[ROW][C]Adjusted R-sq. [/C][C]0.063[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310740&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310740&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)37228.74118286.9492.0360.042
X4705.474865.9625.4340
- - -
Residual Std. Err. 303313.786 on 423 df
Multiple R-sq. 0.065
95% CI Multiple R-sq. [0.02, 0.141]
Adjusted R-sq. 0.063







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
V212716395055372.132716395055372.1329.5260
Residuals42338915684011034.891999252981.17

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
V2 & 1 & 2716395055372.13 & 2716395055372.13 & 29.526 & 0 \tabularnewline
Residuals & 423 & 38915684011034.8 & 91999252981.17 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310740&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]V2[/C][C]1[/C][C]2716395055372.13[/C][C]2716395055372.13[/C][C]29.526[/C][C]0[/C][/ROW]
[ROW][C]Residuals[/C][C]423[/C][C]38915684011034.8[/C][C]91999252981.17[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310740&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310740&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)
V212716395055372.132716395055372.1329.5260
Residuals42338915684011034.891999252981.17



Parameters (Session):
Parameters (R input):
par1 = 1 ; par2 = 2 ; par3 = TRUE ;
R code (references can be found in the software module):
par3 <- 'TRUE'
par2 <- '2'
par1 <- '1'
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()