Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_linear_regression.wasp
Title produced by softwareLinear Regression Graphical Model Validation
Date of computationThu, 25 Nov 2010 09:38:14 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Nov/25/t1290677785eb6yndsnoh2hhia.htm/, Retrieved Tue, 23 Apr 2024 16:04:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=100670, Retrieved Tue, 23 Apr 2024 16:04:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact122
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Linear Regression Graphical Model Validation] [Colombia Coffee -...] [2008-02-26 10:22:06] [74be16979710d4c4e7c6647856088456]
-  M D  [Linear Regression Graphical Model Validation] [] [2010-11-24 18:34:15] [43e84bd88d5f94b739fa54f225367516]
-           [Linear Regression Graphical Model Validation] [] [2010-11-25 09:38:14] [19046f4a6967f3fb6f5f17d42e7d38f2] [Current]
Feedback Forum

Post a new message
Dataseries X:
67.643
69.371
66.294
70.768
71.774
73.388
74.040
73.238
78.121
69.825
71.099
70.676
69.515
68.246
68.594
70.405
61.223
60.542
61.952
68.173
67.240
68.739
69.234
65.570
67.408
64.630
68.848
73.370
74.292
76.525
74.368
75.674
74.868
79.824
80.022
79.942
80.622
80.079
79.212
80.626
83.551
80.407
85.053
86.399
88.536
89.008
89.652
88.904
87.472
88.631
87.221
88.759
90.127
88.709
90.030
88.697
88.762
89.475
88.936
90.411
90.004
92.725
90.252
93.226
92.575
93.125
95.987
97.175
97.321
98.577
99.026
101.851
99.958
97.875
97.927
95.149
94.551
93.999
93.297
89.901
89.742
87.096
86.863
86.718
80.020
63.483
51.289
44.071
43.654
66.115
84.518
83.395
78.307
80.049
78.346
78.317
75.918
73.739
74.530
74.179
76.974
75.408
73.336
69.210
67.286
64.606
64.159
64.423
66.411
64.270
56.521
50.599
54.751
62.227
63.932
65.391
75.744
74.590
76.035
74.427
73.354
73.081
75.309
75.463
75.910
76.151
76.882
78.632
80.137
82.490
79.896
81.303
79.344
81.355
82.328
79.669
77.249
75.101
72.520
72.438
72.653
71.429
69.189
66.451
63.354
61.379
61.880
62.274
62.429
63.905
63.917
64.295
61.930
60.440
59.353
58.695
60.569
60.386
60.938
61.795
63.304
64.270
63.492
61.333
59.341
58.412
58.725
59.277
58.562
57.858
58.790
58.243
57.044
57.339
59.429
60.575
61.950
61.712
Dataseries Y:
64.033
65.679
62.776
67.024
67.988
69.529
70.158
69.410
74.049
66.197
67.043
67.459
65.512
64.665
65.382
66.607
58.387
57.564
58.431
65.012
64.176
65.509
65.163
62.158
64.429
61.325
65.339
69.921
70.782
73.287
70.300
71.579
70.700
75.740
75.850
76.381
77.388
75.519
75.573
76.668
79.387
76.876
81.021
82.883
84.016
85.047
85.757
84.792
83.811
84.691
83.496
85.470
85.212
84.802
85.809
85.119
85.228
85.302
85.883
86.315
86.195
88.227
86.411
89.120
88.030
89.372
91.869
92.845
92.787
94.711
94.204
97.217
95.118
93.688
93.140
91.516
90.957
90.372
89.749
85.813
86.026
83.933
83.602
83.384
76.369
60.808
48.071
42.604
41.402
62.121
79.739
79.006
74.472
75.956
75.041
74.873
72.922
70.472
71.423
71.363
73.297
72.081
70.488
65.544
64.450
61.698
61.352
61.072
63.722
61.987
53.802
47.818
50.998
58.438
60.143
61.854
70.987
70.389
72.175
70.243
69.616
69.443
70.833
71.059
72.218
72.647
73.299
73.756
75.557
78.172
75.624
76.959
74.994
76.841
78.043
75.187
73.387
70.798
68.722
68.396
68.466
67.675
65.248
62.974
59.801
57.894
58.592
59.249
59.554
59.753
60.877
60.532
58.452
56.955
56.437
55.588
56.702
57.062
57.826
58.755
60.250
61.142
60.690
58.495
56.020
55.814
56.489
56.587
55.714
55.611
56.093
55.929
54.181
54.810
56.189
57.427
59.432
58.951




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 4 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=100670&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=100670&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=100670&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 Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







Simple Linear Regression
StatisticsEstimateS.D.T-STAT (H0: coeff=0)P-value (two-sided)
constant term-1.102543969453950.213713303109741-5.158986143636536.64444115283658e-07
slope0.9663049657139660.0028336829851223341.0067289768690

