Home » date » 2010 » Dec » 10 »

Workshop 10 - PE Multiple Regression Model

*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: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/10/t1291985902fqy4xwzkyv2vjn9.htm/, Retrieved Fri, 10 Dec 2010 13:58:22 +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/t1291985902fqy4xwzkyv2vjn9.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 time10 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PE[t] = + 7.09326325421717 + 0.185102752444153Gender[t] -0.543845428355612Browser[t] + 0.0973882515518828CM[t] -0.160262217439695D[t] + 0.679548443610309PC[t] + 0.104347613234137PS[t] -0.0980134280835422O[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
Gender0.1851027524441530.5418570.34160.7332860.366643
Browser-0.5438454283556120.934059-0.58220.5615760.280788
CM0.09738825155188280.057241.70140.091640.04582
D-0.1602622174396950.10618-1.50940.1340250.067013
PC0.6795484436103090.0997896.809800
PS0.1043476132341370.0726181.43690.1535240.076762
O-0.09801342808354220.079632-1.23080.2209650.110482


Multiple Linear Regression - Regression Statistics
Multiple R0.66039852380112
R-squared0.436126210238699
Adjusted R-squared0.400884098378618
F-TEST (value)12.3751440313853
F-TEST (DF numerator)7
F-TEST (DF denominator)112
p-value1.18084431122156e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.73149971992307
Sum Squared Residuals835.642160633256


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11114.7536397297219-3.75363972972194
2713.1971115090806-6.19711150908056
31714.08887322222322.91112677777682
41011.5439430989287-1.54394309892871
51211.44405303909500.555946960905048
6119.956211838152521.04378816184748
71114.3465942056434-3.34659420564335
81210.29776673961901.70223326038095
91311.12503974395161.87496025604844
101414.4908024856061-0.490802485606128
111614.74686889763381.25313110236621
121012.2001104363388-2.20011043633879
131111.9274444427328-0.92744444273285
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.101570478569786
251613.61556926723632.38443073276368
261311.06639020462191.93360979537814
27911.1277052668024-2.12770526680235
281817.83852215591520.161477844084843
291812.16331202315585.83668797684423
301213.5327561542612-1.53275615426121
311713.61410523132233.38589476867772
32911.6566687117664-2.65666871176642
33912.8430741496168-3.84307414961681
341817.20655977064270.793440229357304
351212.5895885485230-0.589588548522952
361813.69812561439484.30187438560518
371413.90501963291460.0949803670853884
381511.93081003613873.06918996386133
391610.69988460071405.30011539928604
401012.7896773295508-2.78967732955083
411111.1600991013401-0.160099101340118
421412.76003376550021.23996623449982
43912.5836510940672-3.58365109406718
441712.03802676621454.96197323378551
4559.28318349199676-4.28318349199676
461212.1354115496325-0.135411549632530
471211.85862726217240.141372737827552
4869.55941116435487-3.55941116435487
492422.75531983735621.24468016264384
501212.2815471440177-0.281547144017666
511212.7775028727646-0.777502872764576
521411.34825832416922.65174167583078
5378.86570660165935-1.86570660165935
541212.9326011533098-0.932601153309824
551411.72240201342302.27759798657697
56812.4869539631865-4.48695396318647
57119.046716190562111.95328380943789
58911.3029081148330-2.30290811483304
591113.6660686504808-2.66606865048084
60108.952062874134371.04793712586563
611113.0579888235097-2.05798882350968
621212.8667898343578-0.866789834357844
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.488591528544162
721112.7317290736477-1.73172907364775
731311.93412128166791.06587871833210
741614.45204036277731.54795963722269
751110.93550957463240.0644904253676085
761617.7130133625102-1.71301336251019
771411.69581602191262.30418397808743
78810.6146650457315-2.61466504573151
7999.80593368432105-0.805933684321053
801511.50200677674813.49799322325195
811113.2978564041544-2.29785640415440
822117.09629001866113.90370998133888
831412.86115831325591.13884168674409
841815.76297025808052.23702974191952
851211.53424880212230.46575119787768
861312.72682939155980.273170608440180
871210.8900194004181.10998059958200
881914.55414750383534.44585249616473
891112.5857238537622-1.58572385376224
901314.9373663248922-1.93736632489220
911514.63795420405710.362045795942921
921211.07392066592540.926079334074593
931615.85980996977400.140190030225967
941818.0522078388685-0.0522078388685007
95814.8962463552164-6.89624635521638
96910.7441215031642-1.74412150316421
971512.79971428014172.20028571985832
98610.6271538363224-4.62715383632243
9989.48365831118564-1.48365831118564
1001010.1186110320092-0.118611032009240
1011112.3117823538364-1.31178235383638
1021412.64377367208021.35622632791979
1031113.4037516262436-2.40375162624359
1041211.89804001705290.101959982947141
1051110.01204633755090.987953662449092
10699.3527768303525-0.352776830352507
1071211.84358944876130.156410551238658
1082014.35033050184725.6496694981528
1091313.5974238022869-0.59742380228687
1101216.453229122563-4.453229122563
111914.5562401844148-5.55624018441481
1122421.63030204068282.36969795931719
1131111.5369383392537-0.536938339253732
1141715.17356760921571.82643239078427
1151112.7716415022599-1.77164150225992
1161114.2331286060079-3.23312860600791
1171612.48560413522013.51439586477994
1181310.94937422108652.05062577891347
1191112.6210258176553-1.62102581765529
1201917.87577685845341.12422314154661


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.871588980672610.256822038654780.12841101932739
120.8655759051213870.2688481897572260.134424094878613
130.7865477850309870.4269044299380250.213452214969013
140.7495334343697280.5009331312605450.250466565630273
150.8095366694849340.3809266610301330.190463330515066
160.815802107628860.368395784742280.18419789237114
170.7638404590728160.4723190818543680.236159540927184
180.7786682295524630.4426635408950730.221331770447537
190.732116739949280.5357665201014410.267883260050721
200.8435741470085320.3128517059829360.156425852991468
210.7985685613906530.4028628772186940.201431438609347
220.7984083306838130.4031833386323740.201591669316187
230.8055250324819440.3889499350361130.194474967518056
240.7549462188297340.4901075623405320.245053781170266
250.719816506937250.5603669861255010.280183493062750
260.6694247696930960.6611504606138080.330575230306904
270.706705928241290.5865881435174190.293294071758710
280.7654435603613990.4691128792772030.234556439638601
290.8363159202921260.3273681594157480.163684079707874
300.8330233203112310.3339533593775380.166976679688769
310.842201894806980.3155962103860400.157798105193020
320.842782373755150.3144352524897010.157217626244851
330.8828270656088520.2343458687822960.117172934391148
340.8505285415858050.2989429168283900.149471458414195
350.8153546382593490.3692907234813030.184645361740651
360.8991525008462680.2016949983074630.100847499153732
370.8696505256515360.2606989486969270.130349474348464
380.8631113911298520.2737772177402960.136888608870148
390.9188240068085990.1623519863828030.0811759931914013
400.9250757510136010.1498484979727980.0749242489863989
410.9029294217169290.1941411565661420.0970705782830712
420.883163859239510.2336722815209810.116836140760491
430.8918238691606960.2163522616786090.108176130839304
440.9410817225807640.1178365548384730.0589182774192365
450.9636130933943870.07277381321122490.0363869066056125
460.9512388625927920.09752227481441570.0487611374072078
470.9357689595781310.1284620808437380.0642310404218689
480.9576592014825460.08468159703490740.0423407985174537
490.9469088994346880.1061822011306240.0530911005653118
500.9298889435195460.1402221129609070.0701110564804536
510.9116579912520580.1766840174958840.0883420087479418
520.9093034686334070.1813930627331860.0906965313665929
530.9001548731944920.1996902536110150.0998451268055077
540.8772615158396690.2454769683206620.122738484160331
550.8695970911599640.2608058176800730.130402908840036
560.9102723457534680.1794553084930650.0897276542465323
570.90024939935620.1995012012876000.0997506006438002
580.8938926392023030.2122147215953950.106107360797697
590.9072113810022120.1855772379955760.0927886189977879
600.8902202728428590.2195594543142820.109779727157141
610.8822973001232180.2354053997535630.117702699876782
620.8603047573915320.2793904852169360.139695242608468
630.8604849752664060.2790300494671890.139515024733594
640.8756342591803420.2487314816393160.124365740819658
650.8778524652984880.2442950694030230.122147534701512
660.8501330739396950.2997338521206100.149866926060305
670.8930299464194430.2139401071611130.106970053580557
680.8753271890731110.2493456218537780.124672810926889
690.850512927376270.2989741452474580.149487072623729
700.8164947216641530.3670105566716940.183505278335847
710.7779161645113180.4441676709773650.222083835488682
720.7485075590306690.5029848819386630.251492440969331
730.7066054984664510.5867890030670980.293394501533549
740.6842127068119020.6315745863761960.315787293188098
750.6379237809026970.7241524381946070.362076219097303
760.6046113544355430.7907772911289140.395388645564457
770.5798286100501490.8403427798997030.420171389949851
780.5546392874276670.8907214251446660.445360712572333
790.500766369538950.99846726092210.49923363046105
800.5194356825341890.9611286349316210.480564317465811
810.512989824534020.974020350931960.48701017546598
820.5819328100887620.8361343798224760.418067189911238
830.5309048607252550.938190278549490.469095139274745
840.4999617992659380.9999235985318760.500038200734062
850.4388660069972010.8777320139944030.561133993002799
860.3772586743905850.754517348781170.622741325609415
870.3239986370347170.6479972740694350.676001362965283
880.451660619544090.903321239088180.54833938045591
890.4474154767748770.8948309535497540.552584523225123
900.4081244425820460.8162488851640930.591875557417954
910.3469387751136030.6938775502272060.653061224886397
920.3155586666657310.6311173333314610.68444133333427
930.2699792477914750.5399584955829490.730020752208525
940.2300403596114390.4600807192228770.769959640388561
950.3914291470147070.7828582940294150.608570852985293
960.3364668994284610.6729337988569210.66353310057154
970.2818151982194700.5636303964389410.71818480178053
980.3761223625091410.7522447250182820.623877637490859
990.3499153055092540.6998306110185090.650084694490746
1000.2812276420931970.5624552841863940.718772357906803
1010.2442505528352290.4885011056704590.75574944716477
1020.1815004054790840.3630008109581680.818499594520916
1030.1638907839106840.3277815678213680.836109216089316
1040.1105084912719640.2210169825439280.889491508728036
1050.07084516136286440.1416903227257290.929154838637136
1060.04145680342689070.08291360685378140.95854319657311
1070.02475605595372480.04951211190744950.975243944046275
1080.06863302724485790.1372660544897160.931366972755142
1090.04170104559026990.08340209118053970.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/t1291985902fqy4xwzkyv2vjn9/10pyro1291985997.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985902fqy4xwzkyv2vjn9/10pyro1291985997.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985902fqy4xwzkyv2vjn9/11xuc1291985997.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985902fqy4xwzkyv2vjn9/11xuc1291985997.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985902fqy4xwzkyv2vjn9/21xuc1291985997.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985902fqy4xwzkyv2vjn9/21xuc1291985997.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985902fqy4xwzkyv2vjn9/64gb01291985997.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291985902fqy4xwzkyv2vjn9/64gb01291985997.ps (open in new window)


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


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


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