Home » date » 2010 » Dec » 20 »

Multiple regression 1

*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: Mon, 20 Dec 2010 19:46:10 +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/20/t1292874259dgdvd210n2rz1mk.htm/, Retrieved Mon, 20 Dec 2010 20:44:19 +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/20/t1292874259dgdvd210n2rz1mk.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 «
27951 29781 32914 33488 35652 36488 35387 35676 34844 32447 31068 29010 29812 30951 32974 32936 34012 32946 31948 30599 27691 25073 23406 22248 22896 25317 26558 26471 27543 26198 24725 25005 23462 20780 19815 19761 21454 23899 24939 23580 24562 24696 23785 23812 21917 19713 19282 18788 21453 24482 27474 27264 27349 30632 29429 30084 26290 24379 23335 21346 21106 24514 28353 30805 31348 34556 33855 34787 32529 29998 29257 28155 30466 35704 39327 39351 42234 43630 43722 43121 37985 37135 34646 33026 35087 38846 42013 43908 42868 44423 44167 43636 44382 42142 43452 36912 42413 45344 44873 47510 49554 47369 45998 48140 48441 44928 40454 38661 37246 36843 36424 37594 38144 38737 34560 36080 33508 35462 33374 32110 35533 35532 37903 36763 40399 44164 44496 43110 43880 43930 44327
 
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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Vacatures[t] = + 19092.2638297872 + 2256.62092198582M1[t] + 4466.72037395229M2[t] + 6380.72891682785M3[t] + 6783.73745970342M4[t] + 7921.0187298517M5[t] + 8710.93636363636M6[t] + 7506.21763378466M7[t] + 7551.0443584784M8[t] + 5677.78017408124M9[t] + 3820.7887169568M10[t] + 2452.06998710509M11[t] + 134.991457124436t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)19092.26382978722053.4910339.297500
M12256.620921985822555.0168990.88320.3789180.189459
M24466.720373952292554.6935221.74840.0829890.041495
M36380.728916827852554.4419792.49790.0138710.006935
M46783.737459703422554.262292.65580.0090040.004502
M57921.01872985172554.154473.10120.0024110.001206
M68710.936363636362554.1185293.41050.0008880.000444
M77506.217633784662554.154472.93880.0039640.001982
M87551.04435847842554.262292.95630.0037620.001881
M95677.780174081242554.4419792.22270.0281410.01407
M103820.78871695682554.6935221.49560.1374290.068714
M112452.069987105092555.0168990.95970.3391650.169582
t134.99145712443613.5497489.962700


