Home » date » 2009 » Nov » 27 »

Verbetering Workshop 7

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 27 Nov 2009 06:21:09 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe.htm/, Retrieved Fri, 27 Nov 2009 14:22:32 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
384 257,9 367,6 275,8 457,1 319,4 429,4 299,8 442,2 331,1 507,5 339,3 348,5 209,6 393,2 280,9 426,8 285,5 403 247,6 454,8 275,1 413 262,3 388,9 267,8 406,5 448,2 447,4 563,4 474,4 346,6 428,5 455,1 472,8 424,4 411 381,2 463,9 382,9 497,3 466,6 474 400,2 518,1 493,6 566 367,5 509,4 307,1 445,1 316,7 466,6 314,2 600,5 403,7 538,7 370,6 548 343,7 591,9 383 547,3 365,4 610,2 417,2 621,6 411 582,4 420,8 635,8 493 663,9 471,8 624,2 452,4 654,1 464,8 723,5 541,5 641,2 484 565,5 449,4 698,6 436,8 651 490 721,6 475,4 643,5 393,6 604 486,8 618,2 536,7 783,5 467 672,9 475,5 726,7 532,8 738,6 554,1 692,2 507,3 669,5 455,2 546,2 465,3 715 563,2 789,8 680,1 684 518,2 639 426,6 768,5 612,4 643,8 518,1 623 540 692,8 541,7 936,5 627,6 795,9 637 695,7 564,2 648,3 665 675,2 703,2 826,5 824,4 742,4 700,3 793,9 1219,6 685,3 764,7 756,1 479,9 704 543,4 860,6 593,3 795,9 584,3 816,7 645,9 777,9 548,9 746,4 421,8 694,7 460,3 909,2 553,4 783,6 424,4 730 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
yt[t] = + 196.193390381622 + 0.97222446927995xt[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)196.19339038162230.8835636.352700
xt0.972224469279950.05457417.814800


