Home » date » 2009 » Nov » 27 »

Verbetering Workshop 7 (linear 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: Fri, 27 Nov 2009 06:37:40 -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/t1259329132deia2e6by501j6a.htm/, Retrieved Fri, 27 Nov 2009 14:39:06 +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/t1259329132deia2e6by501j6a.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] = + 219.151207387327 + 0.532138256307442xt[t] + 3.48234302529478t + e[t]


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


Multiple Linear Regression - Regression Statistics
Multiple R0.933737552987903
R-squared0.871865817859836
Adjusted R-squared0.869675489960005
F-TEST (value)398.052646787162
F-TEST (DF numerator)2
F-TEST (DF denominator)117
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation80.8886789273304
Sum Squared Residuals765528.470297224


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1384359.8720067143124.1279932856903
2367.6372.879624527508-5.27962452750764
3457.1399.56319552780857.5368044721924
4429.4392.61562872947736.7843712705234
5442.2412.75389917719429.4461008228056
6507.5420.5997759042186.9002240957899
7348.5355.063787086430-6.56378708642963
8393.2396.487587786445-3.28758778644505
9426.8402.41776679075424.3822332092459
10403385.73206990199717.2679300980032
11454.8403.84821497574650.9517850242538
12413400.51918832030612.4808116796943
13388.9406.928291755291-18.0282917552915
14406.5506.408376218449-99.9083762184489
15447.4571.193046370361-123.793046370361
16474.4459.30781542820215.0921845717977
17428.5520.527159262855-92.0271592628546
18472.8507.672857819511-34.8728578195108
19411488.166828172324-77.1668281723241
20463.9492.553806233342-28.6538062333415
21497.3540.576121311569-43.2761213115693
22474508.72448411805-34.7244841180499
23518.1561.90854028246-43.8085402824597
24566498.28824918738667.711750812614
25509.4469.62944153171139.7705584682887
26445.1478.220311817558-33.1203118175575
27466.6480.372309202084-13.7723092020837
28600.5531.48102616689569.0189738331054
29538.7517.34959290841321.3504070915870
30548506.51741683903841.4825831609624
31591.9530.91279333721560.9872066627851
32547.3525.02950305149922.2704969485013
33610.2556.07660775351954.1233922464811
34621.6556.25969358970865.3403064102925
35582.4564.95699152681517.4430084731847
36635.8606.85971665750728.9402833424925
37663.9599.06072864908464.8392713509156
38624.2592.21958950201531.9804104979853
39654.1602.30044690552251.7995530944781
40723.5646.59779418959776.9022058104025
41641.2619.48218747721421.7178125227857
42565.5604.552546834272-39.0525468342716
43698.6601.32994783009397.2700521699074
44651633.12204609094317.8779539090567
45721.6628.83517057414992.7648294258506
46643.5588.78860423349554.7113957665046
47604641.866232746644-37.8662327466438
48618.2671.90227476168-53.70227476168
49783.5638.294581322346145.205418677654
50672.9646.30009952625426.5999004737459
51726.7680.27396463796546.4260353620348
52738.6695.09085252260943.5091474773914
53692.2673.66912515271518.5308748472850
54669.5649.42706502439220.0729349756079
55546.2658.284004438392-112.084004438392
56715713.8626827561851.13731724381453
57789.8779.5519879438210.2480120561797
58684696.88114727294-12.8811472729401
59639651.619626020473-12.6196260204732
60768.5753.9732570676914.5267429323093
61643.8707.274962523194-63.4749625231937
62623722.411133361621-99.4111333616214
63692.8726.798111422639-33.9981114226389
64936.5775.991130664743160.508869335257
65795.9784.47557329932811.4244267006723
66695.7749.21825126544-53.5182512654406
67648.3806.340130526526-158.040130526526
68675.2830.150154942765-154.950154942765
69826.5898.127654632522-71.6276546325215
70742.4835.571640050063-93.1716400500627
71793.91115.39337957581-321.493379575812
72685.3876.806029806852-191.506029806852
73756.1728.73539743578727.3646025642133
74704766.008519736604-62.0085197366041
75860.6796.0445617516464.5554382483598
76795.9794.7376604701681.16233952983195
77816.7830.999720084001-14.2997200840012
78777.9782.864652247474-4.96465224747415
79746.4718.71222289609327.687777103907
80694.7742.681888789224-47.9818887892243
81909.2795.706303476742113.493696523258
82783.6730.54281143837753.0571885616234
83730.4758.397086602552-27.9970866025523
84847.7802.8540753635244.8459246364799
85758.7751.8454609429336.85453905706722
86839.2798.90992715980740.2900728401929
87784.8840.493369336715-55.6933693367149
88906.1814.81453591636291.2854640836383
89838.2870.286786582894-32.0867865828936
90729811.934664225264-82.9346642252636
91768.1813.554523353482-45.4545233534823
92710.5833.160655544893-122.660655544893
93863832.33267869409730.6673213059029
94778.3797.713922567779-19.4139225677791
95827.7809.65726386836218.0427361316379
96853.1895.514608970049-42.4146089700489
97859.3877.126069661108-17.8260696611080
98779.2855.172204034907-75.9722040349069
99724.6841.945405812148-117.345405812148
100829.2869.852894801954-40.6528948019543
101862.9930.274031252146-67.3740312521455
102601.6839.940399690438-238.340399690438
103964.9870.18929700799794.7107029920027
104766.3863.986723768497-97.6867237684967
105847.8895.19346994741-47.3934699474092
106992.7868.450360014441124.249639985559
107865.3864.8552642308470.444735769152932
1081054.1983.22625679291970.8737432070812
109972.5999.799200923376-27.2992009233765
110857.4906.432381300717-49.0323813007168
1111043.3968.02422191478475.2757780852157
11210611012.3215691988648.6784308011401
113989.41041.24012087565-51.8401208756504
114963.2982.08979113356-18.8897911335591
1151181.91125.5777093933456.322290606658
1161256.41188.2338265200268.1661734799757
1171492.71217.57808880186275.121911198139
1181360.81214.83441422836145.965585771641
1191342.81201.34154687745141.458453122554
12014641360.79361282645103.206387173548


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.04829693832434910.09659387664869820.95170306167565
70.01311127831449210.02622255662898430.986888721685508
80.006941152324807820.01388230464961560.993058847675192
90.001847029052411570.003694058104823130.998152970947588
100.000549158890294870.001098317780589740.999450841109705
110.0002373413315306920.0004746826630613840.99976265866847
126.52204849877258e-050.0001304409699754520.999934779515012
135.99641144538465e-050.0001199282289076930.999940035885546
140.004241140225112860.008482280450225730.995758859774887
150.002606524664886350.005213049329772700.997393475335114
160.002287940507178020.004575881014356040.997712059492822
170.001194382421763690.002388764843527380.998805617578236
180.0006608084541004890.001321616908200980.9993391915459
190.0003515217629275410.0007030435258550820.999648478237072
200.000186813734539120.000373627469078240.999813186265461
210.0001201730881765470.0002403461763530940.999879826911823
225.80579087332107e-050.0001161158174664210.999941942091267
233.91642662870171e-057.83285325740342e-050.999960835733713
240.0002016207368953280.0004032414737906550.999798379263105
250.0001153650347049460.0002307300694098930.999884634965295
267.39834310907211e-050.0001479668621814420.99992601656891
273.47716427367558e-056.95432854735115e-050.999965228357263
280.0001274425055366650.0002548850110733300.999872557494463
297.13613674250322e-050.0001427227348500640.999928638632575
304.22318871063767e-058.44637742127535e-050.999957768112894
314.22761034192644e-058.45522068385288e-050.99995772389658
322.04252209052502e-054.08504418105004e-050.999979574779095
331.86962480364268e-053.73924960728535e-050.999981303751964
341.75035743914682e-053.50071487829363e-050.999982496425609
358.42158648904236e-061.68431729780847e-050.99999157841351
365.78830673002131e-061.15766134600426e-050.99999421169327
376.18319614534959e-061.23663922906992e-050.999993816803855
383.13157578148031e-066.26315156296063e-060.999996868424219
391.98495320834875e-063.96990641669749e-060.999998015046792
403.50940531517262e-067.01881063034524e-060.999996490594685
411.72172743621085e-063.44345487242169e-060.999998278272564
422.20538759850763e-064.41077519701526e-060.999997794612401
432.43312394403445e-064.8662478880689e-060.999997566876056
441.23854610755725e-062.47709221511449e-060.999998761453892
451.41000497269454e-062.82000994538909e-060.999998589995027
468.74758698595195e-071.74951739719039e-060.999999125241301
471.05965728917715e-062.11931457835431e-060.99999894034271
481.09661722792096e-062.19323445584192e-060.999998903382772
495.83672091453394e-061.16734418290679e-050.999994163279085
503.68821031203128e-067.37642062406255e-060.999996311789688
512.54721112262536e-065.09442224525073e-060.999997452788877
521.78793511501615e-063.5758702300323e-060.999998212064885
531.18749628052936e-062.37499256105871e-060.99999881250372
549.71036115575942e-071.94207223115188e-060.999999028963884
551.58530341336100e-053.17060682672199e-050.999984146965866
569.87652389175888e-061.97530477835178e-050.999990123476108
576.7230009628663e-061.34460019257326e-050.999993276999037
585.00767098244217e-061.00153419648843e-050.999994992329018
595.00140162200815e-061.00028032440163e-050.999994998598378
603.39087726827611e-066.78175453655223e-060.999996609122732
614.48877385642188e-068.97754771284376e-060.999995511226144
629.5674389812725e-061.9134877962545e-050.999990432561019
636.65410746920935e-061.33082149384187e-050.99999334589253
640.0001984178375959220.0003968356751918440.999801582162404
650.0001643848074966680.0003287696149933360.999835615192503
660.0001468537458845250.0002937074917690500.999853146254115
670.0004387205079343090.0008774410158686180.999561279492066
680.0007906956250557180.001581391250111440.999209304374944
690.000494931479942280.000989862959884560.999505068520058
700.0003742130322745540.0007484260645491080.999625786967725
710.01447161285449350.0289432257089870.985528387145507
720.09220241048624270.1844048209724850.907797589513757
730.07467112575404030.1493422515080810.92532887424596
740.07842646574847660.1568529314969530.921573534251523
750.07244110960680960.1448822192136190.92755889039319
760.05612336748001290.1122467349600260.943876632519987
770.04737909324514970.09475818649029930.95262090675485
780.03654648264763320.07309296529526630.963453517352367
790.03090621253889380.06181242507778760.969093787461106
800.03071261284912560.06142522569825120.969287387150874
810.04525491969081420.09050983938162830.954745080309186
820.04716108665999370.09432217331998740.952838913340006
830.04016314438610170.08032628877220350.959836855613898
840.03565664325374770.07131328650749540.964343356746252
850.03228898981806210.06457797963612420.967711010181938
860.03179685139862530.06359370279725070.968203148601375
870.0251587950184960.0503175900369920.974841204981504
880.05063097567289460.1012619513457890.949369024327105
890.03737386868541820.07474773737083640.962626131314582
900.03617994424202930.07235988848405860.96382005575797
910.02920154021842110.05840308043684230.970798459781579
920.03870857594093240.07741715188186490.961291424059068
930.03768863969652430.07537727939304860.962311360303476
940.03280467353586590.06560934707173190.967195326464134
950.03801872771752760.07603745543505520.961981272282472
960.02717949069566560.05435898139133120.972820509304335
970.02219247220415260.04438494440830530.977807527795847
980.01707262792885230.03414525585770460.982927372071148
990.01712453878147640.03424907756295290.982875461218524
1000.01169267535308760.02338535070617510.988307324646912
1010.007664378093548230.01532875618709650.992335621906452
1020.1394442705444040.2788885410888070.860555729455596
1030.1857073715721410.3714147431442810.81429262842786
1040.2051170771301520.4102341542603040.794882922869848
1050.1934905963136870.3869811926273740.806509403686313
1060.3508546827929990.7017093655859970.649145317207001
1070.285060863797610.570121727595220.71493913620239
1080.2979831865843340.5959663731686680.702016813415666
1090.2283285967670700.4566571935341410.77167140323293
1100.1679736408553580.3359472817107160.832026359144642
1110.1730689082868440.3461378165736880.826931091713156
1120.1456987852614210.2913975705228420.854301214738579
1130.1199606691131580.2399213382263170.880039330886841
1140.09899359581741170.1979871916348230.901006404182588


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level620.568807339449541NOK
5% type I error level700.642201834862385NOK
10% type I error level900.825688073394495NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/10xal11259329055.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/10xal11259329055.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/1azqg1259329055.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/1azqg1259329055.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/4kl181259329055.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/4kl181259329055.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/5bde41259329055.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/5bde41259329055.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/77wxl1259329055.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/77wxl1259329055.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/8m8ny1259329055.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259329132deia2e6by501j6a/8m8ny1259329055.ps (open in new window)


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


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = 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