Home » date » 2010 » Nov » 20 »

*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, 20 Nov 2010 13:21:24 +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/20/t1290259192e0z586baco3v4et.htm/, Retrieved Sat, 20 Nov 2010 14:19:54 +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/20/t1290259192e0z586baco3v4et.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 «
38 23 10 11 35 37 12 36 15 10 11 35 37 12 23 25 10 11 35 37 12 30 18 10 11 35 37 12 26 21 10 11 35 37 12 26 19 10 11 35 37 12 30 15 13 12 38 34 12 27 22 10 11 35 37 12 34 19 10 11 35 37 14 28 20 13 9 34 32 12 36 26 10 11 35 37 12 42 26 10 11 35 37 12 31 21 10 11 35 37 14 26 19 10 11 35 37 12 16 19 13 12 38 34 12 23 19 10 11 35 37 14 45 28 10 11 35 37 12 30 27 10 11 35 37 15 45 18 10 11 35 37 12 30 19 10 11 35 37 15 24 24 10 11 35 37 12 29 21 13 12 38 34 12 30 22 13 9 34 32 12 31 25 10 11 35 37 14 34 15 10 11 35 37 14 41 34 10 11 35 37 12 37 23 10 11 35 37 12 33 19 10 11 35 37 12 48 15 10 11 35 37 14 44 15 10 11 35 37 15 29 17 10 11 35 37 14 44 30 13 9 34 32 12 43 28 10 11 35 37 14 31 23 10 11 35 37 14 28 23 10 11 35 37 12 26 21 10 11 35 37 14 30 18 10 11 35 37 12 27 19 15 11 33 36 12 34 24 10 11 35 37 12 47 15 10 11 35 37 12 37 24 13 16 34 36 12 27 20 10 11 35 37 12 30 20 10 11 35 37 12 36 44 10 11 35 37 14 39 20 10 11 35 37 12 32 20 10 11 35 37 12 25 20 10 11 35 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
CM+D[t] = + 44.9403520933643 + 0.355766125652141`PE+PC`[t] -0.231653308417249happiness[t] + 0.263610054527117depression[t] -0.466508840964572connected[t] -0.147481738970619separated[t] + 0.0813939733229003populariteit[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)44.940352093364350.0872010.89720.3714010.185701
`PE+PC`0.3557661256521410.111663.18620.0018410.000921
happiness-0.2316533084172491.290405-0.17950.8578350.428917
depression0.2636100545271170.5873240.44880.6543690.327184
connected-0.4665088409645720.666857-0.69960.4855650.242783
separated-0.1474817389706191.023207-0.14410.8856360.442818
populariteit0.08139397332290030.5900470.13790.8905170.445259


