Home » date » 2010 » Dec » 19 »

Multiple Regression with monthly dummy, linear trend & history

*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, 19 Dec 2010 11:09:13 +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/19/t12927573032zqfadyfjqoqjz8.htm/, Retrieved Sun, 19 Dec 2010 12:15:15 +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/19/t12927573032zqfadyfjqoqjz8.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 «
185705 0 194519 198112 206010 180173 0 185705 194519 198112 176142 0 180173 185705 194519 203401 0 176142 180173 185705 221902 0 203401 176142 180173 197378 0 221902 203401 176142 185001 0 197378 221902 203401 176356 0 185001 197378 221902 180449 0 176356 185001 197378 180144 0 180449 176356 185001 173666 0 180144 180449 176356 165688 0 173666 180144 180449 161570 0 165688 173666 180144 156145 0 161570 165688 173666 153730 0 156145 161570 165688 182698 0 153730 156145 161570 200765 0 182698 153730 156145 176512 0 200765 182698 153730 166618 0 176512 200765 182698 158644 0 166618 176512 200765 159585 0 158644 166618 176512 163095 0 159585 158644 166618 159044 0 163095 159585 158644 155511 0 159044 163095 159585 153745 0 155511 159044 163095 150569 0 153745 155511 159044 150605 0 150569 153745 155511 179612 0 150605 150569 153745 194690 0 179612 150605 150569 189917 0 194690 179612 150605 184128 0 189917 194690 179612 175335 0 184128 189917 194690 179566 0 175335 184128 189917 1 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 time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Werkloosheid[t] = + 284.896369125289 + 1060.52423815882Dummy_crisis[t] + 1.02699351092810past_1[t] + 0.155831521445659past_2[t] -0.205239464638224past_3[t] + 1263.58435127132M1[t] + 178.280372103877M2[t] + 6888.79005240301M3[t] + 37094.0396228534M4[t] + 11132.9463352077M5[t] -18376.0718371182M6[t] -5228.27257574756M7[t] + 236.519978481622M8[t] + 10697.3178260887M9[t] + 5169.33729366704M10[t] -430.547119867729M11[t] -2.12042340352418t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)284.8963691252893608.9837740.07890.9372080.468604
Dummy_crisis1060.524238158821438.8438870.73710.4624850.231243
past_11.026993510928100.0885511.597900
past_20.1558315214456590.1269961.22710.2221430.111072
past_3-0.2052394646382240.088547-2.31790.0221080.011054
M11263.584351271321931.3595540.65420.5141750.257087
M2178.2803721038771935.2236660.09210.9267490.463375
M36888.790052403011934.3808183.56120.0005260.000263
M437094.03962285342018.91042518.373300
M511132.94633520773700.080963.00880.0031820.001591
M6-18376.07183711823566.193741-5.15291e-060
M7-5228.272575747562373.865222-2.20240.0294990.014749
M8236.5199784816222418.8395440.09780.9222640.461132
M910697.31782608872106.0465025.07931e-061e-06
M105169.337293667042178.9116452.37240.0192220.009611
M11-430.5471198677292007.994763-0.21440.8305770.415289
t-2.1204234035241814.680244-0.14440.8853890.442694


