Home » date » 2010 » Dec » 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: Mon, 27 Dec 2010 12:49: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/Dec/27/t12934543466avrbndtrvzes23.htm/, Retrieved Mon, 27 Dec 2010 13:52:37 +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/27/t12934543466avrbndtrvzes23.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 «
1775 0 2197 0 2920 0 4240 0 5415 0 6136 0 6719 0 6234 0 7152 0 3646 0 2165 0 2803 0 1615 0 2350 0 3350 0 3536 0 5834 0 6767 0 5993 0 7276 0 5641 0 3477 0 2247 0 2466 0 1567 0 2237 0 2598 0 3729 0 5715 0 5776 0 5852 0 6878 0 5488 0 3583 0 2054 0 2282 0 1552 0 2261 0 2446 0 3519 0 5161 0 5085 0 5711 0 6057 0 5224 0 3363 0 1899 0 2115 0 1491 0 2061 0 2419 0 3430 0 4778 0 4862 0 6176 0 5664 0 5529 0 3418 0 1941 0 2402 0 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 0 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 0 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 0 3028 0 4784 0 4975 0 4607 1 6249 1 4809 1 3157 1 1910 1 2228 1 1594 1 2467 1 2222 1 3607 1 4685 1 4962 1 5770 1 5480 1 5000 1 3228 1 1993 1 2288 1 1588 1 2105 1 2191 1 3591 1 4668 1 4885 1 5822 1 5599 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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Huwelijken[t] = + 2392.63212121212 -126.354545454546Dummy[t] -834.023636363627M1[t] -156.956969696964M2[t] + 191.509696969704M3[t] + 1049.84303030304M4[t] + 2599.30969696970M5[t] + 3105.04303030304M6[t] + 3245.06666666668M7[t] + 3857.73333333334M8[t] + 3231.13333333334M9[t] + 932.733333333333M10[t] -376.666666666665M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2392.63212121212118.7481320.148800
Dummy-126.35454545454666.895194-1.88880.0606460.030323
M1-834.023636363627162.08957-5.14541e-060
M2-156.956969696964162.08957-0.96830.3342770.167139
M3191.509696969704162.089571.18150.2390820.119541
M41049.84303030304162.089576.476900
M52599.30969696970162.0895716.036300
M63105.04303030304162.0895719.156300
M73245.06666666668162.02820720.027800
M83857.73333333334162.02820723.80900
M93231.13333333334162.02820719.941800
M10932.733333333333162.0282075.756600
M11-376.666666666665162.028207-2.32470.0212920.010646