\begin{tabular}{lllllllll}
\hline
Simple Linear Regression \tabularnewline
Statistics & Estimate & S.D. & T-STAT (H0: coeff=0) & P-value (two-sided) \tabularnewline
constant term & -1.10254396945395 & 0.213713303109741 & -5.15898614363653 & 6.64444115283658e-07 \tabularnewline
slope & 0.966304965713966 & 0.0028336829851223 & 341.006728976869 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=100670&T=1

[TABLE]
[ROW][C]Simple Linear Regression[/C][/ROW]
[ROW][C]Statistics[/C][C]Estimate[/C][C]S.D.[/C][C]T-STAT (H0: coeff=0)[/C][C]P-value (two-sided)[/C][/ROW]
[ROW][C]constant term[/C][C]-1.10254396945395[/C][C]0.213713303109741[/C][C]-5.15898614363653[/C][C]6.64444115283658e-07[/C][/ROW]
[ROW][C]slope[/C][C]0.966304965713966[/C][C]0.0028336829851223[/C][C]341.006728976869[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=100670&T=1

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

As an alternative you can also use a QR Code:  

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

Simple Linear Regression
StatisticsEstimateS.D.T-STAT (H0: coeff=0)P-value (two-sided)
constant term-1.102543969453950.213713303109741-5.158986143636536.64444115283658e-07
slope0.9663049657139660.0028336829851223341.0067289768690



Parameters (Session):
par1 = 0 ;
Parameters (R input):
par1 = 0 ; par2 = ; par3 = ; par4 = ; par5 = ; par6 = ; par7 = ; par8 = ; par9 = ; par10 = ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
R code (references can be found in the software module):
par1 <- as.numeric(par1)
library(lattice)
z <- as.data.frame(cbind(x,y))
m <- lm(y~x)
summary(m)
bitmap(file='test1.png')
plot(z,main='Scatterplot, lowess, and regression line')
lines(lowess(z),col='red')
abline(m)
grid()
dev.off()
bitmap(file='test2.png')
m2 <- lm(m$fitted.values ~ x)
summary(m2)
z2 <- as.data.frame(cbind(x,m$fitted.values))
names(z2) <- list('x','Fitted')
plot(z2,main='Scatterplot, lowess, and regression line')
lines(lowess(z2),col='red')
abline(m2)
grid()
dev.off()
bitmap(file='test3.png')
m3 <- lm(m$residuals ~ x)
summary(m3)
z3 <- as.data.frame(cbind(x,m$residuals))
names(z3) <- list('x','Residuals')
plot(z3,main='Scatterplot, lowess, and regression line')
lines(lowess(z3),col='red')
abline(m3)
grid()
dev.off()
bitmap(file='test4.png')
m4 <- lm(m$fitted.values ~ m$residuals)
summary(m4)
z4 <- as.data.frame(cbind(m$residuals,m$fitted.values))
names(z4) <- list('Residuals','Fitted')
plot(z4,main='Scatterplot, lowess, and regression line')
lines(lowess(z4),col='red')
abline(m4)
grid()
dev.off()
bitmap(file='test5.png')
myr <- as.ts(m$residuals)
z5 <- as.data.frame(cbind(lag(myr,1),myr))
names(z5) <- list('Lagged Residuals','Residuals')
plot(z5,main='Lag plot')
m5 <- lm(z5)
summary(m5)
abline(m5)
grid()
dev.off()
bitmap(file='test6.png')
hist(m$residuals,main='Residual Histogram',xlab='Residuals')
dev.off()
bitmap(file='test7.png')
if (par1 > 0)
{
densityplot(~m$residuals,col='black',main=paste('Density Plot bw = ',par1),bw=par1)
} else {
densityplot(~m$residuals,col='black',main='Density Plot')
}
dev.off()
bitmap(file='test8.png')
acf(m$residuals,main='Residual Autocorrelation Function')
dev.off()
bitmap(file='test9.png')
qqnorm(x)
qqline(x)
grid()
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Simple Linear Regression',5,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Statistics',1,TRUE)
a<-table.element(a,'Estimate',1,TRUE)
a<-table.element(a,'S.D.',1,TRUE)
a<-table.element(a,'T-STAT (H0: coeff=0)',1,TRUE)
a<-table.element(a,'P-value (two-sided)',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'constant term',header=TRUE)
a<-table.element(a,m$coefficients[[1]])
sd <- sqrt(vcov(m)[1,1])
a<-table.element(a,sd)
tstat <- m$coefficients[[1]]/sd
a<-table.element(a,tstat)
pval <- 2*(1-pt(abs(tstat),length(x)-2))
a<-table.element(a,pval)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'slope',header=TRUE)
a<-table.element(a,m$coefficients[[2]])
sd <- sqrt(vcov(m)[2,2])
a<-table.element(a,sd)
tstat <- m$coefficients[[2]]/sd
a<-table.element(a,tstat)
pval <- 2*(1-pt(abs(tstat),length(x)-2))
a<-table.element(a,pval)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')