Multiple Linear Regression - Regression Statistics
Multiple R0.986914685206737
R-squared0.974000595876712
Adjusted R-squared0.970618559567992
F-TEST (value)287.992353413032
F-TEST (DF numerator)16
F-TEST (DF denominator)123
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4556.99410942278
Sum Squared Residuals2554242023.53761


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1185705189906.823315737-4201.82331573672
2180173180828.556743004-655.556743004448
3176142181219.544263869-5077.54426386897
4203401208229.783233049-4828.78323304861
5221902210768.61349182011133.3865081804
6197378205333.013566815-7955.01356681463
7185001190581.119954474-5580.11995447396
8176356175713.945833337642.054166662494
9180449180398.83024542350.1697545774773
10180144180265.299080756-121.299080755628
11173666176762.174812059-3096.17481205877
12165688169650.163801926-3962.16380192562
13161570161771.394940399-201.394940398751
14156145156541.128633659-396.128633658824
15153730158673.76433734-4943.76433734005
16182698186396.494267033-3698.49426703306
17200765190920.319551929844.68044807997
18176512184973.653538468-8461.6535384676
19166618170081.690042214-3463.69004221429
20158644157895.845078677748.15492132296
21159585163601.151909427-4016.15190942741
22163095159825.4905585083269.50944149149
23159044159611.449897633-567.449897633386
24155511156233.364185378-722.364185377562
25153745152514.796024881230.20397512012
26150569149894.573387992674.426612008183
27150605153791.143815874-3186.14381587361
28179612183898.776711754-4286.77671175358
29194690188383.0142466596306.98575334132
30189917178869.70013055011047.2998694497
31184128183509.785470454618.214529545693
32175335179188.807666842-3853.80766684196
33179566180694.630436524-1128.63043652406
34181140179327.6437181551812.35628184532
35177876177806.12044721869.8795527823011
36175041174259.350963884781.64903611626
37169292171777.607284931-2485.60728493119
38166070165014.1164373151055.88356268468
39166972168099.511067459-1127.51106745888
40206348199906.820881476441.17911852988
41215706215184.345244134521.654755866055
42202108201234.70791501873.292084989844
43195411193792.0912094711618.90879052915
44193111188337.3598589084773.64014109151
45195198198181.194749006-2983.19474900637
46198770195810.5054458452959.49455415466
47194163194674.192583867-511.192583867205
48190420190499.555607390-79.5556073895916
49189733186465.9516368663267.04836313436
50186029185035.243521104993.756478895732
51191531188600.803874432930.19612557009
52232571224018.2508753758552.74912462508
53243477241820.4428608291656.55713917128
54227247228775.793600971-1528.79360097138
55217859218529.838700709-670.838700709201
56208679209583.608556534-904.608556534398
57213188212482.575738165705.424261835487
58216234212079.4432502674154.55674973334
59213586212192.4032631931393.59673680729
60209465209450.58921098914.4107890109594
61204045205442.011602246-1397.01160224602
62200237198689.5747729291547.42522707077
63203666201488.3577277492177.6422722507
64241476235732.0390884435743.96091155728
65260307249915.34819396410391.6518060357
66243324244931.748104138-1607.74810413768
67244460235810.3553683858649.64463161505
68233575235928.341040311-2353.34104031093
69237217238870.800534375-1653.80053437533
70235243235151.63180258591.3681974146975
71230354230323.91174876730.0882512328984
72227184224676.2736167582507.72638324229
73221678222325.450509831-647.450509831471
74217142216092.8296557241049.17034427606
75219452217935.3770928731516.62290712692
76256446250934.0579611845511.94203881558
77265845264254.3792195481590.62078045239
78248624249686.680774078-1062.68077407771
79241114239018.5360755932095.46392440658
80229245232155.866580399-2910.86658039874
81231805232789.292117875-984.29211787463
82219277229580.07860142-10303.0786014200
83219313213946.8149602665366.18503973356
84212610211934.543092979675.456907021002
85214771208888.9194648555882.08053514453
86211142208968.9007304232173.09926957711
87211457213662.802585475-2205.80258547452
88240048243180.399614054-3132.39961405426
89240636247373.858320378-6737.8583203777
90230580222857.3205073667722.67949263427
91208795219899.180000579-11104.1800005786
92197922201301.075910971-3379.07591097084
93194596199262.351252561-4666.35125256148
94194581193093.2554838551487.74451614546
95185686189189.118802935-3503.11880293547
96178106181162.727206259-3056.72720625931
97172608173256.537530003-648.537530002586
98167302167167.104909748134.895090252149
99168053169125.220034708-1072.22003470848
100202300200401.1858322531898.81416774735
101202388210815.448961934-8427.44896193402
102182516186577.313072172-4061.31307217238
103173476172299.4540893981176.54591060160
104166444165363.3598143781080.64018562222
105171297171270.02055715726.9794428430532
106169701171483.476611390-1782.47661138953
107164182166441.884419922-2259.88441992176
108161914159957.5996994571956.40030054276
109159612158357.3703632441254.62963675588
110151001155685.097613216-4684.09761321628
111158114153656.8046909424457.19530905835
112186530191356.058935808-4826.05893580753
113187069197451.639473334-10382.6394733338
114174330171462.2905814232867.70941857730
115169362165777.0076465763584.99235342371
116166827164041.8141919752785.18580802508
117178037173737.437607464299.56239254
118186413180344.5306625976068.46933740323
119189226185611.7768714563614.22312854406
120191563187933.6467391953629.35326080478
121188906190314.462816119-1408.46281611885
122186005186285.156306603-280.156306603116
123195309189120.5484069566188.45159304432
124223532228972.079193507-5440.07919350746
125226899234038.959503828-7139.95950382777
126214126210474.193110163651.80688984001
127206903205234.2951552661668.70484473448
128204442200597.5158557953844.48414420475
129220375210024.71485202710350.2851479733
130214320221956.644784623-7636.64478462309
131212588213124.152192684-536.152192683516
132205816207560.185875786-1744.18587578599
133202196202839.674510889-643.674510889282
134195722197334.717288282-1612.71728828201
135198563198220.122102326342.877897674109
136229139231075.053406071-1936.05340607067
137229527238284.630931654-8757.63093165386
138211868213353.585098850-1485.58509884976
139203555202148.6462868801406.35371311974
140195770196242.459611872-472.459611872152


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.01183140241303870.02366280482607730.988168597586961
210.01440702428926080.02881404857852160.98559297571074
220.004802191264311480.009604382528622960.995197808735689
230.003044168064443310.006088336128886630.996955831935557
240.01100938353496110.02201876706992230.988990616465039
250.006282992652840860.01256598530568170.99371700734716
260.00240171985874210.00480343971748420.997598280141258
270.0009656382514221170.001931276502844230.999034361748578
280.0006754827556229860.001350965511245970.999324517244377
290.002341611936237960.004683223872475910.997658388063762
300.1972801739987810.3945603479975620.802719826001219
310.2465454446164070.4930908892328130.753454555383593
320.2106050143351070.4212100286702130.789394985664894
330.2920449803918020.5840899607836040.707955019608198
340.3224550618232570.6449101236465140.677544938176743
350.2677363388105880.5354726776211750.732263661189412
360.2118975851683250.4237951703366510.788102414831675
370.218902794818170.437805589636340.78109720518183
380.1783839610989140.3567679221978290.821616038901085
390.1481860468114720.2963720936229430.851813953188528
400.2196478621697880.4392957243395750.780352137830212
410.3289868117548950.6579736235097890.671013188245105
420.2763610790639070.5527221581278140.723638920936093
430.2287915358601460.4575830717202930.771208464139854
440.2160517873550450.4321035747100900.783948212644955
450.2013096627140150.4026193254280290.798690337285985
460.1597124749925990.3194249499851990.8402875250074
470.1374890782968750.2749781565937490.862510921703125
480.1136325008221170.2272650016442340.886367499177883
490.08709490005362960.1741898001072590.91290509994637
500.06843667120896380.1368733424179280.931563328791036
510.06368447804349990.1273689560870000.9363155219565
520.1098553831635200.2197107663270410.89014461683648
530.105327496916320.210654993832640.89467250308368
540.09363986777751180.1872797355550240.906360132222488
550.09627475349964250.1925495069992850.903725246500358
560.0970661459731530.1941322919463060.902933854026847
570.07897550920861730.1579510184172350.921024490791383
580.06349817835248860.1269963567049770.936501821647511
590.047946614952210.095893229904420.95205338504779
600.03837211911048910.07674423822097820.96162788088951
610.03803705190515140.07607410381030290.961962948094849
620.03015485281022620.06030970562045230.969845147189774
630.02281828015099230.04563656030198460.977181719849008
640.02009186141773220.04018372283546430.979908138582268
650.0723835631871250.144767126374250.927616436812875
660.05950009124332050.1190001824866410.94049990875668
670.1130721071566470.2261442143132940.886927892843353
680.1012629433041510.2025258866083030.898737056695849
690.09171011776638750.1834202355327750.908289882233613
700.0982440186714140.1964880373428280.901755981328586
710.08235781540188210.1647156308037640.917642184598118
720.06389597518266770.1277919503653350.936104024817332
730.05500259112383980.1100051822476800.94499740887616
740.04430689810715520.08861379621431050.955693101892845
750.03301464622599150.06602929245198310.966985353774009
760.04065894878474340.08131789756948680.959341051215257
770.1178010653761380.2356021307522770.882198934623862
780.1000265002506860.2000530005013720.899973499749314
790.08986104754285640.1797220950857130.910138952457144
800.0894830652252410.1789661304504820.910516934774759
810.07706690035972920.1541338007194580.922933099640271
820.3613628618784430.7227257237568850.638637138121557
830.3588835232223910.7177670464447830.641116476777609
840.3198124762846200.6396249525692410.68018752371538
850.3626879901699070.7253759803398140.637312009830093
860.3852628193901170.7705256387802340.614737180609883
870.3547533240218790.7095066480437570.645246675978121
880.3768946463488940.7537892926977880.623105353651106
890.6354501211930390.7290997576139210.364549878806960
900.8935053142113040.2129893715773920.106494685788696
910.9530847414613320.09383051707733520.0469152585386676
920.9519889839995370.09602203200092650.0480110160004633
930.9670025200690580.0659949598618850.0329974799309425
940.9601845446570250.07963091068595050.0398154553429753
950.9507441740343160.09851165193136770.0492558259656839
960.9489133211627430.1021733576745150.0510866788372573
970.9294908256707920.1410183486584170.0705091743292084
980.9119606133458310.1760787733083380.088039386654169
990.907424666387890.1851506672242200.0925753336121102
1000.9417039690857340.1165920618285330.0582960309142664
1010.9553018391702840.08939632165943240.0446981608297162
1020.9506253219789480.0987493560421030.0493746780210515
1030.9310780773238450.1378438453523100.0689219226761548
1040.905845011369460.1883099772610820.094154988630541
1050.9177322306287480.1645355387425040.082267769371252
1060.8843206393327820.2313587213344360.115679360667218
1070.8623621021903960.2752757956192070.137637897809604
1080.8145665196855540.3708669606288930.185433480314446
1090.7785291897220740.4429416205558510.221470810277926
1100.7458213176442110.5083573647115780.254178682355789
1110.6815438893672990.6369122212654010.318456110632701
1120.6285749059125740.7428501881748530.371425094087426
1130.6577794427097730.6844411145804550.342220557290227
1140.6267956122248240.7464087755503520.373204387775176
1150.5759097189479930.8481805621040140.424090281052007
1160.5379165798572530.9241668402854940.462083420142747
1170.965781149451050.06843770109790150.0342188505489508
1180.9291616562160120.1416766875679760.070838343783988
1190.8517361179448530.2965277641102930.148263882055147
1200.8799698135950240.2400603728099530.120030186404976


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level60.0594059405940594NOK
5% type I error level120.118811881188119NOK
10% type I error level270.267326732673267NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/10mj0h1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/10mj0h1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/1xi3n1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/1xi3n1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/28r3q1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/28r3q1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/38r3q1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/38r3q1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/48r3q1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/48r3q1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/501kb1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/501kb1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/601kb1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/601kb1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/7bajw1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/7bajw1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/8bajw1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/8bajw1292756941.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/9mj0h1292756941.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t12927573032zqfadyfjqoqjz8/9mj0h1292756941.ps (open in new window)


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