Home » date » 2010 » Nov » 26 »

Time Series Analysis WS8 - Lineaire 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, 26 Nov 2010 08:01:28 +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/Nov/26/t12907584850l1h0ac3hde65jv.htm/, Retrieved Fri, 26 Nov 2010 09:01:35 +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/Nov/26/t12907584850l1h0ac3hde65jv.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 «
43880 25222 43110 21333 44496 19778 44164 25943 40399 21698 36763 20077 37903 25673 35532 19094 35533 19306 32110 15443 33374 15179 35462 18288 33508 18264 36080 16406 34560 15678 38737 19657 38144 18821 37594 19493 36424 21078 36843 19296 37246 19985 38661 16972 40454 16951 44928 23126 48441 24890 48140 21042 45998 20842 47369 23904 49554 22578 47510 25452 44873 21928 45344 25227 42413 26210 36912 17436 43452 21258 42142 25638 44382 23516 43636 23891 44167 24617 44423 26174 42868 23339 43908 23660 42013 26500 38846 22469 35087 23163 33026 16170 34646 18267 37135 20561 37985 20372 43121 19017 43722 18242 43630 20937 42234 22065 39351 16731 39327 21943 35704 19254 30466 16397 28155 13644 29257 14375 29998 14814 32529 16061 34787 14784 33855 12824 34556 18282 31348 14936 30805 15701 28353 16394 24514 13085 21106 11431 21346 9334 23335 10921 24379 11725 26290 13077 30084 11794 29429 11047 30632 16797 27349 11482 27264 12657 27474 15277 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 time29 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
OPENVAC[t] = + 1845.12534861158 + 1.62106650935412OntvangenJobs[t] + 1398.53510581224M1[t] + 6074.8953918953M2[t] + 7089.78142291843M3[t] + 2738.34574444754M4[t] + 3642.41998058522M5[t] + 3207.92209473057M6[t] -1101.43725899311M7[t] -196.286404771903M8[t] -1715.09730769288M9[t] + 3278.45278852018M10[t] + 2723.69286893376M11[t] + 54.6959568227012t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1845.125348611582490.088110.7410.4602110.230106
OntvangenJobs1.621066509354120.09502817.058800
M11398.535105812241370.8294191.02020.309770.154885
M26074.89539189531374.7371714.4192.3e-051.1e-05
M37089.781422918431381.2675565.13281e-061e-06
M42738.345744447541377.4110921.9880.0491830.024592
M53642.419980585221370.3195062.65810.0089780.004489
M63207.922094730571369.4939662.34240.0208790.010439
M7-1101.437258993111389.479576-0.79270.4295860.214793
M8-196.2864047719031371.315133-0.14310.8864320.443216
M9-1715.097307692881369.961069-1.25190.2131350.106568
M103278.452788520181456.5015792.25090.0262920.013146
M112723.692868933761423.7202181.91310.0582240.029112
t54.695956822701213.2163964.13856.7e-053.3e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.927238341877822
R-squared0.859770942648332
Adjusted R-squared0.843918962252056
F-TEST (value)54.2374467514695
F-TEST (DF numerator)13
F-TEST (DF denominator)115
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3134.31537081502
Sum Squared Residuals1129752277.02864


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14388044184.8959101759-304.895910175923
24311042611.6244982036498.375501796364
34449641160.44806400383335.55193599617
44416446857.5833725238-2693.58337252377
54039940934.9262332759-535.926233275927
63676337927.3754925810-1164.37549258096
73790342744.2002820256-4841.2002820256
83553233039.05052802882492.94947197121
93553331918.60168191363614.39831808643
103211030704.66780931441405.33219068561
113337429776.64228808123597.35771191881
123546232147.54115355213314.45884644792
133350833561.8666199625-53.8666199625254
143608035280.9812884883799.01871151166
153456035170.4268575244-610.426857524371
163873737323.91077659621413.08922340380
173814436927.46936773661216.53063226345
183759437637.0241329906-43.0241329905656
193642435951.7511534159472.248846584139
203684334022.85744479072820.14255520927
213724633675.65732363743570.34267636256
223866133839.62998398924821.37001601075
234045433305.52362452917148.4763754709
244492840646.61240767974281.38759232029
254844144959.40479281533481.59520718469
264814043452.59710772644687.40289227358
274599844197.96579370141800.03420629856
284736944864.93172369552504.06827630445
294955443674.16772525245879.83227474762
304751047953.3109441042-443.310944104159
314487337986.00916823936886.99083176073
324534444293.75439364241050.24560635759
334241344423.1478262392-2010.14782623923
343691235248.1563262021663.84367379803
354345240943.80856218972508.19143781031
364214245375.0829610497-3233.08296104966
374438243388.4108908352993.589109164828
384363648727.3670747487-5091.36707474871
394416750973.8433483856-6806.84334838564
404442349201.1041818018-4778.1041818018
414286845564.1508207433-2696.15082074328
424390845704.711241214-1796.71124121400
434201346053.8767308787-4040.87673087871
443884640479.2044427162-1633.20444271617
453508740140.1096541096-5053.10965410965
463302633852.2376072321-826.237607232074
473464636751.5501145839-2105.55011458394
483713537801.2797749312-666.279774931224
493798538948.1292672982-963.129267298244
504312141482.64039002921638.35960997083
514372241295.89583312562426.10416687443
524363041367.93035418672262.06964581329
534223444155.2635696986-1921.26356969855
543935135128.69287977174222.30712022826
553932739323.02812962443.97187037558654
563570435923.8270970151-219.827097015101
573046629828.3251336921637.674866307889
582815530413.775086476-2258.77508647599
592925731098.7107420501-1841.71074205013
602999829141.3620275455856.637972454467
613252932616.0630273451-87.0630273450646
623478735277.0173378056-490.017337805609
633385533169.3089673174685.69103268262
643455637720.3502537239-3164.35025372395
653134833255.0319063855-1907.03190638547
663080534115.3458570094-3310.34585700942
672835330984.0815510908-2631.08155109084
682451426579.819282682-2065.81928268197
692110622434.460330112-1328.46033011198
702134624083.3299130322-2737.32991303217
712333526155.8985006134-2820.89850061343
722437924790.2390620231-411.239062023083
732629028435.1520453048-2145.15204530480
743008431086.3799567092-1002.37995670922
752942930945.0252620675-1516.02526206753
763063235969.4179692055-5337.4179692055
772734928312.2196649488-963.219664948766
782726429837.1708844079-2573.1708844079
792747429829.7017420147-2355.70174201470
802448226101.4242080065-1619.42420800650
812145324006.7143897695-2553.71438976947
821878823217.4999426211-4429.49994262106
831928223581.4644293431-4299.46442934309
841971322548.1236251703-2835.12362517034
852191726483.2075136264-4566.20751362644
862381228111.5424576284-4299.54245762841
872378528649.4146304061-4864.4146304061
882469627262.4892930485-2566.48929304854
892456226671.5199030664-2109.5199030664
902358026087.4635938558-2507.46359385583
912493923842.92266855401096.07733144605
922389926041.2642927444-2142.2642927444
932145422711.3017943795-1257.30179437953
941976123363.2154740469-3602.21547404693
951981523710.9692956754-3895.96929567542
962078025837.0871182338-5057.08711823384
972346225487.692222467-2025.69222246701
982500526568.1066863073-1563.10668630729
992472526673.1541010874-1948.15410108743
1002619825487.2410108898710.75898911022
1012754327890.3814636847-347.381463684691
1022647128236.8173308434-1765.81733084338
1032655825081.23702728451476.76297271551
1042531725849.7979902246-532.797990224613
1052289622745.1637366600150.836263340034
1062224820644.50648344411603.49351655592
1072340623966.9173497374-560.917349737367
1082507324885.3406228270187.659377173032
1092769124865.02222845902825.97777154098
1103059929018.97879403471580.02120596529
1113194829780.55814510332167.44185489673
1123294627717.64807334505228.35192665496
1133401231749.96036804082262.03963195916
1143293627503.91481419935432.08518580068
1153297429775.6651839583198.33481604199
1163095128179.09010975052771.90989024952
1172981226520.44718252973291.5528174703
1182901024649.98137364214360.01862635791
1193106828797.51509319662270.48490680337
1203244728884.33124698763562.66875301243
1213484431999.15548171052844.84451828951
1223567632432.76440831853243.23559168152
1233538730055.95899727755331.04100272254
1243648830066.39299098326421.60700901685
1253565234529.90897716711122.09102283285
1263348829538.17282902273949.82717097727
1273291432179.5263629142734.473637085839
1282978130702.9102103988-921.91021039883
1292795127013.0709469573937.929053042652


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.3238298801822190.6476597603644370.676170119817781
180.2003908228039740.4007816456079480.799609177196026
190.2274628774734900.4549257549469810.77253712252651
200.1382763079161230.2765526158322450.861723692083877
210.08237690480075950.1647538096015190.91762309519924
220.07222496545357780.1444499309071560.927775034546422
230.06731717076903340.1346343415380670.932682829230967
240.04489929907952050.0897985981590410.95510070092048
250.02962059766874700.05924119533749410.970379402331253
260.02245563510515170.04491127021030350.977544364894848
270.02061675720889770.04123351441779540.979383242791102
280.01296564988952070.02593129977904150.987034350110479
290.02070214579077810.04140429158155610.979297854209222
300.02079676634199830.04159353268399650.979203233658002
310.1611608741297190.3223217482594380.838839125870281
320.2094683686727770.4189367373455530.790531631327223
330.4240340241755130.8480680483510270.575965975824487
340.467915547189540.935831094379080.53208445281046
350.53913699124090.92172601751820.4608630087591
360.7253814134334960.5492371731330080.274618586566504
370.7095640906531260.5808718186937470.290435909346874
380.8579557905250250.2840884189499500.142044209474975
390.9508941537975920.0982116924048150.0491058462024075
400.967875738140420.06424852371916180.0321242618595809
410.9693653518383830.06126929632323420.0306346481616171
420.9595711836465880.08085763270682470.0404288163534123
430.9654341026392430.06913179472151410.0345658973607571
440.9602839736749140.07943205265017120.0397160263250856
450.983139400717410.0337211985651820.016860599282591
460.9802125751365150.03957484972696900.0197874248634845
470.9838770825236230.03224583495275320.0161229174763766
480.9781245335209450.04375093295811050.0218754664790552
490.9703453319263350.05930933614732960.0296546680736648
500.9662952816084420.0674094367831160.033704718391558
510.9676720226058180.06465595478836460.0323279773941823
520.966808321033510.06638335793297950.0331916789664898
530.958254257933870.08349148413225870.0417457420661293
540.9796980189044330.04060396219113350.0203019810955667
550.9723672028720720.05526559425585560.0276327971279278
560.9686097526730910.06278049465381720.0313902473269086
570.9689706126140610.06205877477187770.0310293873859389
580.9694939414927880.06101211701442430.0305060585072121
590.9758547145780150.04829057084397020.0241452854219851
600.9821663233079450.03566735338411050.0178336766920552
610.983612076011960.03277584797608010.0163879239880400
620.9840240820645440.03195183587091170.0159759179354558
630.9889300136535360.02213997269292910.0110699863464646
640.9861473644783120.02770527104337620.0138526355216881
650.9853741613751770.02925167724964520.0146258386248226
660.9825256795480630.03494864090387310.0174743204519365
670.9781005939542720.04379881209145590.0218994060457280
680.979156241596410.04168751680717760.0208437584035888
690.9791316982842730.04173660343145480.0208683017157274
700.976852361915950.04629527616809860.0231476380840493
710.9800240010491060.03995199790178710.0199759989508935
720.9877087782011670.02458244359766650.0122912217988332
730.9871668599294470.02566628014110670.0128331400705534
740.9915383932204540.01692321355909240.00846160677954619
750.993734852261390.01253029547721840.00626514773860918
760.9916828938620850.01663421227583110.00831710613791554
770.9935297028478450.01294059430431040.0064702971521552
780.9924824390519020.01503512189619520.0075175609480976
790.9923379380522860.01532412389542860.00766206194771431
800.9963603296994540.007279340601091660.00363967030054583
810.9974003884209970.005199223158006190.00259961157900309
820.9965071203571930.006985759285614730.00349287964280736
830.9959196221645810.008160755670837150.00408037783541858
840.9946151674783630.01076966504327470.00538483252163737
850.9921385799178740.01572284016425110.00786142008212553
860.9884221861182710.02315562776345840.0115778138817292
870.9836571388531060.03268572229378720.0163428611468936
880.9767051175996430.04658976480071380.0232948824003569
890.965751858054850.06849628389030190.0342481419451509
900.9508393639466670.09832127210666670.0491606360533333
910.9563416112929940.08731677741401190.0436583887070060
920.9533984504202040.09320309915959260.0466015495797963
930.951455211292290.0970895774154190.0485447887077095
940.9327814275280060.1344371449439890.0672185724719944
950.9117695243034320.1764609513931360.0882304756965678
960.9153615027965470.1692769944069060.0846384972034532
970.8989374461257080.2021251077485850.101062553874292
980.8749896908997890.2500206182004230.125010309100211
990.8897916386014350.220416722797130.110208361398565
1000.91079204114380.17841591771240.0892079588562
1010.8785859643827550.2428280712344910.121414035617245
1020.962903027404940.0741939451901190.0370969725950595
1030.9477808192733980.1044383614532030.0522191807266017
1040.921340786489980.1573184270200410.0786592135100203
1050.8960217478539840.2079565042920320.103978252146016
1060.8801580732505470.2396838534989060.119841926749453
1070.8567924159522480.2864151680955040.143207584047752
1080.8846244845316330.2307510309367340.115375515468367
1090.8342188865670980.3315622268658030.165781113432902
1100.8617632945060080.2764734109879840.138236705493992
1110.9212445935219150.1575108129561710.0787554064780854
1120.9686136188465650.06277276230687050.0313863811534352


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level40.0416666666666667NOK
5% type I error level400.416666666666667NOK
10% type I error level640.666666666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/10xbtk1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/10xbtk1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/19swq1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/19swq1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/29swq1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/29swq1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/31jdb1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/31jdb1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/41jdb1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/41jdb1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/51jdb1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/51jdb1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/6csue1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/6csue1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/7nkch1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/7nkch1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/8nkch1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/8nkch1290758457.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/9nkch1290758457.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907584850l1h0ac3hde65jv/9nkch1290758457.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