Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_Simple Regression Y ~ X.wasp
Title produced by softwareSimple Linear Regression
Date of computationMon, 18 Jul 2011 10:52:45 -0400
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Jul/18/t1311000930jukhi1qzqhqxwqn.htm/, Retrieved Thu, 16 May 2024 18:11:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=123075, Retrieved Thu, 16 May 2024 18:11:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact222
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Simple Linear Regression] [log(cost of stora...] [2011-07-18 14:52:45] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
1980	197632
1980	238592
1981	716800
1981	348160
1981	471040
1981	307200
1981	302080
1981	295936
1981	195584
1981	155648
1981	141312
1982	266240
1983	323584
1983	276480
1983	194560
1983	179200
1983	168960
1983	134144
1983	121856
1984	286720
1984	276480
1984	174080
1984	163840
1984	143360
1984	136192
1984	122880
1984	120832
1984	306176
1984	289792
1984	219136
1984	204800
1984	185344
1984	168960
1984	161792
1984	143360
1984	121856
1984	110592
1984	81920
1985	72704
1987	92160
1987	61440
1987	46080
1988	40960
1988	33792
1988	27648
1988	30720
1988	16384
1989	54272
1989	36864
1989	12288
1990	9216
1991	7168
1992	4096
1993	2048
1994	972.8
1995	870.4
1995	901.12
1995	829.44
1995	1013.76
1995	1290.24
1995	944.128
1995	905.216
1995	685.056
1995	774.144
1995	702.464
1996	302.08
1996	269.312
1996	265.216
1996	211.968
1996	177.152
1997	185.344
1997	151.552
1997	144.384
1997	156.672
1997	124.928
1997	120.832
1997	120.832
1997	106.496
1997	112.64
1997	106.496
1997	104.448
1997	103.424
1997	99.9424
1997	87.4496
1997	81.92
1997	103.424
1997	101.1712
1997	99.4304
1997	97.5872
1997	95.3344
1998	97.4848
1998	95.8464
1998	88.3712
1998	85.9136
1998	80.384
1998	80.0768
1998	87.7568
1998	87.6544
1998	76.0832
1998	62.5664
1998	79.0528
1998	78.1312
1998	68.096
1998	67.8912
1998	65.3312
1998	77.2096
1998	74.9568
1998	67.6864
1998	64.4096
1998	60.7232
1998	83.5584
1998	70.3488
1998	67.6864
1998	60.3136
1998	61.952
1998	62.464
1998	54.784
1998	56.4224
1998	60.5184
1998	57.0368
1998	54.0672
1998	53.5552
1998	53.5552
1998	55.9104
1998	47.5136
1998	53.1456
1998	51.5072
1998	53.248
1998	48.5376
1998	49.0496
1998	43.6224
1999	44.1344
1999	38.6048
1999	37.376
1999	31.4368
1999	35.4304
1999	34.5088
1999	32.9728
1999	32.8704
1999	32.256
1999	32.1536
1999	30.3104
1999	28.9792
1999	33.0752
1999	28.2624
1999	27.7504
1999	25.088
1999	29.4912
1999	28.0576
1999	26.9312
1999	18.944
1999	21.6064
1999	21.0944
1999	20.3776
1999	22.9376
1999	21.6064
1999	21.0944
1999	21.0944
1999	18.944
1999	22.8352
1999	22.528
1999	21.8112
1999	21.8112
1999	18.8416
1999	17.7152
1999	17.3056
1999	16.896
1999	16.6912
1999	15.36
2000	19.73
2000	16.86
2000	16.83
2000	16.76
2000	16.73
2000	16.45
2000	15.82
2000	15.8
2000	15.44
2000	14.29
2000	11.95
2000	15.65
2000	15.06
2000	14.89
2000	14.72
2000	14.58
2000	14.33
2000	14.29
2000	13.88
2000	13.8
2000	13.63
2000	13.47
2000	12.95
2000	12.74
2000	12.54
2000	12.48
2000	11.81
2000	15.22
2000	12.27
2000	11.5
2000	14.57
2000	12.42
2000	11.24
2000	10.06
2000	10.91
2000	10.82
2000	10.41
2000	9.25
2000	8.02
2000	11.5
2000	10.06
2000	9.58
2000	9.14
2000	8.94
2000	7.45
2000	7.27
2000	7.27
2000	7.14
2000	7.88
2000	7.25
2000	6.9
2001	7.31
2001	7.26
2001	6.84
2001	7.48
2001	6.48
2001	5.72
2001	6.82
2001	6.56
2001	6.49
2001	5.87
2001	6.33
2001	6.33
2001	5.75
2001	4.41
2001	2.99
2001	4.57
2002	4.31
2002	3.71
2002	2.65
2002	2.88
2002	3.74
2002	2.59
2002	2.07
2002	2.59
2002	2.88
2002	2.59
2002	2.68
2003	2.58
2003	1.51
2003	1.93
2003	1.78
2003	1.61
2003	1.51
2003	1.42
2003	1.39
2004	1.94
2004	1.94
2004	1.7
2004	1.57
2004	1.41
2004	1.38
2004	1.24
2004	1.22
2004	1.15
2004	1.24
2004	1.21
2004	1.2
2004	0.671
2004	0.598
2005	0.719
2005	0.719
2005	0.719
2005	0.575
2005	0.598
2007	0.426
2007	0.411
2007	0.377
2007	0.371
2007	0.367
2007	0.35
2007	0.333
2007	0.306
2007	0.302
2007	0.287
2010	0.164
2010	0.134
2010	0.0909
2010	0.0688
2010	0.115
2010	0.113
2010	0.0821




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net

\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 & 1 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=123075&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=123075&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=123075&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 time1 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







Linear Regression Model
Y ~ X
coefficients:
EstimateStd. Errort valuePr(>|t|)
(Intercept)1142.7089.471120.6510
X-0.570.005-120.1950
- - -
Residual Std. Err. 0.552 on 289 df
Multiple R-sq. 0.98
Adjusted R-sq. 0.98

\begin{tabular}{lllllllll}
\hline
Linear Regression Model \tabularnewline
Y ~ X \tabularnewline
coefficients: &   \tabularnewline
  & Estimate & Std. Error & t value & Pr(>|t|) \tabularnewline
(Intercept) & 1142.708 & 9.471 & 120.651 & 0 \tabularnewline
X & -0.57 & 0.005 & -120.195 & 0 \tabularnewline
- - -  &   \tabularnewline
Residual Std. Err.  & 0.552  on  289 df \tabularnewline
Multiple R-sq.  & 0.98 \tabularnewline
Adjusted R-sq.  & 0.98 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=123075&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]1142.708[/C][C]9.471[/C][C]120.651[/C][C]0[/C][/ROW]
[C]X[/C][C]-0.57[/C][C]0.005[/C][C]-120.195[/C][C]0[/C][/ROW]
[ROW][C]- - - [/C][C] [/C][/ROW]
[ROW][C]Residual Std. Err. [/C][C]0.552  on  289 df[/C][/ROW]
[ROW][C]Multiple R-sq. [/C][C]0.98[/C][/ROW]
[ROW][C]Adjusted R-sq. [/C][C]0.98[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=123075&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=123075&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)1142.7089.471120.6510
X-0.570.005-120.1950
- - -
Residual Std. Err. 0.552 on 289 df
Multiple R-sq. 0.98
Adjusted R-sq. 0.98







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
Year14403.8464403.84614446.7320
Residuals28988.0970.305

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
Year & 1 & 4403.846 & 4403.846 & 14446.732 & 0 \tabularnewline
Residuals & 289 & 88.097 & 0.305 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=123075&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]Year[/C][C]1[/C][C]4403.846[/C][C]4403.846[/C][C]14446.732[/C][C]0[/C][/ROW]
[ROW][C]Residuals[/C][C]289[/C][C]88.097[/C][C]0.305[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=123075&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=123075&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)
Year14403.8464403.84614446.7320
Residuals28988.0970.305



Parameters (Session):
par1 = 2 ; par2 = 1 ; par3 = TRUE ;
Parameters (R input):
par1 = 2 ; par2 = 1 ; par3 = TRUE ;
R code (references can be found in the software module):
cat1 <- as.numeric(par1) #
cat2<- as.numeric(par2) #
intercept<-as.logical(par3)
x <- t(x)
xdf<-data.frame(t(y))
(V1<-dimnames(y)[[1]][cat1])
(V2<-dimnames(y)[[1]][cat2])
xdf <- data.frame(log(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) )
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)
}# end cols
a<-table.row.end(a)
} #end rows
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, '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')
qq.plot(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.lm(lmxdf, which=4)
dev.off()