Multiple Linear Regression - Regression Statistics
Multiple R0.716794881754803
R-squared0.513794902509882
Adjusted R-squared0.464350316324447
F-TEST (value)10.3913277903259
F-TEST (DF numerator)12
F-TEST (DF denominator)118
p-value9.84767822842514e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5845.58181029365
Sum Squared Residuals4032157550.69865


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12795121483.87620889756467.12379110252
22978123828.96711798845952.03288201161
33291425877.96711798847036.0328820116
43348826415.96711798847072.0328820116
53565227688.23984526117963.76015473888
63648828613.14893617027874.8510638298
73538727543.42166344297843.57833655706
83567627723.23984526117952.76015473888
93484425984.96711798848859.0328820116
103244724262.96711798848184.0328820116
113106823029.23984526118038.76015473888
122901020712.16131528058297.83868471954
132981223103.77369439076708.22630560929
143095125448.86460348165502.13539651837
153297427497.86460348165476.13539651837
163293628035.86460348164900.13539651838
173401229308.13733075444703.86266924565
183294630233.04642166342712.95357833656
193194829163.31914893622784.68085106383
203059929343.13733075441255.86266924565
212769127604.864603481686.1353965183763
222507325882.8646034816-809.864603481627
232340624649.1373307544-1243.13733075435
242224822332.0588007737-84.0588007736974
252289624723.6711798839-1827.67117988395
262531727068.7620889749-1751.76208897486
272655829117.7620889749-2559.76208897486
282647129655.7620889749-3184.76208897485
292754330928.0348162476-3385.03481624758
302619831852.9439071567-5654.94390715667
312472530783.2166344294-6058.2166344294
322500530963.0348162476-5958.03481624758
332346229224.7620889749-5762.76208897486
342078027502.7620889749-6722.76208897486
351981526269.0348162476-6454.03481624758
361976123951.9562862669-4190.95628626692
372145426343.5686653772-4889.56866537718
382389928688.6595744681-4789.65957446808
392493930737.6595744681-5798.65957446809
402358031275.6595744681-7695.65957446809
412456232547.9323017408-7985.93230174082
422469633472.8413926499-8776.8413926499
432378532403.1141199226-8618.11411992263
442381232582.9323017408-8770.93230174082
452191730844.6595744681-8927.65957446809
461971329122.6595744681-9409.65957446809
471928227888.9323017408-8606.93230174082
481878825571.8537717602-6783.85377176015
492145327963.4661508704-6510.46615087041
502448230308.5570599613-5826.55705996132
512747432357.5570599613-4883.55705996131
522726432895.5570599613-5631.55705996131
532734934167.8297872340-6818.82978723404
543063235092.7388781431-4460.73887814313
552942934023.0116054159-4594.01160541586
563008434202.8297872340-4118.82978723404
572629032464.5570599613-6174.55705996131
582437930742.5570599613-6363.55705996131
592333529508.8297872340-6173.82978723404
602134627191.7512572534-5845.75125725339
612110629583.3636363636-8477.36363636364
622451431928.4545454545-7414.45454545455
632835333977.4545454545-5624.45454545455
643080534515.4545454545-3710.45454545454
653134835787.7272727273-4439.72727272727
663455636712.6363636364-2156.63636363636
673385535642.9090909091-1787.90909090909
683478735822.7272727273-1035.72727272727
693252934084.4545454545-1555.45454545454
702999832362.4545454545-2364.45454545455
712925731128.7272727273-1871.72727272727
722815528811.6487427466-656.648742746616
733046631203.2611218569-737.261121856867
743570433548.35203094782155.64796905222
753932735597.35203094783729.64796905222
763935136135.35203094783215.64796905223
774223437407.62475822054826.3752417795
784363038332.53384912965297.4661508704
794372237262.80657640236459.19342359768
804312137442.62475822055678.3752417795
813798535704.35203094782280.64796905223
823713533982.35203094783152.64796905222
833464632748.62475822051897.37524177950
843302630431.54622823982594.45377176016
853508732823.15860735012263.84139264990
863884635168.2495164413677.75048355899
874201337217.2495164414795.75048355899
884390837755.2495164416152.75048355899
894286839027.52224371373840.47775628627
904442339952.43133462284470.56866537717
914416738882.70406189565284.29593810445
924363639062.52224371374573.47775628626
934438237324.2495164417057.750483559
944214235602.2495164416539.750483559
954345234368.52224371379083.47775628627
963691232051.44371373314860.55628626693
974241334443.05609284337969.94390715667
984534436788.14700193428555.85299806576
994487338837.14700193426035.85299806576
1004751039375.14700193428134.85299806577
1014955440647.41972920708906.58027079304
1024736941572.32882011615796.67117988395
1034599840502.60154738885495.39845261122
1044814040682.4197292077457.58027079304
1054844138944.14700193429496.85299806576
1064492837222.14700193427705.85299806576
1074045435988.4197292074465.58027079304
1083866133671.34119922634989.65880077369
1093724636062.95357833661183.04642166344
1103684338408.0444874275-1565.04448742746
1113642440457.0444874275-4033.04448742746
1123759440995.0444874275-3401.04448742746
1133814442267.3172147002-4123.31721470019
1143873743192.2263056093-4455.22630560928
1153456042122.499032882-7562.49903288201
1163608042302.3172147002-6222.31721470019
1173350840564.0444874275-7056.04448742747
1183546238842.0444874275-3380.04448742746
1193337437608.3172147002-4234.31721470019
1203211035291.2386847195-3181.23868471954
1213553337682.8510638298-2149.85106382979
1223553240027.9419729207-4495.94197292069
1233790342076.9419729207-4173.94197292069
1243676342614.9419729207-5851.94197292069
1254039943887.2147001934-3488.21470019342
1264416444812.1237911025-648.123791102516
1274449643742.3965183752753.603481624758
1284311043922.2147001934-812.214700193427
1294388042183.94197292071696.05802707930
1304393040461.94197292073468.05802707930
1314432739228.21470019345098.78529980657


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.004695315252513810.009390630505027610.995304684747486
170.002803259498913540.005606518997827090.997196740501086
180.004425102151527670.008850204303055340.995574897848472
190.00293842977451970.00587685954903940.99706157022548
200.003555270743160220.007110541486320450.99644472925684
210.007455394734969150.01491078946993830.99254460526503
220.009342118232419270.01868423646483850.99065788176758
230.009779270814961150.01955854162992230.990220729185039
240.007151943973523820.01430388794704760.992848056026476
250.003483266273364750.00696653254672950.996516733726635
260.001588324073568700.003176648147137410.998411675926431
270.0007423097657456960.001484619531491390.999257690234254
280.0003448167842549090.0006896335685098170.999655183215745
290.0001679164130594830.0003358328261189670.99983208358694
300.0001035941386220390.0002071882772440780.999896405861378
316.69557557392975e-050.0001339115114785950.99993304424426
323.23421093144455e-056.4684218628891e-050.999967657890686
331.40805592008771e-052.81611184017542e-050.9999859194408
346.16445084039198e-061.23289016807840e-050.99999383554916
352.40847501663378e-064.81695003326756e-060.999997591524983
369.17030948123391e-071.83406189624678e-060.999999082969052
377.76748682885126e-071.55349736577025e-060.999999223251317
387.37546973762453e-071.47509394752491e-060.999999262453026
393.84767832148699e-077.69535664297397e-070.999999615232168
401.49890267202104e-072.99780534404208e-070.999999850109733
415.69099199198927e-081.13819839839785e-070.99999994309008
422.36774710957820e-084.73549421915639e-080.999999976322529
431.01060159686704e-082.02120319373408e-080.999999989893984
444.62217639580785e-099.2443527916157e-090.999999995377824
452.10113403164324e-094.20226806328648e-090.999999997898866
461.12157557881826e-092.24315115763651e-090.999999998878424
477.422095125092e-101.4844190250184e-090.99999999925779
485.21957580190219e-101.04391516038044e-090.999999999478042
491.83818552444286e-093.67637104888572e-090.999999998161815
508.50716871561104e-091.70143374312221e-080.999999991492831
514.73569876256364e-089.47139752512727e-080.999999952643012
521.56694745934738e-073.13389491869475e-070.999999843305254
532.23862112344181e-074.47724224688362e-070.999999776137888
541.50585961547965e-063.01171923095929e-060.999998494140385
555.4507034690268e-061.09014069380536e-050.99999454929653
561.91872657578320e-053.83745315156639e-050.999980812734242
573.09771607813495e-056.1954321562699e-050.999969022839219
585.96530114247195e-050.0001193060228494390.999940346988575
590.0001084457438051570.0002168914876103130.999891554256195
600.0001367149250199970.0002734298500399940.99986328507498
610.0002039945829579870.0004079891659159740.999796005417042
620.0003334558994992510.0006669117989985030.9996665441005
630.0005761970033648510.001152394006729700.999423802996635
640.001465070776359910.002930141552719810.99853492922364
650.003227139168200440.006454278336400890.9967728608318
660.009118742489623020.01823748497924600.990881257510377
670.02132698358766540.04265396717533090.978673016412335
680.04530903690464110.09061807380928220.954690963095359
690.08733985873028910.1746797174605780.91266014126971
700.1698976910848430.3397953821696870.830102308915157
710.2909581028499600.5819162056999210.70904189715004
720.3787866622826970.7575733245653950.621213337717303
730.4906501427081890.9813002854163770.509349857291811
740.5920593864099390.8158812271801220.407940613590061
750.6716651772259440.6566696455481130.328334822774056
760.7299700042478630.5400599915042750.270029995752137
770.7868031127080750.426393774583850.213196887291925
780.8278051218081760.3443897563836490.172194878191824
790.8618179165016310.2763641669967370.138182083498369
800.8779484198976020.2441031602047970.122051580102398
810.8966391354312960.2067217291374080.103360864568704
820.9201377694025610.1597244611948780.079862230597439
830.9467007618304040.1065984763391930.0532992381695965
840.9496161812807320.1007676374385370.0503838187192684
850.9550857101280380.08982857974392450.0449142898719622
860.9517720178932770.09645596421344650.0482279821067232
870.9433620851824010.1132758296351970.0566379148175987
880.9360164599019160.1279670801961680.0639835400980839
890.9271038548090470.1457922903819060.0728961451909529
900.9154837365315090.1690325269369820.0845162634684912
910.8992554682387880.2014890635224240.100744531761212
920.8827817418422660.2344365163154680.117218258157734
930.8701084890338670.2597830219322660.129891510966133
940.8635489138699660.2729021722600690.136451086130034
950.8517510903445240.2964978193109520.148248909655476
960.820257741643530.359484516712940.17974225835647
970.7937108754633870.4125782490732250.206289124536612
980.788131398027250.4237372039454990.211868601972749
990.759732685618370.4805346287632590.240267314381630
1000.775853103774930.448293792450140.22414689622507
1010.8062626756423260.3874746487153490.193737324357674
1020.77681489643330.44637020713340.2231851035667
1030.7570927766120140.4858144467759710.242907223387986
1040.7953442237523470.4093115524953070.204655776247653
1050.896678407280650.20664318543870.10332159271935
1060.9289295282493220.1421409435013560.071070471750678
1070.9319495065736890.1361009868526220.068050493426311
1080.9703080565234850.05938388695303080.0296919434765154
1090.9722134987172030.05557300256559340.0277865012827967
1100.9780705121100990.0438589757798030.0219294878899015
1110.9728415857745070.05431682845098690.0271584142254934
1120.9913733114198470.0172533771603060.008626688580153
1130.997193130152310.005613739695379230.00280686984768962
1140.9976064917354480.004787016529103670.00239350826455184
1150.987542722765390.02491455446921910.0124572772346095


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level480.48NOK
5% type I error level570.57NOK
10% type I error level630.63NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/10owiv1292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/10owiv1292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/1hd3j1292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/1hd3j1292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/2hd3j1292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/2hd3j1292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/3s4241292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/3s4241292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/4s4241292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/4s4241292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/5s4241292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/5s4241292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/62ek71292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/62ek71292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/72ek71292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/72ek71292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/8dnja1292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/8dnja1292874360.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/9dnja1292874360.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292874259dgdvd210n2rz1mk/9dnja1292874360.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