Home » date » 2010 » Nov » 27 »

*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: Sat, 27 Nov 2010 14:19:13 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d.htm/, Retrieved Sat, 27 Nov 2010 15:23:24 +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/27/t1290867804oyb0x8ehs2j770d.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 «
1579 0 2146 0 2462 0 3695 0 4831 0 5134 0 6250 0 5760 0 6249 0 2917 0 1741 0 2359 0 1511 1 2059 0 2635 0 2867 0 4403 0 5720 0 4502 0 5749 0 5627 0 2846 0 1762 0 2429 0 1169 0 2154 1 2249 0 2687 0 4359 0 5382 0 4459 0 6398 0 4596 0 3024 0 1887 0 2070 0 1351 0 2218 0 2461 1 3028 0 4784 0 4975 0 4607 0 6249 0 4809 0 3157 0 1910 0 2228 0 1594 0 2467 0 2222 0 3607 1 4685 0 4962 0 5770 0 5480 0 5000 0 3228 0 1993 0 2288 0 1580 0 2111 0 2192 0 3601 0 4665 1 4876 0 5813 0 5589 0 5331 0 3075 0 2002 0 2306 0 1507 0 1992 0 2487 0 3490 0 4647 0 5594 1 5611 0 5788 0 6204 0 3013 0 1931 0 2549 0 1504 0 2090 0 2702 0 2939 0 4500 0 6208 0 6415 1 5657 0 5964 0 3163 0 1997 0 2422 0 1376 0 2202 0 2683 0 3303 0 5202 0 5231 0 4880 0 7998 1 4977 0 3531 0 2025 0 2205 0 1442 0 2238 0 2179 0 3218 0 5139 0 4990 0 4914 0 6084 0 5672 1 3548 0 1793 0 2086 0
 
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
Y[t] = + 2187.30135021097 + 471.720675105485X[t] -862.255625879044M1[t] -157.475302390999M2[t] + 100.405021097046M3[t] + 915.085344585091M4[t] + 2391.46566807314M5[t] + 2975.54599156118M6[t] + 2988.82631504923M7[t] + 3740.30663853727M8[t] + 3106.38696202532M9[t] + 859.23935302391M10[t] -388.480323488046M11[t] + 1.61967651195499t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2187.30135021097138.56633715.785200
X471.720675105485134.8770223.49740.0006880.000344
M1-862.255625879044172.390428-5.00182e-061e-06
M2-157.475302390999172.323461-0.91380.3628770.181439
M3100.405021097046172.2624690.58290.5612250.280613
M4915.085344585091172.2074585.31391e-060
M52391.46566807314172.15843313.891100
M62975.54599156118172.11539917.288100
M72988.82631504923172.07836217.36900
M83740.30663853727172.04732421.7400
M93106.38696202532172.0222918.05800
M10859.23935302391171.4655875.01112e-061e-06
M11-388.480323488046171.456544-2.26580.0254980.012749
t1.619676511954991.0166741.59310.1141120.057056


