Home » date » 2009 » Nov » 21 »

WS07-Multiple Regression - Lineaire trend

*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, 20 Nov 2009 18:45:11 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2.htm/, Retrieved Sat, 21 Nov 2009 02:47:30 +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/2009/Nov/21/t1258768038fem10au147ba8c2.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
423.4 0 404.1 0 500 0 472.6 0 496.1 0 562 0 434.8 0 538.2 0 577.6 0 518.1 0 625.2 0 561.2 0 523.3 0 536.1 0 607.3 0 637.3 0 606.9 0 652.9 0 617.2 0 670.4 0 729.9 0 677.2 0 710 0 844.3 0 748.2 0 653.9 0 742.6 0 854.2 0 808.4 0 1819 1 1936.5 1 1966.1 1 2083.1 1 1620.1 1 1527.6 1 1795 1 1685.1 1 1851.8 1 2164.4 1 1981.8 1 1726.5 1 2144.6 1 1758.2 1 1672.9 1 1837.3 1 1596.1 1 1446 1 1898.4 1 1964.1 1 1755.9 1 2255.3 1 1881.2 1 2117.9 1 1656.5 1 1544.1 1 2098.9 1 2133.3 1 1963.5 1 1801.2 1 2365.4 1 1936.5 1 1667.6 1 1983.5 1 2058.6 1 2448.3 1 1858.1 1 1625.4 1 2130.6 1 2515.7 1 2230.2 1 2086.9 1 2235 1 2100.2 1 2288.6 1 2490 1 2573.7 1 2543.8 1 2004.7 1 2390 1 2338.4 1 2724.5 1 2292.5 1 2386 1 2477.9 1 2337 1 2605.1 1 2560.8 1 2839.3 1 2407.2 1 2085.2 1 2735.6 1 2798.7 1 3053.2 1 2405 1 2471.9 1 2727.3 1 2790.7 1 2385.4 1 3206.6 1 2705.6 1 3518.4 1 1954.9 1 2584.3 1 2535.8 1 2685.9 1 2866 1 2236.6 1 2934.9 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 time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y(Export_farma_prod)[t] = + 404.662125621084 + 851.445963643862`X(sprong)`[t] + 13.7889617402036t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)404.66212562108446.1890068.76100
`X(sprong)`851.44596364386275.3516811.299600
t13.78896174020360.93122814.807300


