Home » date » 2010 » Dec » 21 »

Multiple Regression + 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: Tue, 21 Dec 2010 15:23:43 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd.htm/, Retrieved Tue, 21 Dec 2010 16:22:55 +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/2010/Dec/21/t1292944964xuwwfbxit2ql7xd.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
143827 829461 4.93 5.01 639.98 3536.15 0.94 109.57 9113 145191 837669 4.92 5.02 597.33 3240.92 0.92 107.08 9140 146832 854793 4.83 4.94 558.36 3121.58 0.91 110.33 9309 148577 850092 5.02 5.10 593.09 3302.70 0.89 110.36 9395 149873 848783 5.22 5.26 585.15 3292.49 0.87 106.50 10027 151847 846150 5.17 5.21 573.50 3162.62 0.85 104.30 10202 153252 828543 5.17 5.25 548.72 3051.60 0.86 107.21 10003 154292 830389 4.98 5.06 523.63 2848.11 0.90 109.34 9745 155657 848989 4.98 5.04 453.87 2577.68 0.91 108.20 9966 156523 841106 4.77 4.82 460.33 2680.55 0.91 109.86 10035 156416 854616 4.62 4.67 492.67 2775.70 0.89 108.68 9999 156693 832714 4.89 4.95 506.78 2879.30 0.89 113.38 9943 160312 839290 4.97 5.02 500.92 2790.11 0.88 117.12 10258 160438 840572 5.03 5.07 494.91 2764.18 0.87 116.23 10926 160882 869186 5.27 5.31 531.21 2868.37 0.88 114.75 10807 161668 856979 5.25 5.29 511.28 2740.50 0.89 115.81 10992 164391 872126 5.30 5.31 484.55 2622.87 0.92 115.86 11034 168556 868281 5.16 5.17 439.66 2376.70 0.96 11 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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
SpaarNL[t] = + 163359.285691595 -0.00511639901504985Leningen[t] -4556.23358889816`10jNL`[t] + 5905.93974904935`10JEUR`[t] + 14.3954082341892AEX[t] -6.30634407009315EURO[t] + 14539.9291299438USD[t] -165.267194365423YEN[t] -0.841801515944616GOLD[t] + 1415.54540154119t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)163359.2856915957625.71944221.422100
Leningen-0.005116399015049850.006574-0.77830.4380840.219042
`10jNL`-4556.233588898163830.29621-1.18950.2368420.118421
`10JEUR`5905.939749049354132.9955911.4290.1558980.077949
AEX14.395408234189225.2510360.57010.56980.2849
EURO-6.306344070093154.722774-1.33530.1845840.092292
USD14539.92912994385423.0209472.68110.0084880.004244
YEN-165.26719436542344.478054-3.71570.0003230.000161
GOLD-0.8418015159446160.263546-3.19410.0018380.000919
t1415.5454015411961.58724922.984400