Multiple Linear Regression - Regression Statistics
Multiple R0.966902537180792
R-squared0.934900516406653
Adjusted R-squared0.93022270920234
F-TEST (value)199.858710625095
F-TEST (DF numerator)12
F-TEST (DF denominator)167
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation443.732519561854
Sum Squared Residuals32882057.6690908


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
117751558.60848484848216.391515151523
221972235.67515151514-38.6751515151388
329202584.14181818183335.858181818171
442403442.47515151514797.524848484856
554154991.94181818183423.058181818171
661365497.67515151516638.324848484845
767195637.698787878791081.30121212121
862346250.36545454547-16.3654545454715
971525623.765454545481528.23454545452
1036463325.36545454547320.634545454534
1121652015.96545454547149.034545454534
1228032392.63212121212410.367878787885
1316151558.6084848484856.391515151517
1423502235.67515151515114.324848484847
1533502584.14181818182765.858181818183
1635363442.4751515151593.5248484848487
1758344991.94181818182842.058181818183
1867675497.675151515151269.32484848485
1959935637.69878787879355.301212121212
2072766250.365454545451025.63454545455
2156415623.7654545454517.2345454545469
2234773325.36545454545151.634545454547
2322472015.96545454545231.034545454546
2424662392.6321212121273.36787878788
2515671558.608484848488.39151515151506
2622372235.675151515151.32484848484714
2725982584.1418181818213.8581818181829
2837293442.47515151515286.524848484849
2957154991.94181818182723.058181818183
3057765497.67515151515278.324848484849
3158525637.69878787879214.301212121212
3268786250.36545454545627.634545454547
3354885623.76545454545-135.765454545453
3435833325.36545454545257.634545454547
3520542015.9654545454538.0345454545463
3622822392.63212121212-110.63212121212
3715521558.60848484848-6.60848484848493
3822612235.6751515151525.3248484848471
3924462584.14181818182-138.141818181817
4035193442.4751515151576.5248484848487
4151614991.94181818182169.058181818183
4250855497.67515151515-412.675151515151
4357115637.6987878787973.301212121212
4460576250.36545454545-193.365454545453
4552245623.76545454545-399.765454545453
4633633325.3654545454537.6345454545465
4718992015.96545454545-116.965454545454
4821152392.63212121212-277.63212121212
4914911558.60848484848-67.6084848484847
5020612235.67515151515-174.675151515153
5124192584.14181818182-165.141818181817
5234303442.47515151515-12.4751515151513
5347784991.94181818182-213.941818181817
5448625497.67515151515-635.675151515151
5561765637.69878787879538.301212121212
5656646250.36545454545-586.365454545453
5755295623.76545454545-94.765454545453
5834183325.3654545454592.6345454545465
5919412015.96545454545-74.9654545454537
6024022392.632121212129.36787878788009
6115791558.6084848484820.3915151515151
6221462235.67515151515-89.6751515151528
6324622584.14181818182-122.141818181817
6436953442.47515151515252.524848484849
6548314991.94181818182-160.941818181817
6651345497.67515151515-363.675151515151
6762505637.69878787879612.301212121212
6857606250.36545454545-490.365454545453
6962495623.76545454545625.234545454547
7029173325.36545454545-408.365454545453
7117412015.96545454545-274.965454545454
7223592392.63212121212-33.6321212121199
7315111558.60848484848-47.6084848484849
7420592235.67515151515-176.675151515153
7526352584.1418181818250.8581818181829
7628673442.47515151515-575.475151515151
7744034991.94181818182-588.941818181817
7857205497.67515151515222.324848484849
7945025637.69878787879-1135.69878787879
8057496250.36545454545-501.365454545453
8156275623.765454545453.23454545454693
8228463325.36545454545-479.365454545453
8317622015.96545454545-253.965454545454
8424292392.6321212121236.3678787878801
8511691558.60848484848-389.608484848485
8621542235.67515151515-81.6751515151528
8722492584.14181818182-335.141818181817
8826873442.47515151515-755.475151515151
8943594991.94181818182-632.941818181817
9053825497.67515151515-115.675151515151
9144595637.69878787879-1178.69878787879
9263986250.36545454545147.634545454547
9345965623.76545454545-1027.76545454545
9430243325.36545454545-301.365454545454
9518872015.96545454545-128.965454545454
9620702392.63212121212-322.632121212120
9713511558.60848484848-207.608484848485
9822182235.67515151515-17.6751515151529
9924612584.14181818182-123.141818181817
10030283442.47515151515-414.475151515151
10147844991.94181818182-207.941818181817
10249755497.67515151515-522.675151515151
10346075511.34424242424-904.344242424243
10462496124.01090909091124.989090909092
10548095497.41090909091-688.410909090908
10631573199.01090909091-42.0109090909084
10719101889.6109090909120.3890909090915
10822282266.27757575757-38.2775757575743
10915941432.25393939394161.746060606060
11024672109.32060606061357.679393939392
11122222457.78727272727-235.787272727273
11236073316.12060606061290.879393939393
11346854865.58727272727-180.587272727273
11449625371.32060606061-409.320606060606
11557705511.34424242424258.655757575757
11654806124.01090909091-644.010909090908
11750005497.41090909091-497.410909090908
11832283199.0109090909128.9890909090916
11919931889.61090909091103.389090909091
12022882266.2775757575721.7224242424255
12115881432.25393939394155.746060606060
12221052109.32060606061-4.32060606060828
12321912457.78727272727-266.787272727273
12435913316.12060606061274.879393939393
12546684865.58727272727-197.587272727273
12648855371.32060606061-486.320606060606
12758225511.34424242424310.655757575757
12855996124.01090909091-525.010909090908
12953405497.41090909091-157.410909090908
13030823199.01090909091-117.010909090908
13120101889.61090909091120.389090909091
13223012266.2775757575734.7224242424255
13315071432.2539393939474.7460606060598
13419922109.32060606061-117.320606060608
13524872457.7872727272729.2127272727274
13634903316.12060606061173.879393939393
13746474865.58727272727-218.587272727273
13855945371.32060606061222.679393939394
13956115511.3442424242499.6557575757568
14057886124.01090909091-336.010909090908
14162045497.41090909091706.589090909092
14230133199.01090909091-186.010909090908
14319311889.6109090909141.3890909090915
14425492266.27757575757282.722424242425
14515041432.2539393939471.7460606060598
14620902109.32060606061-19.3206060606082
14727022457.78727272727244.212727272728
14829393316.12060606061-377.120606060607
14945004865.58727272727-365.587272727273
15062085371.32060606061836.679393939394
15164155511.34424242424903.655757575757
15256576124.01090909091-467.010909090908
15359645497.41090909091466.589090909092
15431633199.01090909091-36.0109090909084
15519971889.61090909091107.389090909091
15624222266.27757575757155.722424242425
15713761432.25393939394-56.2539393939403
15822022109.3206060606192.6793939393917
15926832457.78727272727225.212727272728
16033033316.12060606061-13.1206060606068
16152024865.58727272727336.412727272728
16252315371.32060606061-140.320606060606
16348805511.34424242424-631.344242424243
16479986124.010909090911873.98909090909
16549775497.41090909091-520.410909090908
16635313199.01090909091331.989090909091
16720251889.61090909091135.389090909091
16822052266.27757575757-61.2775757575743
16914421432.253939393949.74606060605975
17022382109.32060606061128.679393939392
17121792457.78727272727-278.787272727273
17232183316.12060606061-98.1206060606067
17351394865.58727272727273.412727272728
17449905371.32060606061-381.320606060606
17549145511.34424242424-597.344242424243
17660846124.01090909091-40.0109090909082
17756725497.41090909091174.589090909092
17835483199.01090909091348.989090909091
17917931889.61090909091-96.6109090909085
18020862266.27757575757-180.277575757574


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.4445653289760160.8891306579520320.555434671023984
170.3837764442867550.767552888573510.616223555713245
180.4676811122455970.9353622244911930.532318887754403
190.5536720546026910.8926558907946170.446327945397309
200.7882212778089920.4235574443820170.211778722191008
210.9665550912271190.06688981754576290.0334449087728814
220.9475480040908760.1049039918182470.0524519959091236
230.9212537628866460.1574924742267090.0787462371133544
240.8954966965845730.2090066068308540.104503303415427
250.8551935501626340.2896128996747320.144806449837366
260.8042775176966620.3914449646066760.195722482303338
270.8016036114039010.3967927771921980.198396388596099
280.7566292633675340.4867414732649330.243370736632466
290.734564999714710.530870000570580.26543500028529
300.7784739950135260.4430520099729480.221526004986474
310.7790192183029730.4419615633940530.220980781697027
320.761313584703160.477372830593680.23868641529684
330.8435624287190440.3128751425619120.156437571280956
340.8086848775011460.3826302449977090.191315122498854
350.7669634288420270.4660731423159460.233036571157973
360.7377040588942170.5245918822115660.262295941105783
370.6869647420775760.6260705158448470.313035257922424
380.6310956403058540.7378087193882930.368904359694146
390.6321706336736680.7356587326526650.367829366326332
400.602366813722670.795266372554660.39763318627733
410.6135672569064080.7728654861871840.386432743093592
420.7976701441254220.4046597117491560.202329855874578
430.7950870594721020.4098258810557970.204912940527898
440.8262576452022660.3474847095954680.173742354797734
450.8724671575859670.2550656848280660.127532842414033
460.8485083815891770.3029832368216450.151491618410823
470.821795299962960.3564094000740790.178204700037039
480.8046067766933760.3907864466132490.195393223306624
490.7684573612138770.4630852775722470.231542638786123
500.7320279544564970.5359440910870060.267972045543503
510.7127753981092530.5744492037814940.287224601890747
520.6873249172729750.625350165454050.312675082727025
530.7266379642595550.5467240714808910.273362035740445
540.8325923258123380.3348153483753250.167407674187662
550.8449609712576460.3100780574847080.155039028742354
560.8929045846646820.2141908306706360.107095415335318
570.8780608895533240.2438782208933530.121939110446676
580.8577375990822670.2845248018354660.142262400917733
590.8308378910977150.3383242178045710.169162108902285
600.8002304987852520.3995390024294960.199769501214748
610.7672265667803040.4655468664393920.232773433219696
620.7291946331259880.5416107337480230.270805366874012
630.699134300442410.6017313991151790.300865699557589
640.6838071682372860.6323856635254290.316192831762714
650.6839786098009560.6320427803980880.316021390199044
660.6861951295322370.6276097409355260.313804870467763
670.7541998684406930.4916002631186140.245800131559307
680.767942515214960.464114969570080.23205748478504
690.8307427205256480.3385145589487030.169257279474352
700.8301856749102960.3396286501794090.169814325089704
710.8082327853905250.383534429218950.191767214609475
720.7793267431796090.4413465136407820.220673256820391
730.7484698192421890.5030603615156230.251530180757811
740.7125952207750310.5748095584499370.287404779224969
750.6881052003085420.6237895993829170.311894799691458
760.7288478653862040.5423042692275920.271152134613796
770.7730193265108540.4539613469782930.226980673489146
780.7703026755710630.4593946488578730.229697324428937
790.9281666677123680.1436666645752640.0718333322876318
800.925386804655150.14922639068970.07461319534485
810.9215870931456730.1568258137086550.0784129068543274
820.917274325104390.1654513497912200.0827256748956098
830.9010171742633890.1979656514732220.0989828257366111
840.8872723617618420.2254552764763170.112727638238158
850.8737091489814820.2525817020370370.126290851018518
860.8505676461748650.298864707650270.149432353825135
870.8348838799424750.3302322401150500.165116120057525
880.864476269216150.27104746156770.13552373078385
890.8761574272726120.2476851454547770.123842572727388
900.860937566653020.278124866693960.13906243334698
910.9439824314002610.1120351371994780.056017568599739
920.9388881028117680.1222237943764650.0611118971882324
930.9692254740484780.0615490519030440.030774525951522
940.9618949164005570.07621016719888560.0381050835994428
950.9515931416787990.09681371664240220.0484068583212011
960.941677788894160.1166444222116800.0583222111058402
970.9278063888001340.1443872223997320.0721936111998659
980.9120220630632240.1759558738735530.0879779369367763
990.8963617040607810.2072765918784380.103638295939219
1000.8819929753856150.236014049228770.118007024614385
1010.8639343455994930.2721313088010140.136065654400507
1020.85435529598820.2912894080235980.145644704011799
1030.8913107093151370.2173785813697260.108689290684863
1040.8908249236020150.2183501527959700.109175076397985
1050.902808029103030.1943839417939390.0971919708969697
1060.8887933085395750.222413382920850.111206691460425
1070.8714641854391290.2570716291217430.128535814560872
1080.848231520200160.303536959599680.15176847979984
1090.8277569704884680.3444860590230640.172243029511532
1100.8203690168529220.3592619662941560.179630983147078
1110.7930587798766880.4138824402466230.206941220123312
1120.7753661505044330.4492676989911340.224633849495567
1130.7406849622479960.5186300755040090.259315037752004
1140.7262690292106020.5474619415787960.273730970789398
1150.7002517268825440.5994965462349120.299748273117456
1160.7398414720172990.5203170559654030.260158527982701
1170.7517891994377840.4964216011244320.248210800562216
1180.713385381780810.5732292364383810.286614618219190
1190.6739919020410560.6520161959178880.326008097958944
1200.6293790271176870.7412419457646250.370620972882313
1210.5882698425917920.8234603148164160.411730157408208
1220.5392819178742940.9214361642514130.460718082125706
1230.5048571183831470.9902857632337070.495142881616853
1240.4792891661505590.9585783323011180.520710833849441
1250.4351645386144920.8703290772289840.564835461385508
1260.4464546807846610.8929093615693220.553545319215339
1270.4238736233958490.8477472467916980.576126376604151
1280.469522858017720.939045716035440.53047714198228
1290.4368648991230870.8737297982461730.563135100876913
1300.3928469853968910.7856939707937820.607153014603109
1310.3461276413119150.6922552826238290.653872358688085
1320.2987672607311920.5975345214623830.701232739268808
1330.2551091603529220.5102183207058430.744890839647078
1340.2167009625932200.4334019251864390.78329903740678
1350.179130673724630.358261347449260.82086932627537
1360.1559520555489210.3119041110978410.844047944451079
1370.1319909903693910.2639819807387810.86800900963061
1380.1079600727495170.2159201454990340.892039927250483
1390.08650458830066120.1730091766013220.913495411699339
1400.1007681301127300.2015362602254610.89923186988727
1410.1218313047692440.2436626095384890.878168695230756
1420.1051340628050180.2102681256100360.894865937194982
1430.08038038139826670.1607607627965330.919619618601733
1440.06635461817625470.1327092363525090.933645381823745
1450.04909790113292660.09819580226585320.950902098867073
1460.03556864559211680.07113729118423360.964431354407883
1470.02693558969828710.05387117939657430.973064410301713
1480.02085034958284170.04170069916568330.979149650417158
1490.02086338120530860.04172676241061730.979136618794691
1500.0469555423156390.0939110846312780.95304445768436
1510.2142821544291280.4285643088582550.785717845570872
1520.5284479650048320.9431040699903360.471552034995168
1530.5620038358239220.8759923283521550.437996164176078
1540.5174246610715970.9651506778568060.482575338928403
1550.4349464852922440.8698929705844880.565053514707756
1560.3704436602996230.7408873205992460.629556339700377
1570.2891446052604370.5782892105208730.710855394739563
1580.2149311350103180.4298622700206350.785068864989682
1590.1828834351254520.3657668702509050.817116564874548
1600.1234506490208140.2469012980416280.876549350979186
1610.0784870958083260.1569741916166520.921512904191674
1620.04727449203077620.09454898406155240.952725507969224
1630.02587263116561070.05174526233122140.97412736883439
1640.7243726769911680.5512546460176630.275627323008832


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0134228187919463OK
10% type I error level120.0805369127516778OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/106pk61293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/106pk61293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/1honc1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/1honc1293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/2sx4x1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/2sx4x1293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/3sx4x1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/3sx4x1293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/4sx4x1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/4sx4x1293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/5sx4x1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/5sx4x1293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/6kpli1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/6kpli1293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/7dy2l1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/7dy2l1293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/8dy2l1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/8dy2l1293454152.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/9dy2l1293454152.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934543466avrbndtrvzes23/9dy2l1293454152.ps (open in new window)


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