Home » date » 2010 » Dec » 10 »

Workshop 10 - Multiple Regression

*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, 10 Dec 2010 13:00:14 +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/10/t1291985909xg2nat7v1b7um13.htm/, Retrieved Fri, 10 Dec 2010 13:58:40 +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/10/t1291985909xg2nat7v1b7um13.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 «
0 1 24 14 11 12 24 26 1 1 25 11 7 8 25 23 1 0 17 6 17 8 30 25 0 1 18 12 10 8 19 23 1 0 16 10 12 7 22 29 1 1 20 10 11 4 25 25 1 1 16 11 11 11 23 21 1 1 18 16 12 7 17 22 1 1 17 11 13 7 21 25 0 1 23 13 14 12 19 24 1 1 30 12 16 10 19 18 1 1 18 12 10 8 16 15 0 1 15 11 11 8 23 22 0 1 12 4 15 4 27 28 1 1 21 9 9 9 22 20 0 1 20 8 17 7 22 24 1 1 27 15 11 9 23 21 0 1 34 16 18 11 21 20 1 1 21 9 14 13 19 21 0 1 31 14 10 8 18 23 0 1 19 11 11 8 20 28 1 1 16 8 15 9 23 24 1 1 20 9 15 6 25 24 0 1 21 9 13 9 19 24 0 1 22 9 16 9 24 23 1 1 17 9 13 6 22 23 0 1 24 10 9 6 25 29 1 1 25 16 18 16 26 24 1 1 26 11 18 5 29 18 1 1 25 8 12 7 32 25 1 1 17 9 17 9 25 21 0 1 32 16 9 6 29 26 0 1 33 11 9 6 28 22 0 0 32 12 18 12 28 22 0 1 25 12 12 7 29 23 0 1 29 14 18 10 26 30 1 1 22 9 14 9 25 23 0 1 18 10 15 8 14 17 1 1 17 9 16 5 25 23 0 1 20 10 10 8 26 23 0 1 15 12 11 8 20 25 1 1 20 14 14 10 18 24 0 1 33 14 9 6 32 24 1 1 23 14 17 7 25 21 0 1 26 16 5 4 23 24 0 1 18 9 12 8 21 24 1 1 20 10 12 8 20 28 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 time14 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
PE[t] = + 7.09326325421717 + 0.185102752444152Geslacht[t] -0.543845428355601Browser[t] + 0.0973882515518827CM[t] -0.160262217439694DA[t] + 0.67954844361031PC[t] + 0.104347613234137PS[t] -0.0980134280835426O[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.093263254217172.6450682.68170.0084330.004216
Geslacht0.1851027524441520.5418570.34160.7332860.366643
Browser-0.5438454283556010.934059-0.58220.5615760.280788
CM0.09738825155188270.057241.70140.091640.04582
DA-0.1602622174396940.10618-1.50940.1340250.067013
PC0.679548443610310.0997896.809800
PS0.1043476132341370.0726181.43690.1535240.076762
O-0.09801342808354260.079632-1.23080.2209650.110482


Multiple Linear Regression - Regression Statistics
Multiple R0.660398523801121
R-squared0.4361262102387
Adjusted R-squared0.400884098378618
F-TEST (value)12.3751440313854
F-TEST (DF numerator)7
F-TEST (DF denominator)112
p-value1.18083320899132e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.73149971992306
Sum Squared Residuals835.642160633255


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11114.7536397297218-3.75363972972184
2713.1971115090806-6.19711150908056
31714.08887322222322.91112677777682
41011.5439430989287-1.54394309892871
51211.44405303909490.555946960905061
6119.956211838152521.04378816184748
71114.3465942056434-3.34659420564336
81210.29776673961901.70223326038095
91311.12503974395161.87496025604844
101414.4908024856061-0.490802485606132
111614.74686889763381.25313110236621
121012.2001104363388-2.20011043633880
131111.9274444427329-0.927444442732853
14159.868231320149125.13176867985088
15913.7886288259109-4.78862882591095
161711.91524943979985.08475056020018
171113.4177192157347-2.41771921573467
181815.00248709554992.99751290445011
191416.0957663325662-2.09576633256623
201012.3851183209897-2.38511832098967
211111.4158740407367-0.415874040736717
221513.17424368649121.82575631350881
231511.57358437089643.42641562910362
241312.89842952143020.101570478569785
251613.61556926723632.38443073276368
261311.06639020462191.93360979537814
27911.1277052668023-2.12770526680235
281817.83852215591520.161477844084839
291812.16331202315585.83668797684422
301213.5327561542612-1.53275615426121
311713.61410523132233.38589476867772
32911.6566687117664-2.65666871176642
33912.8430741496168-3.84307414961681
341817.20655977064270.79344022935731
351212.5895885485230-0.589588548522955
361813.69812561439484.30187438560518
371413.90501963291460.0949803670853874
381511.93081003613873.06918996386132
391610.69988460071405.30011539928604
401012.7896773295508-2.78967732955083
411111.1600991013401-0.16009910134012
421412.76003376550021.23996623449982
43912.5836510940672-3.58365109406719
441712.03802676621454.96197323378551
4559.28318349199677-4.28318349199677
461212.1354115496325-0.135411549632531
471211.85862726217240.141372737827555
4869.55941116435487-3.55941116435487
492422.75531983735621.24468016264383
501212.2815471440177-0.281547144017664
511212.7775028727646-0.777502872764575
521411.34825832416922.65174167583078
5378.86570660165935-1.86570660165935
541212.9326011533098-0.932601153309826
551411.7224020134232.27759798657699
56812.4869539631865-4.48695396318647
57119.046716190562121.95328380943789
58911.3029081148330-2.30290811483304
591113.6660686504808-2.66606865048084
60108.952062874134371.04793712586563
611113.0579888235097-2.05798882350967
621212.8667898343578-0.866789834357842
63911.8363675381018-2.8363675381018
641814.77556574989203.22443425010803
651512.05990045212412.94009954787587
661212.8368860134129-0.836886013412891
67139.390048889370483.60995111062952
681412.91578846125771.08421153874231
691011.4706412349159-1.47064123491589
701312.22819280459910.771807195400866
711313.4885915285442-0.488591528544163
721112.7317290736477-1.73172907364773
731311.93412128166791.06587871833209
741614.45204036277731.54795963722269
751110.93550957463240.0644904253676084
761617.7130133625102-1.71301336251019
771411.69581602191262.30418397808743
78810.6146650457315-2.61466504573150
7999.80593368432105-0.805933684321045
801511.50200677674813.49799322325195
811113.2978564041544-2.29785640415441
822117.09629001866113.90370998133888
831412.86115831325591.13884168674409
841815.76297025808052.23702974191952
851211.53424880212230.465751197877679
861312.72682939155980.273170608440180
871210.8900194004181.10998059958199
881914.55414750383534.44585249616473
891112.5857238537622-1.58572385376224
901314.9373663248922-1.93736632489221
911514.63795420405710.362045795942916
921211.07392066592540.926079334074593
931615.85980996977400.140190030225968
941818.0522078388685-0.0522078388684962
95814.8962463552164-6.89624635521639
96910.7441215031642-1.74412150316422
971512.79971428014172.20028571985832
98610.6271538363224-4.62715383632243
9989.48365831118565-1.48365831118565
1001010.1186110320092-0.118611032009228
1011112.3117823538364-1.31178235383638
1021412.64377367208021.35622632791979
1031113.4037516262436-2.40375162624359
1041211.89804001705290.101959982947141
1051110.01204633755090.987953662449092
10699.3527768303525-0.352776830352503
1071211.84358944876130.156410551238657
1082014.35033050184725.6496694981528
1091313.5974238022869-0.597423802286877
1101216.453229122563-4.453229122563
111914.5562401844148-5.55624018441481
1122421.63030204068282.36969795931718
1131111.5369383392537-0.536938339253733
1141715.17356760921571.82643239078427
1151112.7716415022599-1.77164150225991
1161114.2331286060079-3.23312860600792
1171612.48560413522013.51439586477994
1181310.94937422108652.05062577891347
1191112.6210258176553-1.62102581765530
1201917.87577685845341.12422314154660


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.871588980672610.2568220386547800.128411019327390
120.8655759051213870.2688481897572260.134424094878613
130.7865477850309870.4269044299380260.213452214969013
140.7495334343697270.5009331312605460.250466565630273
150.8095366694849330.3809266610301340.190463330515067
160.815802107628860.368395784742280.18419789237114
170.7638404590728160.4723190818543680.236159540927184
180.7786682295524640.4426635408950730.221331770447537
190.732116739949280.5357665201014410.267883260050721
200.8435741470085320.3128517059829360.156425852991468
210.7985685613906520.4028628772186950.201431438609348
220.7984083306838120.4031833386323750.201591669316188
230.8055250324819440.3889499350361120.194474967518056
240.7549462188297330.4901075623405330.245053781170267
250.719816506937250.56036698612550.28018349306275
260.6694247696930950.6611504606138090.330575230306905
270.706705928241290.5865881435174190.293294071758709
280.7654435603613970.4691128792772050.234556439638602
290.8363159202921260.3273681594157480.163684079707874
300.8330233203112310.3339533593775380.166976679688769
310.842201894806980.3155962103860400.157798105193020
320.842782373755150.3144352524896990.157217626244849
330.8828270656088520.2343458687822960.117172934391148
340.8505285415858040.2989429168283920.149471458414196
350.8153546382593480.3692907234813050.184645361740652
360.8991525008462680.2016949983074630.100847499153732
370.8696505256515370.2606989486969270.130349474348463
380.8631113911298520.2737772177402970.136888608870148
390.91882400680860.1623519863828020.081175993191401
400.92507575101360.1498484979727990.0749242489863995
410.902929421716930.1941411565661410.0970705782830705
420.883163859239510.2336722815209800.116836140760490
430.8918238691606960.2163522616786080.108176130839304
440.9410817225807640.1178365548384730.0589182774192366
450.9636130933943880.07277381321122490.0363869066056125
460.9512388625927920.09752227481441560.0487611374072078
470.9357689595781310.1284620808437380.064231040421869
480.9576592014825460.08468159703490740.0423407985174537
490.9469088994346880.1061822011306240.0530911005653118
500.9298889435195460.1402221129609080.0701110564804538
510.9116579912520590.1766840174958830.0883420087479414
520.9093034686334060.1813930627331880.0906965313665938
530.9001548731944930.1996902536110150.0998451268055074
540.8772615158396690.2454769683206620.122738484160331
550.8695970911599640.2608058176800720.130402908840036
560.9102723457534680.1794553084930640.089727654246532
570.90024939935620.1995012012876000.0997506006438001
580.8938926392023040.2122147215953920.106107360797696
590.9072113810022120.1855772379955750.0927886189977876
600.8902202728428590.2195594543142820.109779727157141
610.8822973001232190.2354053997535630.117702699876781
620.8603047573915330.2793904852169350.139695242608467
630.8604849752664060.2790300494671890.139515024733594
640.8756342591803420.2487314816393160.124365740819658
650.8778524652984880.2442950694030230.122147534701512
660.8501330739396930.2997338521206130.149866926060307
670.8930299464194430.2139401071611140.106970053580557
680.8753271890731120.2493456218537770.124672810926888
690.850512927376270.2989741452474600.149487072623730
700.8164947216641520.3670105566716950.183505278335848
710.7779161645113190.4441676709773630.222083835488682
720.7485075590306680.5029848819386630.251492440969331
730.7066054984664520.5867890030670950.293394501533548
740.6842127068119030.6315745863761930.315787293188097
750.6379237809026950.724152438194610.362076219097305
760.6046113544355440.7907772911289120.395388645564456
770.579828610050150.84034277989970.42017138994985
780.5546392874276660.8907214251446670.445360712572334
790.500766369538950.99846726092210.49923363046105
800.519435682534190.961128634931620.48056431746581
810.5129898245340180.9740203509319640.487010175465982
820.5819328100887610.8361343798224790.418067189911239
830.5309048607252540.938190278549490.469095139274746
840.4999617992659340.9999235985318670.500038200734066
850.4388660069972010.8777320139944010.561133993002799
860.3772586743905840.7545173487811680.622741325609416
870.3239986370347170.6479972740694350.676001362965283
880.4516606195440890.9033212390881770.548339380455911
890.4474154767748770.8948309535497540.552584523225123
900.4081244425820450.816248885164090.591875557417955
910.3469387751136020.6938775502272040.653061224886398
920.3155586666657280.6311173333314570.684441333334272
930.2699792477914750.539958495582950.730020752208525
940.2300403596114380.4600807192228770.769959640388562
950.3914291470147060.7828582940294120.608570852985294
960.3364668994284600.6729337988569210.66353310057154
970.2818151982194690.5636303964389380.718184801780531
980.3761223625091420.7522447250182840.623877637490858
990.3499153055092550.699830611018510.650084694490745
1000.2812276420931960.5624552841863930.718772357906804
1010.244250552835230.488501105670460.75574944716477
1020.1815004054790840.3630008109581670.818499594520916
1030.1638907839106830.3277815678213670.836109216089317
1040.1105084912719640.2210169825439280.889491508728036
1050.07084516136286450.1416903227257290.929154838637135
1060.04145680342689080.08291360685378160.95854319657311
1070.02475605595372470.04951211190744950.975243944046275
1080.06863302724485790.1372660544897160.931366972755142
1090.04170104559026990.08340209118053980.95829895440973


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.0101010101010101OK
10% type I error level60.0606060606060606OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/10z2pz1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/10z2pz1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/1larq1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/1larq1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/2larq1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/2larq1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/3larq1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/3larq1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/4e28t1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/4e28t1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/5e28t1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/5e28t1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/6e28t1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/6e28t1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/7obpv1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/7obpv1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/8obpv1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/8obpv1291985998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/9z2pz1291985998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985909xg2nat7v1b7um13/9z2pz1291985998.ps (open in new window)


 
Parameters (Session):
par1 = 5 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 5 ; par2 = Do not include Seasonal Dummies ; par3 = No 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