Multiple Linear Regression - Regression Statistics
Multiple R0.99846895888183
R-squared0.996940261850567
Adjusted R-squared0.996685283671447
F-TEST (value)3909.90423295619
F-TEST (DF numerator)9
F-TEST (DF denominator)108
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2578.58320831735
Sum Squared Residuals718101867.11935


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1143827142457.9686581641369.03134183552
2145191145281.986279036-90.9862790358115
3146832145914.332220177917.66777982295
4148577146422.7917526422154.20824735776
5149873147643.9406237132229.0593762867
6151847149582.2445740232264.75542597704
7153252151499.5143629721752.48563702833
8154292154018.030716043273.969283957106
9155657156069.259007234-412.259007233676
10156523156294.472166544228.527833456124
11156416157238.459518720-822.459518719695
12156693158009.711388118-1316.71138811800
13160312158889.9681046681422.0318953316
14160438159837.249452076600.750547924295
15160882161785.988140232-903.98814023227
16161668163570.969816305-1902.96981630491
17164391165548.929078877-1157.92907887676
18168556168158.529577656397.470422344337
19169738171078.799202706-1340.79920270629
20170387172059.143926021-1672.14392602055
21171294173605.876499018-2311.87649901755
22172202174126.656006378-1924.65600637841
23172651175359.548413569-2708.54841356878
24172770177007.29886667-4237.29886667007
25178366178809.407248346-443.40724834638
26180014179796.251906156217.748093844117
27181067182083.688305948-1016.68830594800
28182586182515.01071013370.9892898670477
29184957183436.3397895341520.66021046555
30186417184193.3596121212223.64038787887
31188599186105.9585925602493.04140744036
32189490187311.8483771022178.15162289784
33190264189189.4087034961074.59129650393
34191221191541.91399101-320.913991009880
35191110192755.335187484-1645.33518748401
36190674193784.830375089-3110.83037508885
37195438195417.68329046720.3167095330140
38196393196478.576833867-85.576833866655
39197172197435.49352453-263.493524530107
40198760199097.855713035-337.855713034768
41200945199907.7680287361037.23197126447
42203845201680.4532360282164.54676397171
43204613202964.8158880991648.18411190094
44205487203809.3270813851677.67291861455
45206100204823.8741197421276.12588025843
46206315206030.030235034284.969764966115
47206291207739.557150494-1448.55715049436
48207801209254.162552281-1453.16255228133
49211653210799.820741574853.17925842625
50211325211682.066443877-357.066443876836
51211893213035.105183719-1142.1051837193
52212056213692.427181070-1636.42718107032
53214696214748.23364279-52.2336427900669
54217455215157.8558155212297.14418447864
55218884216160.4130111592723.58698884120
56219816217620.8400284582195.15997154235
57219984217690.2378873132293.76211268687
58219062218228.190260544833.809739456123
59218550218961.390934846-411.390934845769
60218179219453.822990554-1274.82299055441
61222218220338.5965436321879.40345636813
62222196221177.9496482741018.05035172556
63223393222684.785848359708.21415164132
64223292223494.810174259-202.810174259167
65226236225414.834532262821.16546773835
66228831227985.596775979845.40322402126
67228745228211.917307692533.082692307885
68229140229174.971466137-34.9714661367844
69229270230684.316884183-1414.3168841825
70229359231393.668434580-2034.66843458021
71230006232309.880757689-2303.88075768868
72228810233754.436273788-4944.43627378755
73232677234135.787597984-1458.78759798444
74232961235209.974312372-2248.97431237244
75234629236984.581762657-2355.58176265676
76235660237892.134894941-2232.13489494124
77240024238855.8599873551168.14001264511
78243554240460.2346871483093.76531285201
79244368242521.2424459631846.75755403741
80244356244512.673790935-156.673790935265
81245126245414.158456990-288.158456989506
82246321245336.191375218984.808624781528
83246797247373.117581938-576.117581938246
84246735249076.441793252-2341.44179325163
85251083251242.261247465-159.261247465163
86251786252284.919322666-498.91932266632
87252732255759.101927368-3027.10192736785
88255051257384.455687546-2333.45568754605
89259022258877.267976301144.732023699443
90261698260998.249793193699.750206806899
91263891261723.4090258462167.59097415413
92265247263254.7179033591992.28209664062
93262228265472.512065377-3244.51206537666
94263429268617.792576766-5188.79257676606
95264305271753.038203518-7448.0382035176
96266371274385.073816758-8014.0738167583
97273248275912.539097832-2664.53909783210
98275472275700.263768135-228.263768134792
99278146276984.390292551161.60970744989
100279506277255.3697751902250.63022480964
101283991278729.6108117955261.38918820507
102286794280751.0523809776042.94761902315
103288703281913.2261252736789.77387472714
104289285282372.952979586912.04702042007
105288869284090.9905000214778.00949997878
106286942285002.8919298291939.10807017143
107285833285558.18176542274.818234579835
108284095286444.467316664-2349.46731666377
109289229288849.41869007379.581309929754
110289389290484.827517952-1095.82751795222
111290793289945.176359551847.823640448599
112291454291388.75360934965.2463906505897
113294733289143.3985517495589.60144825073
114293853290199.0324665413653.96753345884
115294056294068.031337972-12.0313379725008
116293982295991.035532978-2009.03553297824
117293075297372.287917328-4297.28791732761
118292391297969.11546783-5578.11546782984


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.0179913150169410.0359826300338820.98200868498306
140.003621453851587860.007242907703175720.996378546148412
150.003264299628367370.006528599256734740.996735700371633
160.0008754540265683120.001750908053136620.999124545973432
170.0003650340329642080.0007300680659284150.999634965967036
180.001413439351118590.002826878702237170.998586560648881
190.0008551735938613320.001710347187722660.999144826406139
200.0003212332745838780.0006424665491677560.999678766725416
210.0001175519087523600.0002351038175047200.999882448091248
226.42922296971063e-050.0001285844593942130.999935707770303
232.23247965340882e-054.46495930681765e-050.999977675203466
249.06194171836306e-061.81238834367261e-050.999990938058282
250.0004233758830232060.0008467517660464110.999576624116977
260.0003063369174026450.0006126738348052910.999693663082597
270.0001599763688206220.0003199527376412450.99984002363118
280.0002213091196121850.0004426182392243690.999778690880388
290.0001244830745827540.0002489661491655090.999875516925417
307.51619754065383e-050.0001503239508130770.999924838024594
310.0001294403282921250.0002588806565842500.999870559671708
320.0001090280767175070.0002180561534350150.999890971923282
335.0880365344347e-050.0001017607306886940.999949119634656
343.78073587802619e-057.56147175605238e-050.99996219264122
354.59141382070229e-059.18282764140459e-050.999954085861793
360.0002494019871343020.0004988039742686040.999750598012866
370.0001377846729806540.0002755693459613070.99986221532702
386.79725833571144e-050.0001359451667142290.999932027416643
393.37200371605893e-056.74400743211787e-050.99996627996284
401.68734337423874e-053.37468674847748e-050.999983126566258
417.73093478098704e-061.54618695619741e-050.99999226906522
426.19234578764639e-061.23846915752928e-050.999993807654212
433.09986016427993e-066.19972032855987e-060.999996900139836
441.47546301624552e-062.95092603249103e-060.999998524536984
457.71501240219258e-071.54300248043852e-060.99999922849876
465.60684586713251e-071.12136917342650e-060.999999439315413
477.88529321871885e-071.57705864374377e-060.999999211470678
486.15014093667822e-071.23002818733564e-060.999999384985906
493.69236387777684e-077.38472775555368e-070.999999630763612
501.68175040753512e-073.36350081507023e-070.99999983182496
511.20627283087422e-072.41254566174844e-070.999999879372717
521.30917026852344e-072.61834053704688e-070.999999869082973
536.41414575769216e-081.28282915153843e-070.999999935858542
545.95039348256161e-071.19007869651232e-060.999999404960652
556.53150512241161e-071.30630102448232e-060.999999346849488
564.69972744362684e-079.39945488725368e-070.999999530027256
579.56782935810309e-071.91356587162062e-060.999999043217064
581.32424022460484e-062.64848044920968e-060.999998675759775
591.26436860096712e-062.52873720193423e-060.9999987356314
607.62471951771604e-071.52494390354321e-060.999999237528048
612.83865373242596e-065.67730746485191e-060.999997161346268
622.59232651762368e-065.18465303524735e-060.999997407673482
633.78951503946241e-067.57903007892482e-060.99999621048496
642.38851114587251e-064.77702229174502e-060.999997611488854
655.94244385233266e-061.18848877046653e-050.999994057556148
661.28956853348646e-052.57913706697292e-050.999987104314665
673.07284423952201e-056.14568847904402e-050.999969271557605
685.10753396061095e-050.0001021506792122190.999948924660394
695.28070448501469e-050.0001056140897002940.99994719295515
700.0001241800317977350.0002483600635954710.999875819968202
710.0002709563978654180.0005419127957308360.999729043602135
720.001083203388211730.002166406776423460.998916796611788
730.001031524969936070.002063049939872140.998968475030064
740.0006814772479465580.001362954495893120.999318522752053
750.0004526128726750770.0009052257453501530.999547387127325
760.0002684632952625450.0005369265905250890.999731536704737
770.0004048183685600720.0008096367371201440.99959518163144
780.0008993673063714330.001798734612742870.999100632693629
790.0009482136069616870.001896427213923370.999051786393038
800.00058851298544860.00117702597089720.999411487014551
810.0003625460632403410.0007250921264806810.99963745393676
820.0002491744455225400.0004983488910450810.999750825554477
830.0004700206172108720.0009400412344217450.99952997938279
840.0003049254957871930.0006098509915743850.999695074504213
850.0006102495367253030.001220499073450610.999389750463275
860.001250443105021080.002500886210042150.998749556894979
870.001987138393672440.003974276787344890.998012861606328
880.01030785253870850.0206157050774170.989692147461291
890.04159892181295570.08319784362591140.958401078187044
900.03768724843934390.07537449687868780.962312751560656
910.1709015980365060.3418031960730120.829098401963494
920.1525677131333200.3051354262666400.84743228686668
930.1309529206376200.2619058412752390.86904707936238
940.3770476027696890.7540952055393780.622952397230311
950.4671353466899620.9342706933799230.532864653310038
960.4740674067263030.9481348134526060.525932593273697
970.5194589586952570.9610820826094860.480541041304743
980.5444618098504350.9110763802991310.455538190149565
990.4820873174394020.9641746348788030.517912682560598
1000.9051033100878280.1897933798243430.0948966899121716
1010.9576711037195140.08465779256097120.0423288962804856
1020.9490133990454770.1019732019090470.0509866009545235
1030.9129848831354510.1740302337290980.0870151168645488
1040.8677462509200090.2645074981599820.132253749079991
1050.926919176100270.1461616477994610.0730808238997303


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level740.795698924731183NOK
5% type I error level760.817204301075269NOK
10% type I error level790.849462365591398NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/107nqi1292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/107nqi1292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/1tva91292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/1tva91292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/2tva91292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/2tva91292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/3tva91292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/3tva91292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/4l5rc1292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/4l5rc1292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/5l5rc1292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/5l5rc1292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/6l5rc1292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/6l5rc1292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/7eeqf1292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/7eeqf1292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/8eeqf1292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/8eeqf1292945013.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/97nqi1292945013.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944964xuwwfbxit2ql7xd/97nqi1292945013.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 = 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