Multiple Linear Regression - Regression Statistics
Multiple R0.853794014428263
R-squared0.728964219073528
Adjusted R-squared0.726667305675846
F-TEST (value)317.366871475954
F-TEST (DF numerator)1
F-TEST (DF denominator)118
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation117.144117054869
Sum Squared Residuals1619283.81094664


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1384446.930081008918-62.9300810089183
2367.6464.332899009031-96.732899009031
3457.1506.721885869637-49.6218858696371
4429.4487.66628627175-58.2662862717502
5442.2518.096912160213-75.8969121602126
6507.5526.069152808308-18.5691528083082
7348.5399.971639142699-51.4716391426987
8393.2469.291243802359-76.0912438023591
9426.8473.763476361047-46.9634763610469
10403436.916168975337-33.9161689753368
11454.8463.652341880535-8.85234188053544
12413451.207868673752-38.2078686737521
13388.9456.555103254792-67.6551032547918
14406.5631.944397512895-225.444397512895
15447.4743.944656373945-296.544656373945
16474.4533.166391434052-58.7663914340519
17428.5638.652746350926-210.152746350926
18472.8608.805455144032-136.005455144032
19411566.805358071138-155.805358071138
20463.9568.458139668914-104.558139668914
21497.3649.833327747646-152.533327747646
22474585.277622987457-111.277622987457
23518.1676.083388418204-157.983388418204
24566553.48588284200312.5141171579973
25509.4494.76352489749414.6364751025061
26445.1504.096879802581-58.9968798025813
27466.6501.666318629381-35.0663186293814
28600.5588.68040862993711.8195913700631
29538.7556.49977869677-17.7997786967706
30548530.3469404731417.6530595268601
31591.9568.55536211584223.3446378841580
32547.3551.444211456515-4.14421145651486
33610.2601.8054389652168.39456103478386
34621.6595.7776472556825.8223527443195
35582.4605.305447054624-22.9054470546241
36635.8675.500053736636-39.7000537366364
37663.9654.8888949879019.01110501209853
38624.2636.02774028387-11.8277402838704
39654.1648.0833237029426.01667629705822
40723.5722.6529404967140.847059503286108
41641.2666.750033513117-25.5500335131168
42565.5633.111066876031-67.6110668760305
43698.6620.86103856310377.7389614368968
44651672.583380328796-21.5833803287965
45721.6658.3889030773163.2110969226908
46643.5578.8609414902164.6390585097906
47604669.4722620271-65.4722620271007
48618.2717.98626304417-99.7862630441701
49783.5650.222217535358133.277782464642
50672.9658.48612552423714.4138744757627
51726.7714.19458761397812.5054123860218
52738.6734.9029688096413.69703119035875
53692.2689.402863647342.79713635266041
54669.5638.74996879785430.7500312021457
55546.2648.569435937582-102.369435937582
56715743.750211480089-28.7502114800888
57789.8857.403251938915-67.6032519389149
58684700.000110362491-16.0001103624911
59639610.94434897644828.0556510235522
60768.5791.583655368662-23.0836553686623
61643.8699.902887915563-56.1028879155631
62623721.194603792794-98.194603792794
63692.8722.84738539057-30.0473853905700
64936.5806.361467301718130.138532698282
65795.9815.500377312949-19.6003773129491
66695.7744.722435949369-49.0224359493687
67648.3842.722662452788-194.422662452788
68675.2879.861637179282-204.661637179282
69826.5997.695242856011-171.195242856011
70742.4877.04218621837-134.642186218370
71793.91381.91835311545-588.018353115447
72685.3939.653442039999-254.353442039999
73756.1662.76391318906993.336086810931
74704724.500166988346-20.5001669883458
75860.6773.01416800541587.5858319945848
76795.9764.26414778189631.6358522181043
77816.7824.15317508954-7.4531750895405
78777.9729.84740156938648.0525984306145
79746.4606.277671523904140.122328476096
80694.7643.70831359118250.991686408818
81909.2734.222411681145174.977588318855
82783.6608.805455144032174.794544855968
83730.4653.33333583705377.0666641629465
84847.7728.19461997161119.505380028390
85758.7628.638834317343130.061165682657
86839.2708.26401835137130.935981648629
87784.8777.8752903518156.92470964818499
88906.1724.597389435274181.502610564726
89838.2819.58372008392518.6162799160752
90729706.61123675359522.3887632464053
91768.1703.20845111111564.8915488888851
92710.5732.666852530297-22.1668525302973
93863724.79183432913138.208165670870
94778.3655.180562328685123.119437671315
95827.7670.638931390237157.061068609763
96853.1821.13927923477331.9607207652273
97859.3781.18085354736778.1191464526331
98779.2734.70852391578544.4914760842148
99724.6704.18067558039520.4193244196052
100829.2748.80577872034580.3942212796555
101862.9852.83379693329910.0662030667009
102601.6681.430622999244-79.830622999244
103964.9730.333513804025234.566486195975
104766.3712.6390284631353.6609715368695
105847.8763.29192331261684.5080766873842
106992.7708.069573457515284.630426542485
107865.3695.138988016091170.161011983909
1081054.1905.042250933632149.057749066368
109972.5928.95897287791943.5410271220809
110857.4752.014119468968105.385880531032
1111043.3858.181031514339185.118968485661
1121061932.750648308111128.249351691889
113989.4979.22297793969210.1770220603075
114963.2864.79215790544398.4078420945576
1151181.91120.5844157730061.315584227003
1161256.41228.6957767569327.7042232430727
1171492.71275.94588596393216.754114036067
1181360.81264.5708596733696.2291403266424
1191342.81233.55689910333109.243100896673
12014641518.51589104928-54.5158910492802


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.00690083788509380.01380167577018760.993099162114906
60.003320742525171410.006641485050342820.996679257474829
70.001286484834886380.002572969669772760.998713515165114
80.0002920388669785430.0005840777339570850.999707961133022
96.30250238829106e-050.0001260500477658210.999936974976117
102.29752418172646e-054.59504836345291e-050.999977024758183
112.22934397131453e-054.45868794262906e-050.999977706560287
125.32167234897169e-061.06433446979434e-050.999994678327651
131.29627255788566e-062.59254511577132e-060.999998703727442
145.28566396782272e-050.0001057132793564540.999947143360322
153.29380999791753e-056.58761999583505e-050.99996706190002
162.11362448747642e-054.22724897495284e-050.999978863755125
179.694879920924e-061.9389759841848e-050.99999030512008
184.57679316648509e-069.15358633297017e-060.999995423206834
192.09473314408442e-064.18946628816885e-060.999997905266856
209.51763227453465e-071.90352645490693e-060.999999048236773
216.26005774531525e-071.25201154906305e-060.999999373994225
223.015893181375e-076.03178636275e-070.999999698410682
232.39369811241985e-074.78739622483969e-070.999999760630189
244.37997448119579e-068.75994896239159e-060.999995620025519
256.14952583534122e-061.22990516706824e-050.999993850474165
262.76217839002568e-065.52435678005137e-060.99999723782161
271.41947041766316e-062.83894083532633e-060.999998580529582
281.4162209032819e-052.8324418065638e-050.999985837790967
291.61330242499726e-053.22660484999452e-050.99998386697575
302.39175356140545e-054.7835071228109e-050.999976082464386
316.14066360631152e-050.0001228132721262300.999938593363937
326.01181968719802e-050.0001202363937439600.999939881803128
330.0001175865610343470.0002351731220686940.999882413438966
340.0002334590575256680.0004669181150513360.999766540942474
350.0002134790833646750.0004269581667293490.999786520916635
360.000230270685680420.000460541371360840.99976972931432
370.0003485714581225450.000697142916245090.999651428541877
380.0003248249820347440.0006496499640694880.999675175017965
390.0003548551405608970.0007097102811217940.99964514485944
400.0004215581190792430.0008431162381584860.99957844188092
410.0003173924269271000.0006347848538542010.999682607573073
420.0002164025685242780.0004328051370485550.999783597431476
430.0004133991482745530.0008267982965491060.999586600851725
440.0003009233490616750.0006018466981233510.999699076650938
450.0004232763100011150.0008465526200022310.99957672369
460.0004780754840474620.0009561509680949250.999521924515953
470.0003364836721004970.0006729673442009940.9996635163279
480.0002669495150763120.0005338990301526230.999733050484924
490.0008529691863214630.001705938372642930.999147030813679
500.0006549184532487950.001309836906497590.999345081546751
510.0004953477905986670.0009906955811973330.999504652209401
520.0003518639269679620.0007037278539359250.999648136073032
530.0002441551139512820.0004883102279025650.999755844886049
540.0001869501985381190.0003739003970762370.999813049801462
550.0001900875496525080.0003801750993050150.999809912450347
560.0001248449508357030.0002496899016714060.999875155049164
578.38847381307245e-050.0001677694762614490.99991611526187
585.56139618157054e-050.0001112279236314110.999944386038184
594.19491024582443e-058.38982049164886e-050.999958050897542
602.62535315791874e-055.25070631583747e-050.999973746468421
611.92158431404067e-053.84316862808134e-050.99998078415686
621.95525080778254e-053.91050161556507e-050.999980447491922
631.31632964088945e-052.63265928177891e-050.999986836703591
643.12088274396559e-056.24176548793118e-050.99996879117256
651.92526240074891e-053.85052480149782e-050.999980747375993
661.38864902569803e-052.77729805139607e-050.999986113509743
676.17164784883315e-050.0001234329569766630.999938283521512
680.0002515770503644030.0005031541007288060.999748422949636
690.0003917194768911060.0007834389537822120.999608280523109
700.0005222103617704490.001044420723540900.99947778963823
710.4773120189299550.954624037859910.522687981070045
720.8680491030995810.2639017938008370.131950896900419
730.8719022510887280.2561954978225430.128097748911272
740.8844496794788850.2311006410422310.115550320521115
750.8963987980312640.2072024039374710.103601201968736
760.8957274815473840.2085450369052330.104272518452616
770.9044717319580850.1910565360838300.0955282680419152
780.9002867171073150.1994265657853700.0997132828926848
790.9053099741016570.1893800517966850.0946900258983427
800.8952502080975610.2094995838048780.104749791902439
810.9299031843706680.1401936312586650.0700968156293325
820.942879271704430.1142414565911390.0571207282955696
830.9324361243627240.1351277512745530.0675638756372764
840.9307785614368350.1384428771263300.0692214385631649
850.9249201031678050.1501597936643890.0750798968321947
860.922975100051850.1540497998963010.0770248999481506
870.918087694132110.1638246117357820.0819123058678908
880.9371985603490470.1256028793019060.0628014396509532
890.9294873616791050.1410252766417910.0705126383208954
900.9202684218364680.1594631563270640.0797315781635319
910.9025218591767620.1949562816464770.0974781408232385
920.9151990696189460.1696018607621070.0848009303810537
930.9065655420616130.1868689158767740.0934344579383868
940.8874929621695850.225014075660830.112507037830415
950.879990998886710.240018002226580.12000900111329
960.8610120536734310.2779758926531370.138987946326569
970.8302100656332260.3395798687335470.169789934366774
980.8018155792724830.3963688414550350.198184420727517
990.7910751644237620.4178496711524750.208924835576238
1000.7500719131355210.4998561737289580.249928086864479
1010.7451386181978290.5097227636043430.254861381802171
1020.9286599421580430.1426801156839130.0713400578419567
1030.9420252079921260.1159495840157480.0579747920078739
1040.94458553885090.1108289222981980.0554144611490991
1050.9347691739613510.1304616520772970.0652308260386486
1060.9704582015439410.05908359691211820.0295417984560591
1070.955982424320290.08803515135942120.0440175756797106
1080.938779398118430.1224412037631380.061220601881569
1090.9195196761177990.1609606477644030.0804803238822014
1100.877886739853790.244226520292420.12211326014621
1110.8514833376970070.2970333246059870.148516662302993
1120.7805361518533060.4389276962933880.219463848146694
1130.7564844656208420.4870310687583170.243515534379158
1140.6774444198961270.6451111602077470.322555580103873
1150.6236563526411250.752687294717750.376343647358875


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level650.585585585585586NOK
5% type I error level660.594594594594595NOK
10% type I error level680.612612612612613NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/101ilo1259328064.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/101ilo1259328064.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/19usy1259328063.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/19usy1259328063.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/2ffd21259328063.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/2ffd21259328063.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/3v5dp1259328063.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/3v5dp1259328063.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/47u1d1259328063.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/47u1d1259328063.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/531lr1259328064.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/531lr1259328064.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/6hjlx1259328064.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/6hjlx1259328064.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/7mun01259328064.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/7mun01259328064.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/81cd91259328064.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/81cd91259328064.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/9syoc1259328064.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328140f3buq1891lum2xe/9syoc1259328064.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by