Home » date » 2008 » Dec » 14 »

Regressie prof bach zonder trend

*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: Sun, 14 Dec 2008 08:03:49 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l.htm/, Retrieved Sun, 14 Dec 2008 16:14:04 +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/2008/Dec/14/t1229267634fmo6zai90r3wj9l.htm/},
    year = {2008},
}
@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 = {2008},
    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 «
13363 0 12530 0 11420 0 10948 0 10173 0 10602 0 16094 0 19631 0 17140 0 14345 0 12632 0 12894 0 11808 0 10673 0 9939 0 9890 0 9283 0 10131 0 15864 0 19283 0 16203 0 13919 0 11937 0 11795 0 11268 0 10522 0 9929 0 9725 0 9372 0 10068 0 16230 0 19115 0 18351 0 16265 0 14103 0 14115 0 13327 0 12618 0 12129 0 11775 0 11493 0 12470 0 20792 0 22337 0 21325 0 18581 0 16475 0 16581 0 15745 0 14453 0 13712 0 13766 0 13336 0 15346 0 24446 0 26178 0 24628 0 21282 0 18850 0 18822 0 18060 0 17536 0 16417 0 15842 0 15188 0 16905 0 25430 0 27962 0 26607 0 23364 0 20827 0 20506 0 19181 0 18016 0 17354 0 16256 0 15770 0 17538 0 26899 0 28915 0 25247 0 22856 0 19980 0 19856 0 16994 0 16839 0 15618 0 15883 0 15513 0 17106 0 25272 0 26731 0 22891 0 19583 0 16939 0 16757 0 15435 0 14786 0 13680 0 13208 0 12707 0 14277 0 22436 1 23229 1 18241 1 16145 1 13994 1 14780 1 13100 1 12329 1 12463 1 11532 1 10784 1 13106 1 19491 1 20418 1 16094 1 14491 1 13067 1
 
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
NWWZPB[t] = + 16469.4642301711 -2119.17807153966Dummy[t] -1429.44642301712M1[t] -2227.34642301710M2[t] -2991.44642301711M3[t] -3375.04642301711M4[t] -3895.64642301711M5[t] -2502.64642301711M6[t] + 5249.77138413685M7[t] + 7334.27138413685M8[t] + 4627.07138413685M9[t] + 2037.47138413686M10[t] -165.228615863145M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16469.46423017111044.80313715.763200
Dummy-2119.17807153966825.989405-2.56560.0116970.005848
M1-1429.446423017121434.624155-0.99640.3213290.160665
M2-2227.346423017101434.624155-1.55260.1235080.061754
M3-2991.446423017111434.624155-2.08520.0394550.019727
M4-3375.046423017111434.624155-2.35260.020490.010245
M5-3895.646423017111434.624155-2.71540.0077290.003865
M6-2502.646423017111434.624155-1.74450.0839770.041989
M75249.771384136851436.4723883.65460.0004020.000201
M87334.271384136851436.4723885.10581e-061e-06
M94627.071384136851436.4723883.22110.0016960.000848
M102037.471384136861436.4723881.41840.1590120.079506
M11-165.2286158631451436.472388-0.1150.9086440.454322


