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 computationTue, 29 Sep 2020 13:56:14 +0200
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2020/Sep/29/t1601380613kgcwpknhjk5ktz6.htm/, Retrieved Thu, 28 Mar 2024 12:30:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=319250, Retrieved Thu, 28 Mar 2024 12:30:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact114
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Simple Linear Regression] [xxx] [2020-09-29 11:56:14] [b5571daf53f6ebfe0a819858ec9647b9] [Current]
Feedback Forum

Post a new message
Dataseries X:
2.75 42.6 1973
2.73 42.9 1973
2.82 43.3 1973
2.83 43.6 1973
2.9 43.9 1973
3.05 44.2 1973
3.15 44.3 1973
3.26 45.1 1973
3.38 45.2 1973
3.54 45.6 1973
3.81 45.9 1973
5.27 46.2 1973
6.71 46.6 1974
9.09 47.2 1974
11.08 47.8 1974
11.91 48 1974
11.81 48.6 1974
11.81 49 1974
12.09 49.4 1974
11.95 50 1974
11.67 50.6 1974
11.6 51.1 1974
11.71 51.5 1974
11.62 51.9 1974
11.64 52.1 1975
11.66 52.5 1975
11.67 52.7 1975
11.69 52.9 1975
11.58 53.2 1975
11.4 53.6 1975
11.44 54.2 1975
11.38 54.3 1975
11.31 54.6 1975
11.45 54.9 1975
11.73 55.3 1975
12.11 55.5 1975
12.23 55.6 1976
12.39 55.8 1976
12.34 55.9 1976
12.42 56.1 1976
12.37 56.5 1976
12.37 56.8 1976
12.39 57.1 1976
12.43 57.4 1976
12.48 57.6 1976
12.45 57.9 1976
12.58 58 1976
12.59 58.2 1976
12.54 58.5 1977
13.01 59.1 1977
13.31 59.5 1977
13.45 60 1977
13.28 60.3 1977
13.38 60.7 1977
13.36 61 1977
13.4 61.2 1977
13.49 61.4 1977
13.47 61.6 1977
13.62 61.9 1977
13.57 62.1 1977
13.59 62.5 1978
13.48 62.9 1978
13.47 63.4 1978
13.47 63.9 1978
13.36 64.5 1978
13.37 65.2 1978
13.4 65.7 1978
13.41 66 1978
13.37 66.5 1978
13.42 67.1 1978
13.41 67.4 1978
13.46 67.7 1978
13.64 68.3 1979
13.93 69.1 1979
14.46 69.8 1979
14.92 70.6 1979
16.27 71.5 1979
17.36 72.3 1979
19.07 73.1 1979
21.1 73.8 1979
22.39 74.6 1979
23.13 75.2 1979
23.27 75.9 1979
24.57 76.7 1979
26.32 77.8 1980
28.57 78.9 1980
30.44 80.1 1980
31.4 81 1980
31.84 81.8 1980
31.86 82.7 1980
32.3 82.7 1980
32.93 83.3 1980
32.73 84 1980
33.1 84.8 1980
33.23 85.5 1980
33.94 86.3 1980
34.27 87 1981
35.96 87.9 1981
36.25 88.5 1981
36.92 89.1 1981
36.16 89.8 1981
36.59 90.6 1981
35.05 91.6 1981
34.53 92.3 1981
34.07 93.2 1981
33.65 93.4 1981
33.84 93.7 1981
33.99 94 1981
35.41 94.3 1982
35.53 94.6 1982
34.71 94.5 1982
33.2 94.9 1982
32.25 95.8 1982
32.92 97 1982
33.27 97.5 1982
32.91 97.7 1982
32.39 97.9 1982
32.44 98.2 1982
32.84 98 1982
32.44 97.6 1982
32.5 97.8 1983
31.12 97.9 1983
30.28 97.9 1983
28.76 98.6 1983
28.59 99.2 1983
28.83 99.5 1983
28.93 99.9 1983
29.31 100.2 1983
29.27 100.7 1983
29.36 101 1983
29.05 101.2 1983
29 101.3 1983
27.65 101.9 1984
27.64 102.4 1984
27.8 102.6 1984
27.84 103.1 1984
27.85 103.4 1984
27.76 103.7 1984
28.05 104.1 1984
27.66 104.5 1984
27.39 105 1984
27.56 105.3 1984
27.55 105.3 1984
27.3 105.3 1984
27.38 105.5 1985
26.91 106 1985
26.05 106.4 1985
26.52 106.9 1985
26.79 107.3 1985
26.52 107.6 1985
25.91 107.8 1985
25.76 108 1985
25.42 108.3 1985
25.65 108.7 1985
25.69 109 1985
26.04 109.3 1985
25.8 109.6 1986
23.13 109.3 1986
18.1 108.8 1986
12.78 108.6 1986
12.24 108.9 1986
12.04 109.5 1986
11.03 109.5 1986
10.09 109.7 1986
11.08 110.2 1986
11.79 110.3 1986
12.23 110.4 1986
12.4 110.5 1986
13.86 111.2 1987
15.47 111.6 1987
15.87 112.1 1987
16.57 112.7 1987
16.92 113.1 1987
17.31 113.5 1987
17.77 113.8 1987
18.07 114.4 1987
17.49 115 1987
17.21 115.3 1987
17.12 115.4 1987
16.46 115.4 1987
22.4 115.7 1988
15.2 116 1988
14.24 116.5 1988
14.21 117.1 1988
14.69 117.5 1988
14.68 118 1988
14.02 118.5 1988
13.38 119 1988
13.08 119.8 1988
11.92 120.2 1988
11.52 120.3 1988
12.34 120.5 1988
13.91 121.1 1989
14.84 121.6 1989
15.54 122.3 1989
17.33 123.1 1989
17.97 123.8 1989
17.27 124.1 1989
16.93 124.4 1989
15.95 124.6 1989
16.14 125 1989
16.61 125.6 1989
17.08 125.9 1989
17.72 126.1 1989
18.85 127.4 1990
18.79 128 1990
17.75 128.7 1990
16.02 128.9 1990
14.61 129.2 1990
13.83 129.9 1990
13.92 130.4 1990
19.57 131.6 1990
25.63 132.7 1990
30.08 133.5 1990
29.51 133.8 1990
25.75 133.8 1990
22.98 134.6 1991
18.39 134.8 1991
16.75 135 1991
16.39 135.2 1991
16.57 135.6 1991
16.4 136 1991
16.15 136.2 1991
16.8 136.6 1991
17.14 137.2 1991
17.97 137.4 1991
18.06 137.8 1991
16.6 137.9 1991
14.87 138.1 1992
14.42 138.6 1992
14.48 139.3 1992
15.5 139.5 1992
16.74 139.7 1992
18.27 140.2 1992
18.2 140.5 1992
18.03 140.9 1992
17.86 141.3 1992
18.22 141.8 1992
17.63 142 1992
16.22 141.9 1992
15.5 142.6 1993
15.71 143.1 1993
16.49 143.6 1993
16.69 144 1993
16.71 144.2 1993
16.07 144.4 1993
14.96 144.4 1993
14.51 144.8 1993
14.37 145.1 1993
14.59 145.7 1993
13.72 145.8 1993
12.2 145.8 1993
11.64 146.2 1994
12.09 146.7 1994
11.76 147.2 1994
12.85 147.4 1994
14.05 147.5 1994
15.18 148 1994
16.09 148.4 1994
15.97 149 1994
15 149.4 1994
14.8 149.5 1994
15.31 149.7 1994
14.7 149.7 1994
15.06 150.3 1995
15.53 150.9 1995
15.78 151.4 1995
16.76 151.9 1995
17.4 152.2 1995
16.78 152.5 1995
15.51 152.5 1995
15.22 152.9 1995
15.44 153.2 1995
15.25 153.7 1995
15.1 153.6 1995
15.82 153.5 1995
16.43 154.4 1996
16.1 154.9 1996
17.31 155.7 1996
19.27 156.3 1996
18.9 156.6 1996
17.96 156.7 1996
18.16 157 1996
18.65 157.3 1996
19.97 157.8 1996
21.41 158.3 1996
21.38 158.6 1996
21.63 158.6 1996
21.86 159.1 1997
20.48 159.6 1997
18.76 160 1997
17.13 160.2 1997
17.06 160.1 1997
16.85 160.3 1997
16.41 160.5 1997
16.95 160.8 1997
16.73 161.2 1997
17.71 161.6 1997
17.25 161.5 1997
16.05 161.3 1997
14.31 161.6 1998
13.02 161.9 1998
11.88 162.2 1998
11.77 162.5 1998
11.8 162.8 1998
11.12 163 1998
10.78 163.2 1998
10.55 163.4 1998
10.99 163.6 1998
11.66 164 1998
10.79 164 1998
9.38 163.9 1998
9.21 164.3 1999
9.48 164.5 1999
10.5 165 1999
12.88 166.2 1999
14.6 166.2 1999
14.52 166.2 1999
16.11 166.7 1999
17.88 167.1 1999
19.69 167.9 1999
20.76 168.2 1999
21.05 168.3 1999
22.79 168.3 1999
23.31 168.8 2000
25.14 169.8 2000
26.41 171.2 2000
24.41 171.3 2000
24.28 171.5 2000
26.78 172.4 2000
27.73 172.8 2000
26.59 172.8 2000
29.03 173.7 2000
28.57 174 2000
28.34 174.1 2000
26.4 174 2000
23.19 175.1 2001
23.85 175.8 2001
22.75 176.2 2001
21.66 176.9 2001
22.65 177.7 2001
23.09 178 2001
22.33 177.5 2001
22.14 177.5 2001
23.02 178.3 2001
19.88 177.7 2001
17 177.4 2001
15.46 176.7 2001
16.29 177.1 2002
16.58 177.8 2002
19.27 178.8 2002
22.53 179.8 2002
23.75 179.8 2002
23.35 179.9 2002
23.73 180.1 2002
24.58 180.7 2002
25.49 181 2002
26.25 181.3 2002
24.19 181.3 2002
24.15 180.9 2002
27.76 181.7 2003
30.37 183.1 2003
30.39 184.2 2003
26.01 183.8 2003
24.05 183.5 2003
25.5 183.7 2003
26.75 183.9 2003
27.56 184.6 2003
26.43 185.2 2003
26.28 185 2003
26.54 184.5 2003
27.17 184.3 2003
28.57 185.2 2004
29.17 186.2 2004
30.66 187.4 2004
31 188 2004
33.14 189.1 2004
33.74 189.7 2004
33.38 189.4 2004
36.54 189.5 2004
37.52 189.9 2004
41.84 190.9 2004
41.19 191 2004
36.46 190.3 2004
35.27 190.7 2005
36.93 191.8 2005
41.28 193.3 2005
44.78 194.6 2005
43.04 194.4 2005
44.41 194.5 2005
49.07 195.4 2005
52.85 196.4 2005
57.42 198.8 2005
56.21 199.2 2005
52.16 197.6 2005
49.79 196.8 2005
51.8 198.3 2006
53.86 198.7 2006
52.32 199.8 2006
56.65 201.5 2006
62.04 202.5 2006
62.12 202.9 2006
64.93 203.5 2006
66.13 203.9 2006
62.4 202.9 2006
55.47 201.8 2006
52.22 201.5 2006
53.84 201.8 2006
52.23 202.4 2007
50.71 203.5 2007
53 205.4 2007
57.28 206.7 2007
59.36 207.9 2007
60.95 208.4 2007
65.56 208.3 2007
68.21 207.9 2007
68.51 208.5 2007
72.49 208.9 2007
79.65 210.2 2007
82.76 210 2007




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time0 seconds
R ServerBig Analytics Cloud Computing Center
R Engine error message
Error in names(xdf) <- c("Y", "X") : 
  'names' attribute [2] must be the same length as the vector [0]
Execution halted

\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 time0 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
R Engine error message & 
Error in names(xdf) <- c("Y", "X") : 
  'names' attribute [2] must be the same length as the vector [0]
Execution halted
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=319250&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]0 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [ROW]R Engine error message[/C][C]
Error in names(xdf) <- c("Y", "X") : 
  'names' attribute [2] must be the same length as the vector [0]
Execution halted
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=319250&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319250&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 time0 seconds
R ServerBig Analytics Cloud Computing Center
R Engine error message
Error in names(xdf) <- c("Y", "X") : 
  'names' attribute [2] must be the same length as the vector [0]
Execution halted



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