Multiple Linear Regression - Regression Statistics
Multiple R0.974833105636288
R-squared0.95029958384449
Adjusted R-squared0.944204249787683
F-TEST (value)155.906070936853
F-TEST (DF numerator)13
F-TEST (DF denominator)106
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation383.381748113083
Sum Squared Residuals15580045.8673418


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
115791326.66540084389252.334599156115
221462033.06540084388112.934599156119
324622292.56540084388169.434599156118
436953108.86540084388586.134599156118
548314586.86540084388244.134599156118
651345172.56540084388-38.5654008438817
762505187.465400843881062.53459915612
857605940.56540084388-180.565400843881
962495308.26540084388940.734599156118
1029173062.73746835443-145.737468354431
1117411816.63746835443-75.6374683544286
1223592206.73746835443152.26253164557
1315111817.82219409283-306.822194092826
1420592052.501518987346.49848101265803
1526352312.00151898734322.998481012658
1628673128.30151898734-261.301518987342
1744034606.30151898734-203.301518987342
1857205192.00151898734527.998481012658
1945025206.90151898734-704.901518987342
2057495960.00151898734-211.001518987342
2156275327.70151898734299.298481012658
2228463082.17358649789-236.17358649789
2317621836.07358649789-74.0735864978905
2424292226.17358649789202.82641350211
2511691365.53763713080-196.537637130801
2621542543.65831223629-389.658312236287
2722492331.4376371308-82.4376371308018
2826873147.7376371308-460.737637130801
2943594625.7376371308-266.737637130802
3053825211.4376371308170.562362869198
3144595226.3376371308-767.337637130802
3263985979.4376371308418.562362869198
3345965347.1376371308-751.137637130802
3430243101.60970464135-77.60970464135
3518871855.5097046413531.4902953586496
3620702245.60970464135-175.609704641351
3713511384.97375527426-33.9737552742612
3822182091.37375527426126.626244725738
3924612822.59443037975-361.594430379747
4030283167.17375527426-139.173755274262
4147844645.17375527426138.826244725738
4249755230.87375527426-255.873755274262
4346075245.77375527426-638.773755274262
4462495998.87375527426250.126244725738
4548095366.57375527426-557.573755274262
4631573121.0458227848135.9541772151900
4719101874.9458227848135.0541772151897
4822282265.04582278481-37.0458227848103
4915941404.40987341772189.590126582279
5024672110.80987341772356.190126582279
5122222370.30987341772-148.309873417722
5236073658.33054852321-51.3305485232071
5346854664.6098734177220.3901265822786
5449625250.30987341772-288.309873417722
5557705265.20987341772504.790126582279
5654806018.30987341772-538.309873417722
5750005386.00987341772-386.009873417722
5832283140.4819409282787.51805907173
5919931894.3819409282798.6180590717298
6022882284.481940928273.51805907172975
6115801423.84599156118156.154008438819
6221112130.24599156118-19.2459915611815
6321922389.74599156118-197.745991561182
6436013206.04599156118394.954008438818
6546655155.76666666667-490.766666666667
6648765269.74599156118-393.745991561182
6758135284.64599156118528.354008438819
6855896037.74599156118-448.745991561182
6953315405.44599156118-74.4459915611815
7030753159.91805907173-84.9180590717297
7120021913.8180590717388.1819409282699
7223062303.918059071732.0819409282701
7315071443.2821097046463.7178902953591
7419922149.68210970464-157.682109704641
7524872409.1821097046477.8178902953588
7634903225.48210970464264.517890295359
7746474703.48210970464-56.4821097046412
7855945760.90278481013-166.902784810127
7956115304.08210970464306.917890295359
8057886057.18210970464-269.182109704641
8162045424.88210970464779.117890295359
8230133179.35417721519-166.354177215190
8319311933.25417721519-2.25417721519004
8425492323.35417721519225.645822784810
8515041462.718227848141.2817721518992
8620902169.1182278481-79.1182278481013
8727022428.6182278481273.381772151899
8829393244.9182278481-305.918227848101
8945004722.9182278481-222.918227848101
9062085308.6182278481899.3817721519
9164155795.23890295359619.761097046414
9256576076.6182278481-419.618227848101
9359645444.3182278481519.681772151899
9431633198.79029535865-35.7902953586497
9519971952.6902953586544.30970464135
9624222342.7902953586579.2097046413504
9713761482.15434599156-106.154345991561
9822022188.5543459915613.4456540084387
9926832448.05434599156234.945654008439
10033033264.3543459915638.6456540084388
10152024742.35434599156459.645654008439
10252315328.05434599156-97.0543459915613
10348805342.95434599156-462.954345991562
10479986567.775021097051430.22497890295
10549775463.75434599156-486.754345991561
10635313218.22641350211312.77358649789
10720251972.1264135021152.8735864978902
10822052362.22641350211-157.22641350211
10914421501.59046413502-59.5904641350206
11022382207.9904641350230.0095358649788
11121792467.49046413502-288.490464135021
11232183283.79046413502-65.790464135021
11351394761.79046413502377.209535864979
11449905347.49046413502-357.490464135021
11549145362.39046413502-448.390464135022
11660846115.49046413502-31.4904641350208
11756725954.9111392405-282.911139240506
11835483237.66253164557310.337468354430
11917931991.56253164557-198.562531645570
12020862381.66253164557-295.66253164557


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.4430245764324980.8860491528649960.556975423567502
180.6489998512265220.7020002975469550.351000148773478
190.9700142063000810.05997158739983780.0299857936999189
200.952585168824440.094829662351120.04741483117556
210.9331170107598670.1337659784802670.0668829892401333
220.9025211285199880.1949577429600240.097478871480012
230.868598004496970.2628039910060590.131401995503029
240.8372525123349330.3254949753301350.162747487665067
250.7778062704714620.4443874590570760.222193729528538
260.7299191596999010.5401616806001970.270080840300099
270.6555705961458940.6888588077082130.344429403854107
280.6031227417486470.7937545165027060.396877258251353
290.5293024227972480.9413951544055030.470697577202752
300.489620762763460.979241525526920.51037923723654
310.5556420562980790.8887158874038410.444357943701921
320.7529633662247550.494073267550490.247036633775245
330.8810162460374580.2379675079250840.118983753962542
340.8725818825527990.2548362348944020.127418117447201
350.8587880999007330.2824238001985350.141211900099267
360.8173269146749310.3653461706501380.182673085325069
370.7937867109697230.4124265780605530.206213289030277
380.7830900019314050.433819996137190.216909998068595
390.7584545338252660.4830909323494690.241545466174734
400.715390974252750.56921805149450.28460902574725
410.71055485642480.5788902871504010.289445143575201
420.6619423614876710.6761152770246580.338057638512329
430.6756363560725740.6487272878548530.324363643927427
440.683540299775410.6329194004491790.316459700224589
450.6944498105335770.6111003789328470.305550189466423
460.6775314251977890.6449371496044210.322468574802211
470.6401266222282590.7197467555434830.359873377771741
480.5851094656626820.8297810686746370.414890534337318
490.5684747966339890.8630504067320230.431525203366011
500.584271825639810.8314563487203790.415728174360190
510.5277215485271810.9445569029456380.472278451472819
520.5439740272749590.9120519454500820.456025972725041
530.4938233207303660.9876466414607310.506176679269634
540.448124780276210.896249560552420.55187521972379
550.5657744688782520.8684510622434950.434225531121748
560.5817727728422670.8364544543154660.418227227157733
570.5598882385800530.8802235228398930.440111761419947
580.5208872369859970.9582255260280050.479112763014002
590.4735649372488440.9471298744976880.526435062751156
600.4166516828482090.8333033656964180.583348317151791
610.3741026207256680.7482052414513350.625897379274332
620.3193448996119050.638689799223810.680655100388095
630.280055202571290.560110405142580.71994479742871
640.2870116665466470.5740233330932940.712988333453353
650.3749945898097490.7499891796194970.625005410190251
660.3608570443230790.7217140886461580.639142955676921
670.4375488336631880.8750976673263760.562451166336812
680.4536674478530340.9073348957060680.546332552146966
690.4046509484561990.8093018969123980.595349051543801
700.3653599431441780.7307198862883570.634640056855822
710.3143176307122320.6286352614244640.685682369287768
720.2643446579714220.5286893159428450.735655342028578
730.2179283225306930.4358566450613860.782071677469307
740.1853378962318350.3706757924636690.814662103768165
750.1512382200343190.3024764400686380.84876177996568
760.1294742177436230.2589484354872470.870525782256377
770.1124701904173670.2249403808347330.887529809582633
780.2116069162967050.4232138325934110.788393083703295
790.2087915277660890.4175830555321780.791208472233911
800.2152459983626810.4304919967253620.784754001637319
810.4226029508327480.8452059016654970.577397049167252
820.4368592999231770.8737185998463550.563140700076823
830.3811552978828310.7623105957656610.61884470211717
840.3263957370310030.6527914740620060.673604262968997
850.2667710323587450.533542064717490.733228967641255
860.2272814411721240.4545628823442490.772718558827876
870.1853598570642690.3707197141285370.814640142935732
880.1869523023055340.3739046046110680.813047697694466
890.3016789367138960.6033578734277910.698321063286104
900.5336511544555840.9326976910888310.466348845544416
910.5140028406549450.971994318690110.485997159345055
920.8174062956034070.3651874087931860.182593704396593
930.9847695243866750.03046095122665000.0152304756133250
940.996625380918560.006749238162881660.00337461908144083
950.994292185505150.01141562898969990.00570781449484997
960.9876673530636010.02466529387279710.0123326469363985
970.9827501452243220.03449970955135660.0172498547756783
980.9752652003149840.04946959937003290.0247347996850164
990.9661597724439980.06768045511200450.0338402275560022
1000.9354732441450920.1290535117098160.064526755854908
1010.8922768822292580.2154462355414840.107723117770742
1020.7950499414595920.4099001170808170.204950058540408
1030.7386031237067940.5227937525864110.261396876293206


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.0114942528735632NOK
5% type I error level60.0689655172413793NOK
10% type I error level90.103448275862069NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/10xmxt1290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/10xmxt1290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/19lii1290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/19lii1290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/29lii1290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/29lii1290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/39lii1290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/39lii1290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/4jvz31290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/4jvz31290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/5jvz31290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/5jvz31290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/6c4y51290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/6c4y51290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/7c4y51290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/7c4y51290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/85dfq1290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/85dfq1290867543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/95dfq1290867543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290867804oyb0x8ehs2j770d/95dfq1290867543.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