Multiple Linear Regression - Regression Statistics
Multiple R0.293830789401748
R-squared0.0863365328004547
Adjusted R-squared0.0402694672273682
F-TEST (value)1.87414873785438
F-TEST (DF numerator)6
F-TEST (DF denominator)119
p-value0.0907825194364746
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.9205070293393
Sum Squared Residuals5699.31668763302


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
13832.89824440319125.10175559680876
23630.05211539797415.94788460202587
32333.6097766544955-10.6097766544955
43031.1194137749306-1.11941377493055
52632.186712151887-6.18671215188697
62631.4751799005827-5.47517990058269
73028.66368422126761.33631577873236
82732.5424782775391-5.54247827753911
93431.63796784722852.36203215277151
102831.8126835277465-3.81268352774652
113633.96554278014772.03445721985232
124233.96554278014778.03445721985232
133132.3495000985328-1.34950009853277
142631.4751799005827-5.47517990058269
151630.0867487238762-14.0867487238762
162331.6379678472285-8.6379678472285
174534.67707503145210.322924968548
183034.5654908257685-4.56549082576852
194531.119413774930513.8805862250695
203031.7193618205514-1.71936182055139
212433.2540105288434-9.2540105288434
222930.7982809751805-1.79828097518049
233032.5242157790508-2.5242157790508
243133.7725646011413-2.77256460114134
253430.21490334461993.78509665538007
264136.81167178536484.18832821463519
273732.89824440319134.10175559680874
283331.47517990058271.52482009941731
294830.214903344619917.7850966553801
304430.296297317942813.7037026820572
312930.9264355959242-1.92643559592421
324435.37034478426798.62965521573207
334334.83986297809788.16013702190224
343133.0610323498371-2.06103234983706
352832.8982444031913-4.89824440319126
362632.3495000985328-6.34950009853277
373031.1194137749305-1.11941377493055
382731.3974127793962-4.39741277939621
393433.25401052884340.745989471156603
404730.052115397974116.9478846020259
413734.49109145616242.50890854383757
422731.8309460262348-4.83094602623483
433031.8309460262348-1.83094602623483
443640.532120988532-4.53212098853202
453931.83094602623487.16905397376517
463231.83094602623480.169053973765168
472531.8309460262348-6.83094602623483
481928.6290508953656-9.62905089536556
492932.186712151887-3.18671215188697
502632.1684496533987-6.16844965339866
513130.08674872387620.913251276123796
523132.186712151887-1.18671215188697
533131.0078295692471-0.00782956924710881
543931.47517990058277.5248200994173
552832.186712151887-4.18671215188697
562230.4078815236263-8.40788152362627
573131.4751799005827-0.475179900582691
583631.63796784722854.36203215277151
592830.4078815236263-2.40788152362627
603933.25401052884345.7459894711566
613532.1867121518872.81328784811303
623331.83094602623481.16905397376517
632731.4751799005827-4.47517990058269
643332.89824440319130.101755596808744
653131.1194137749305-0.119413774930549
663931.63796784722857.36203215277151
673733.06103234983713.93896765016294
682431.7193618205514-7.71936182055139
692832.5771116034412-4.57711160344119
703727.95215196996349.04784803003665
713233.0610323498371-1.06103234983706
723129.01945034691981.98054965308022
732929.3752164725719-0.37521647257192
744035.38860728275624.61139271724376
754032.70526622418497.29473377581509
761529.696349272322-14.696349272322
772729.6780867738337-2.67808677383367
783232.1684496533987-0.168449653398659
792832.186712151887-4.18671215188697
804136.61869360635854.38130639364153
814732.898244403191314.1017555968087
824235.38860728275626.61139271724376
833233.3651738076091-1.36517380760909
843333.8539585744642-0.85395857446424
852935.0328411571041-6.0328411571041
863732.34950009853284.65049990146723
873930.6520634435958.34793655640503
882930.7636476492784-1.76364764927841
893332.89824440319130.101755596808744
903131.1011512764422-0.101151276442236
912131.7193618205514-10.7193618205514
923634.83986297809781.16013702190224
933235.1956291037499-3.1956291037499
941531.4751799005827-16.4751799005827
952533.5915141560072-8.59151415600723
962830.0521153979741-2.05211539797413
973933.25401052884345.7459894711566
983128.96655452252942.03344547747061
994028.629050895365611.3709491046344
1002531.4751799005827-6.4751799005827
1013633.77256460114132.22743539885866
1022329.1476049676635-6.1476049676635
1033930.05211539797418.94788460202588
1043133.7725646011413-2.77256460114134
1052329.696349272322-6.69634927232199
1063131.6379678472285-0.637967847228491
1072832.8799819047029-4.87998190470294
1084731.456917402094415.5430825979056
1092532.0751279462035-7.07512794620353
1102630.389619025138-4.38961902513795
1112432.4170369123601-8.41703691236012
1123032.7866601975078-2.78666019750782
1132533.423793079206-8.423793079206
1144431.839766616686812.1602333833132
1153840.6135149618549-2.61351496185492
1163628.98481702101777.0151829789823
1173433.28864385474550.711356145254524
1184532.000728576597412.9992714234026
1192931.2822017215763-2.28220172157635
1202532.186712151887-7.18671215188697
1213033.2540105288434-3.2540105288434
1222732.1565219195264-5.15652191952643
1234433.416798475489210.5832015245108
1243136.4559056597127-5.45590565971267
1253533.60977665449551.39022334550446
1264737.16743791101699.83256208898305


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.6308657495517370.7382685008965260.369134250448263
110.6490103790980780.7019792418038430.350989620901922
120.7503222332523250.499355533495350.249677766747675
130.6530130554259380.6939738891481240.346986944574062
140.5817520197585910.8364959604828180.418247980241409
150.703769179994550.5924616400108990.29623082000545
160.7095464510056590.5809070979886820.290453548994341
170.7838431726686880.4323136546626240.216156827331312
180.7210713458353280.5578573083293440.278928654164672
190.8642948000052450.271410399989510.135705199994755
200.81849805555640.36300388888720.1815019444436
210.8467944516394750.3064110967210510.153205548360525
220.8117304842029150.376539031594170.188269515797085
230.7585339540761680.4829320918476650.241466045923832
240.6985400502095920.6029198995808170.301459949790409
250.6594862995631340.6810274008737320.340513700436866
260.6239804974080820.7520390051838350.376019502591918
270.573496954560310.8530060908793810.42650304543969
280.5053867326362660.9892265347274680.494613267363734
290.8032706149676560.3934587700646890.196729385032344
300.8711643575719340.2576712848561310.128835642428066
310.8458393921320.3083212157359990.154160607867999
320.8824521935983220.2350956128033550.117547806401678
330.8853833053387140.2292333893225720.114616694661286
340.8594507313439070.2810985373121850.140549268656093
350.8418379969339990.3163240061320020.158162003066001
360.8408928898105580.3182142203788840.159107110189442
370.803675661779420.392648676441160.19632433822058
380.7773284795885770.4453430408228460.222671520411423
390.7312295644664560.5375408710670880.268770435533544
400.8835364393787660.2329271212424680.116463560621234
410.8528327055879270.2943345888241460.147167294412073
420.8395233697996560.3209532604006870.160476630200344
430.8070803199295750.3858393601408490.192919680070425
440.775302335430190.4493953291396190.22469766456981
450.7704212293650450.4591575412699090.229578770634955
460.7266506608366090.5466986783267820.273349339163391
470.7306270745037130.5387458509925740.269372925496287
480.7855897698371110.4288204603257780.214410230162889
490.7522916802140570.4954166395718860.247708319785943
500.7440082191497930.5119835617004150.255991780850207
510.7124941315478760.5750117369042470.287505868452124
520.6655700718716980.6688598562566050.334429928128302
530.6167534609787620.7664930780424770.383246539021238
540.6217440070325230.7565119859349540.378255992967477
550.588365293372140.8232694132557210.411634706627861
560.6133168982914630.7733662034170740.386683101708537
570.5609148056239740.8781703887520520.439085194376026
580.5262347619114790.9475304761770430.473765238088521
590.4792017331927560.9584034663855120.520798266807244
600.4620632044363750.924126408872750.537936795563625
610.4174592800973730.8349185601947470.582540719902627
620.3671868944868980.7343737889737960.632813105513102
630.3374776365030590.6749552730061170.662522363496941
640.289814591804580.579629183609160.71018540819542
650.2455795402715850.4911590805431690.754420459728415
660.2477961023594730.4955922047189450.752203897640527
670.2193473876329470.4386947752658950.780652612367053
680.2316030419275020.4632060838550050.768396958072498
690.2188045085616550.437609017123310.781195491438345
700.2430492645483270.4860985290966550.756950735451673
710.2037500445559630.4075000891119250.796249955444037
720.1704817504670420.3409635009340840.829518249532958
730.1428623811210440.2857247622420890.857137618878956
740.1269485696369840.2538971392739670.873051430363016
750.1297640436730370.2595280873460740.870235956326963
760.2478257250792960.4956514501585920.752174274920704
770.212591211439320.4251824228786410.78740878856068
780.1756167488027750.351233497605550.824383251197225
790.1539473042670630.3078946085341260.846052695732937
800.1363306649850080.2726613299700160.863669335014992
810.2445628340405820.4891256680811650.755437165959418
820.2448792999184580.4897585998369160.755120700081542
830.2144377776374760.4288755552749510.785562222362524
840.1771960169699670.3543920339399340.822803983030033
850.1621336950540870.3242673901081740.837866304945913
860.1461035036596810.2922070073193610.85389649634032
870.1723394878347370.3446789756694740.827660512165263
880.138943416173790.2778868323475810.86105658382621
890.1088309240152250.217661848030450.891169075984775
900.08436459590149320.1687291918029860.915635404098507
910.1036716124035620.2073432248071250.896328387596438
920.0817381517826180.1634763035652360.918261848217382
930.06311772824649420.1262354564929880.936882271753506
940.1876612713202660.3753225426405320.812338728679734
950.2321315462514560.4642630925029120.767868453748544
960.1924830994204330.3849661988408660.807516900579567
970.1712310804162480.3424621608324960.828768919583752
980.1377924518505650.275584903701130.862207548149435
990.1924970681471150.3849941362942290.807502931852885
1000.1815470268518710.3630940537037410.818452973148129
1010.1479362422113870.2958724844227740.852063757788613
1020.1271348869988470.2542697739976930.872865113001153
1030.1464829046596860.2929658093193720.853517095340314
1040.1093208688074630.2186417376149250.890679131192537
1050.09954279075767560.1990855815153510.900457209242324
1060.06961442876452450.1392288575290490.930385571235475
1070.08990898056462030.1798179611292410.91009101943538
1080.132614750083140.265229500166280.86738524991686
1090.1104431039935950.2208862079871910.889556896006405
1100.1798260188463320.3596520376926640.820173981153668
1110.1262584243433330.2525168486866660.873741575656667
1120.08313919524680050.1662783904936010.9168608047532
1130.2338521600700040.4677043201400070.766147839929996
1140.1695873555895430.3391747111790860.830412644410457
1150.102914559498420.205829118996840.89708544050158
1160.1434090256635220.2868180513270440.856590974336478


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/10hdut1290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/10hdut1290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/13lek1290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/13lek1290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/23lek1290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/23lek1290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/33lek1290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/33lek1290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/43lek1290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/43lek1290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/5wcw51290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/5wcw51290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/6wcw51290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/6wcw51290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/773v81290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/773v81290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/873v81290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/873v81290259272.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/9hdut1290259272.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290259192e0z586baco3v4et/9hdut1290259272.ps (open in new window)


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