Multiple Linear Regression - Regression Statistics
Multiple R0.95848144298342
R-squared0.91868667654358
Adjusted R-squared0.917296705202444
F-TEST (value)660.93929375058
F-TEST (DF numerator)2
F-TEST (DF denominator)117
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation237.088429825369
Sum Squared Residuals6576678.05617589


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1423.4418.4510873612894.9489126387107
2404.1432.240049101483-28.1400491014832
3500446.02901084169453.9709891583062
4472.6459.81797258189812.7820274181020
5496.1473.60693432210222.4930656778984
6562487.39589606230574.6041039376946
7434.8501.184857802509-66.384857802509
8538.2514.97381954271323.2261804572874
9577.6528.76278128291648.8372187170838
10518.1542.55174302312-24.4517430231198
11625.2556.34070476332468.8592952366765
12561.2570.129666503527-8.92966650352717
13523.3583.918628243731-60.6186282437309
14536.1597.707589983934-61.6075899839344
15607.3611.496551724138-4.19655172413818
16637.3625.28551346434212.0144865356582
17606.9639.074475204545-32.1744752045455
18652.9652.8634369447490.0365630552508093
19617.2666.652398684953-49.4523986849527
20670.4680.441360425156-10.0413604251565
21729.9694.2303221653635.6696778346399
22677.2708.019283905564-30.8192839055636
23710721.808245645767-11.8082456457673
24844.3735.597207385971108.702792614029
25748.2749.386169126175-1.18616912617449
26653.9763.175130866378-109.275130866378
27742.6776.964092606582-34.3640926065818
28854.2790.75305434678563.4469456532146
29808.4804.5420160869893.85798391301089
3018191669.77694147106149.223058528944
311936.51683.56590321126252.934096788740
321966.11697.35486495146268.745135048537
332083.11711.14382669167371.956173308333
341620.11724.93278843187-104.832788431871
351527.61738.72175017207-211.121750172074
3617951752.5107119122842.4892880877222
371685.11766.29967365248-81.1996736524815
381851.81780.0886353926971.711364607315
392164.41793.87759713289370.522402867111
401981.81807.66655887309174.133441126908
411726.51821.45552061330-94.955520613296
422144.61835.2444823535309.3555176465
431758.21849.03344409370-90.8334440937033
441672.91862.82240583391-189.922405833907
451837.31876.61136757411-39.3113675741107
461596.11890.40032931431-294.300329314314
4714461904.18929105452-458.189291054518
481898.41917.97825279472-19.5782527947214
491964.11931.7672145349332.3327854650748
501755.91945.55617627513-189.656176275129
512255.31959.34513801533295.954861984668
521881.21973.13409975554-91.934099755536
532117.91986.92306149574130.976938504260
541656.52000.71202323594-344.212023235943
551544.12014.50098497615-470.400984976147
562098.92028.2899467163570.6100532836495
572133.32042.0789084565591.221091543446
581963.52055.86787019676-92.367870196758
591801.22069.65683193696-268.456831936962
602365.42083.44579367717281.954206322835
611936.52097.23475541737-160.734755417369
621667.62111.02371715757-443.423717157573
631983.52124.81267889778-141.312678897776
642058.62138.60164063798-80.0016406379799
652448.32152.39060237818295.909397621817
661858.12166.17956411839-308.079564118387
671625.42179.96852585859-554.568525858591
682130.62193.75748759879-63.1574875987944
692515.72207.546449339308.153550661002
702230.22221.33541107928.86458892079823
712086.92235.12437281941-148.224372819405
7222352248.91333455961-13.9133345596089
732100.22262.70229629981-162.502296299813
742288.62276.4912580400212.1087419599838
7524902290.28021978022199.719780219780
762573.72304.06918152042269.630818479576
772543.82317.85814326063225.941856739373
782004.72331.64710500083-326.947105000831
7923902345.4360667410344.5639332589656
802338.42359.22502848124-20.8250284812379
812724.52373.01399022144351.486009778558
822292.52386.80295196165-94.3029519616453
8323862400.59191370185-14.5919137018489
842477.92414.3808754420563.5191245579475
8523372428.16983718226-91.1698371822562
862605.12441.95879892246163.14120107754
872560.82455.74776066266105.052239337337
882839.32469.53672240287369.763277597133
892407.22483.32568414307-76.1256841430709
902085.22497.11464588327-411.914645883275
912735.62510.90360762348224.696392376522
922798.72524.69256936368274.007430636318
933053.22538.48153110389514.718468896114
9424052552.27049284409-147.270492844089
952471.92566.05945458429-94.1594545842925
962727.32579.84841632450147.451583675504
972790.72593.6373780647197.0626219353
982385.42607.42633980490-222.026339804903
993206.62621.21530154511585.384698454893
1002705.62635.0042632853170.5957367146891
1013518.42648.79322502551869.606774974486
1021954.92662.58218676572-707.682186765718
1032584.32676.37114850592-92.0711485059215
1042535.82690.16011024613-154.360110246125
1052685.92703.94907198633-18.0490719863289
10628662717.73803372653148.261966273467
1072236.62731.52699546674-494.926995466736
1082934.92745.31595720694189.584042793060
1092668.62759.10491894714-90.5049189471436
1102371.22772.89388068735-401.693880687347
1113165.92786.68284242755379.217157572449
1122887.22800.4718041677586.7281958322454
1133112.22814.26076590796297.939234092042
1142671.22828.04972764816-156.849727648162
1152432.62841.83868938837-409.238689388365
1162812.32855.62765112857-43.3276511285687
1173095.72869.41661286877226.283387131227
1182862.92883.20557460898-20.3055746089762
1192607.32896.99453634918-289.69453634918
1202862.52910.78349808938-48.2834980893835


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.004038936839060520.008077873678121030.99596106316094
70.006052870775774230.01210574155154850.993947129224226
80.001254412550205730.002508825100411470.998745587449794
90.0002747360517104290.0005494721034208590.99972526394829
107.30037311247695e-050.0001460074622495390.999926996268875
112.16553660637136e-054.33107321274272e-050.999978344633936
124.93742349283792e-069.87484698567583e-060.999995062576507
132.38801384060602e-064.77602768121204e-060.99999761198616
147.24255585130209e-071.44851117026042e-060.999999275744415
151.39574499368316e-072.79148998736631e-070.9999998604255
162.97409511059042e-085.94819022118085e-080.999999970259049
175.36100061829533e-091.07220012365907e-080.999999994639
189.80739250269553e-101.96147850053911e-090.99999999901926
191.90864149179582e-103.81728298359165e-100.999999999809136
203.24232584387388e-116.48465168774776e-110.999999999967577
211.24260753325050e-112.48521506650100e-110.999999999987574
222.01866245509098e-124.03732491018196e-120.999999999997981
233.14510823335748e-136.29021646671496e-130.999999999999685
241.86022009483782e-123.72044018967565e-120.99999999999814
253.20175947925155e-136.4035189585031e-130.99999999999968
264.32553909655502e-138.65107819311004e-130.999999999999567
278.10867851961252e-141.62173570392250e-130.99999999999992
285.06239975744726e-141.01247995148945e-130.99999999999995
299.49840160068214e-151.89968032013643e-140.99999999999999
301.75182859853469e-153.50365719706938e-150.999999999999998
311.04536394975491e-152.09072789950982e-150.999999999999999
324.10932976756265e-168.2186595351253e-161
332.08846405639004e-154.17692811278009e-150.999999999999998
342.97202125924061e-115.94404251848121e-110.99999999997028
351.06284082904139e-082.12568165808277e-080.999999989371592
364.66352777531173e-099.32705555062345e-090.999999995336472
375.5736629311307e-091.11473258622614e-080.999999994426337
382.06383201057634e-094.12766402115268e-090.999999997936168
391.96848871582178e-083.93697743164356e-080.999999980315113
401.00979001923020e-082.01958003846040e-080.9999999899021
411.37666728559637e-082.75333457119274e-080.999999986233327
422.97764487309841e-085.95528974619682e-080.999999970223551
433.41251728192176e-086.82503456384352e-080.999999965874827
449.24209914981586e-081.84841982996317e-070.999999907579008
455.03949460951857e-081.00789892190371e-070.999999949605054
462.86188081421449e-075.72376162842898e-070.999999713811919
477.51293450783752e-061.50258690156750e-050.999992487065492
483.81879285785796e-067.63758571571593e-060.999996181207142
492.05178430832272e-064.10356861664545e-060.999997948215692
501.53190766241818e-063.06381532483637e-060.999998468092338
515.25456543070962e-061.05091308614192e-050.99999474543457
522.84816527003035e-065.6963305400607e-060.99999715183473
532.28454075222052e-064.56908150444103e-060.999997715459248
545.0500284554885e-061.0100056910977e-050.999994949971545
552.81643346246643e-055.63286692493287e-050.999971835665375
562.09660996664632e-054.19321993329264e-050.999979033900334
571.64540992557902e-053.29081985115804e-050.999983545900744
589.04384906768039e-061.80876981353608e-050.999990956150932
598.17225261993678e-061.63445052398736e-050.99999182774738
602.39906860757939e-054.79813721515877e-050.999976009313924
611.48996425835180e-052.97992851670361e-050.999985100357417
624.33757661576031e-058.67515323152062e-050.999956624233842
632.67488117514696e-055.34976235029392e-050.999973251188249
641.59220166986819e-053.18440333973638e-050.999984077983301
654.9338488741043e-059.8676977482086e-050.99995066151126
665.49216275039643e-050.0001098432550079290.999945078372496
670.000375115468409550.00075023093681910.99962488453159
680.0002642930326894790.0005285860653789570.99973570696731
690.0006765278434349420.001353055686869880.999323472156565
700.0004767694584364130.0009535389168728260.999523230541564
710.0003540181453686770.0007080362907373540.999645981854631
720.0002435975115506320.0004871950231012650.99975640248845
730.0001928126261068890.0003856252522137790.999807187373893
740.0001362958048944370.0002725916097888740.999863704195106
750.0001516081898873990.0003032163797747970.999848391810113
760.0002129602611502250.000425920522300450.99978703973885
770.0002220855309774040.0004441710619548080.999777914469023
780.0003648760482310050.0007297520964620110.99963512395177
790.0002438498842979260.0004876997685958530.999756150115702
800.0001602524236365380.0003205048472730760.999839747576363
810.0002786876770130390.0005573753540260770.999721312322987
820.0001973396845564560.0003946793691129120.999802660315444
830.0001258402236532630.0002516804473065260.999874159776347
847.86026984238664e-050.0001572053968477330.999921397301576
855.6561725597269e-050.0001131234511945380.999943438274403
863.95175520057194e-057.90351040114387e-050.999960482447994
872.41246790031506e-054.82493580063012e-050.999975875320997
883.80672808067838e-057.61345616135675e-050.999961932719193
892.47669523182955e-054.9533904636591e-050.999975233047682
900.0001221023430720620.0002442046861441240.999877897656928
919.10335977398026e-050.0001820671954796050.99990896640226
927.6749451256384e-050.0001534989025127680.999923250548744
930.0002611503488014340.0005223006976028690.999738849651199
940.000210575034926910.000421150069853820.999789424965073
950.0001494853047433680.0002989706094867360.999850514695257
968.72756088724134e-050.0001745512177448270.999912724391128
975.49653445283714e-050.0001099306890567430.999945034655472
986.29157329518436e-050.0001258314659036870.999937084267048
990.0003769718275797090.0007539436551594190.99962302817242
1000.0002080300977672440.0004160601955344880.999791969902233
1010.05140429600595280.1028085920119060.948595703994047
1020.2474730365955860.4949460731911730.752526963404414
1030.1935944953324840.3871889906649690.806405504667515
1040.1563008828058290.3126017656116580.843699117194171
1050.1123882280240470.2247764560480940.887611771975953
1060.09367144838573830.1873428967714770.906328551614262
1070.2235219279388690.4470438558777390.77647807206113
1080.1819466835002690.3638933670005370.818053316499731
1090.1325373151580040.2650746303160080.867462684841996
1100.3535719271340540.7071438542681090.646428072865946
1110.3564153022981540.7128306045963080.643584697701846
1120.2499959999860440.4999919999720880.750004000013956
1130.3769735304558320.7539470609116640.623026469544168
1140.2395200577163110.4790401154326220.760479942283689


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level940.862385321100917NOK
5% type I error level950.871559633027523NOK
10% type I error level950.871559633027523NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/10d18q1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/10d18q1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/1w49c1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/1w49c1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/22v6k1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/22v6k1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/3mahc1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/3mahc1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/4jjxz1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/4jjxz1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/5meol1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/5meol1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/6ml2h1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/6ml2h1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/7qp9x1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/7qp9x1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/81cgm1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/81cgm1258767904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/90ztl1258767904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258768038fem10au147ba8c2/90ztl1258767904.ps (open in new window)


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