Multiple Linear Regression - Regression Statistics
Multiple R0.773655826489416
R-squared0.598543337861021
Adjusted R-squared0.553095413845287
F-TEST (value)13.1698719099647
F-TEST (DF numerator)12
F-TEST (DF denominator)106
p-value4.44089209850063e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3122.29336517236
Sum Squared Residuals1033363880.96913


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11336315040.0178071540-1677.01780715405
21253014242.1178071540-1712.11780715397
31142013478.0178071539-2058.01780715395
41094813094.4178071540-2146.41780715398
51017312573.8178071540-2400.81780715397
61060213966.8178071540-3364.81780715397
71609421719.2356143079-5625.23561430794
81963123803.7356143079-4172.73561430794
91714021096.5356143079-3956.53561430793
101434518506.9356143079-4161.93561430793
111263216304.2356143079-3672.23561430793
121289416469.4642301711-3575.46423017108
131180815040.0178071540-3232.01780715396
141067314242.1178071540-3569.11780715396
15993913478.0178071540-3539.01780715397
16989013094.4178071540-3204.41780715396
17928312573.8178071540-3290.81780715397
181013113966.8178071540-3835.81780715397
191586421719.2356143079-5855.23561430793
201928323803.7356143079-4520.73561430793
211620321096.5356143079-4893.53561430793
221391918506.9356143079-4587.93561430793
231193716304.2356143079-4367.23561430793
241179516469.4642301711-4674.46423017108
251126815040.0178071540-3772.01780715395
261052214242.1178071540-3720.11780715396
27992913478.0178071540-3549.01780715397
28972513094.4178071540-3369.41780715396
29937212573.8178071540-3201.81780715396
301006813966.8178071540-3898.81780715397
311623021719.2356143079-5489.23561430793
321911523803.7356143079-4688.73561430793
331835121096.5356143079-2745.53561430793
341626518506.9356143079-2241.93561430793
351410316304.2356143079-2201.23561430793
361411516469.4642301711-2354.46423017107
371332715040.0178071540-1713.01780715396
381261814242.1178071540-1624.11780715397
391212913478.0178071540-1349.01780715397
401177513094.4178071540-1319.41780715396
411149312573.8178071540-1080.81780715396
421247013966.8178071540-1496.81780715397
432079221719.2356143079-927.23561430793
442233723803.7356143079-1466.73561430793
452132521096.5356143079228.464385692070
461858118506.935614307974.0643856920689
471647516304.2356143079170.764385692069
481658116469.4642301711111.535769828924
491574515040.0178071540704.982192846043
501445314242.1178071540210.882192846034
511371213478.0178071540233.982192846033
521376613094.4178071540671.582192846035
531333612573.8178071540762.182192846036
541534613966.81780715401379.18219284603
552444621719.23561430792726.76438569207
562617823803.73561430792374.26438569207
572462821096.53561430793531.46438569207
582128218506.93561430792775.06438569207
591885016304.23561430792545.76438569207
601882216469.46423017112352.53576982892
611806015040.01780715403019.98219284604
621753614242.11780715403293.88219284603
631641713478.01780715402938.98219284603
641584213094.41780715402747.58219284604
651518812573.81780715402614.18219284604
661690513966.81780715402938.18219284603
672543021719.23561430793710.76438569207
682796223803.73561430794158.26438569207
692660721096.53561430795510.46438569207
702336418506.93561430794857.06438569207
712082716304.23561430794522.76438569207
722050616469.46423017114036.53576982893
731918115040.01780715404140.98219284604
741801614242.11780715403773.88219284603
751735413478.01780715403875.98219284603
761625613094.41780715403161.58219284604
771577012573.81780715403196.18219284604
781753813966.81780715403571.18219284603
792689921719.23561430795179.76438569207
802891523803.73561430795111.26438569207
812524721096.53561430794150.46438569207
822285618506.93561430794349.06438569207
831998016304.23561430793675.76438569207
841985616469.46423017113386.53576982892
851699415040.01780715401953.98219284604
861683914242.11780715402596.88219284603
871561813478.01780715402139.98219284603
881588313094.41780715402788.58219284604
891551312573.81780715402939.18219284604
901710613966.81780715403139.18219284603
912527221719.23561430793552.76438569207
922673123803.73561430792927.26438569207
932289121096.53561430791794.46438569207
941958318506.93561430791076.06438569207
951693916304.2356143079634.764385692069
961675716469.4642301711287.535769828924
971543515040.0178071540394.982192846043
981478614242.1178071540543.882192846034
991368013478.0178071540201.982192846033
1001320813094.4178071540113.582192846035
1011270712573.8178071540133.182192846036
1021427713966.8178071540310.182192846034
1032243619600.05754276832835.94245723173
1042322921684.55754276831544.44245723173
1051824118977.3575427683-736.357542768274
1061614516387.7575427683-242.757542768274
1071399414185.0575427683-191.057542768274
1081478014350.2861586314429.713841368582
1091310012920.8397356143179.160264385701
1101232912122.9397356143206.060264385692
1111246311358.83973561431104.16026438569
1121153210975.2397356143556.760264385692
1131078410454.6397356143329.360264385692
1141310611847.63973561431258.36026438569
1151949119600.0575427683-109.057542768273
1162041821684.5575427683-1266.55754276827
1171609418977.3575427683-2883.35754276827
1181449116387.7575427683-1896.75754276827
1191306714185.0575427683-1118.05754276827


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.08303826482872230.1660765296574450.916961735171278
170.03255486020094250.0651097204018850.967445139799058
180.01126868722152470.02253737444304940.988731312778475
190.003998508010629340.007997016021258680.99600149198937
200.001334125245199580.002668250490399160.9986658747548
210.0005861313990697350.001172262798139470.99941386860093
220.0002075042623602550.000415008524720510.99979249573764
238.23165124524506e-050.0001646330249049010.999917683487548
244.65073923434916e-059.30147846869831e-050.999953492607657
253.86934386513920e-057.73868773027839e-050.999961306561349
262.52560623995084e-055.05121247990169e-050.9999747439376
271.28419827489997e-052.56839654979995e-050.99998715801725
286.36620330616772e-061.27324066123354e-050.999993633796694
292.68845847100334e-065.37691694200668e-060.999997311541529
301.33828036938885e-062.67656073877769e-060.99999866171963
311.37790652941587e-062.75581305883175e-060.99999862209347
321.29658177592963e-062.59316355185926e-060.999998703418224
333.53585602014736e-067.07171204029473e-060.99999646414398
341.60454233595579e-053.20908467191157e-050.99998395457664
353.59347979007866e-057.18695958015731e-050.9999640652021
367.61754473215877e-050.0001523508946431750.999923824552678
378.59324956725822e-050.0001718649913451640.999914067504327
380.0001174736860286440.0002349473720572880.999882526313971
390.0002062626510976540.0004125253021953090.999793737348902
400.0003144825875977540.0006289651751955080.999685517412402
410.0005833544272985010.001166708854597000.999416645572701
420.001725297149918170.003450594299836330.998274702850082
430.05408366091592720.1081673218318540.945916339084073
440.1542137480004080.3084274960008160.845786251999592
450.3364142263829580.6728284527659160.663585773617042
460.5059779529758140.9880440940483710.494022047024186
470.6397667917642390.7204664164715230.360233208235761
480.7562462147344740.4875075705310530.243753785265526
490.8153193557548340.3693612884903310.184680644245166
500.8598947292079750.2802105415840490.140105270792024
510.8945774831132990.2108450337734020.105422516886701
520.9191093627964810.1617812744070370.0808906372035187
530.9376369516883580.1247260966232840.0623630483116421
540.9658989942017720.0682020115964560.034101005798228
550.9944460285316970.01110794293660690.00555397146830345
560.9981699807001380.003660038599724280.00183001929986214
570.9993520179546920.001295964090616270.000647982045308135
580.9996107549660870.0007784900678252530.000389245033912626
590.999706069960320.0005878600793613950.000293930039680697
600.9997613535011250.0004772929977506920.000238646498875346
610.9998036953474410.0003926093051173880.000196304652558694
620.999851976440360.0002960471192818140.000148023559640907
630.9998630241048280.0002739517903449660.000136975895172483
640.9998554201171890.0002891597656225490.000144579882811274
650.9998360867929720.0003278264140562970.000163913207028148
660.9998358065943220.0003283868113566830.000164193405678341
670.9998861175727450.0002277648545107210.000113882427255361
680.9999115687032680.0001768625934640798.84312967320397e-05
690.999977345916894.53081662208595e-052.26540831104298e-05
700.9999891201516732.17596966548284e-051.08798483274142e-05
710.99999338539281.32292143982477e-056.61460719912383e-06
720.9999938746396871.22507206264998e-056.12536031324991e-06
730.9999954038244659.19235107047918e-064.59617553523959e-06
740.9999950768377879.84632442510167e-064.92316221255084e-06
750.9999948958346561.02083306876851e-055.10416534384256e-06
760.999992324409331.53511813389010e-057.67559066945049e-06
770.9999885839041742.28321916527237e-051.14160958263618e-05
780.9999837949056323.24101887354721e-051.62050943677360e-05
790.9999839711262753.20577474493164e-051.60288737246582e-05
800.9999887451361162.25097277676580e-051.12548638838290e-05
810.9999947753773471.04492453050846e-055.2246226525423e-06
820.9999981717522243.65649555114977e-061.82824777557488e-06
830.9999988722936072.25541278567546e-061.12770639283773e-06
840.9999988160769312.36784613722021e-061.18392306861010e-06
850.9999972501707795.49965844261199e-062.74982922130600e-06
860.999995128647829.74270436199236e-064.87135218099618e-06
870.9999885575347522.28849304962878e-051.14424652481439e-05
880.9999826563927273.46872145468521e-051.73436072734260e-05
890.9999783649357554.32701284897922e-052.16350642448961e-05
900.9999678617095956.42765808097887e-053.21382904048943e-05
910.9999372153465860.0001255693068290056.27846534145025e-05
920.9999141925663730.0001716148672528758.58074336264374e-05
930.9999619084386057.6183122789205e-053.80915613946025e-05
940.9999528874581649.4225083672467e-054.71125418362335e-05
950.9999066168975940.0001867662048128199.33831024064093e-05
960.9996931596608260.0006136806783486970.000306840339174348
970.9990862256875590.00182754862488280.0009137743124414
980.9975290654365190.004941869126962820.00247093456348141
990.9930052012150710.01398959756985800.00699479878492902
1000.9811808693462150.03763826130757040.0188191306537852
1010.9539389138395630.09212217232087380.0460610861604369
1020.893028890764740.2139422184705210.106971109235261
1030.8671512499354350.265697500129130.132848750064565


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level670.761363636363636NOK
5% type I error level710.806818181818182NOK
10% type I error level740.840909090909091NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/10bcdf1229267024.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/10bcdf1229267024.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/1a8ul1229267023.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/1a8ul1229267023.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/202ya1229267023.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/202ya1229267023.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/3slf11229267023.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/3slf11229267023.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/4fhgg1229267023.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/4fhgg1229267023.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/50v441229267023.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/50v441229267023.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/659lt1229267023.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/659lt1229267023.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/79p0y1229267024.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/79p0y1229267024.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/8561k1229267024.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/8561k1229267024.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/917651229267024.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229267634fmo6zai90r3wj9l/917651229267024.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly 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