Home » date » 2010 » Nov » 22 »

WS7 deterministic 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: Mon, 22 Nov 2010 20:37:40 +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/22/t1290458386mlepjcjv0onjxbf.htm/, Retrieved Mon, 22 Nov 2010 21:39:58 +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/22/t1290458386mlepjcjv0onjxbf.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 «
41 25 15 9 3 38 25 15 9 4 37 19 14 9 4 36 18 10 14 2 42 18 10 8 4 44 23 9 14 4 40 23 18 15 3 43 25 14 9 4 40 23 11 11 4 45 24 11 14 4 47 32 9 14 4 45 30 17 6 5 45 32 21 10 4 40 24 16 9 4 49 17 14 14 4 48 30 24 8 5 44 25 7 11 4 29 25 9 10 4 42 26 18 16 4 45 23 11 11 5 32 25 13 11 5 32 25 13 11 5 41 35 18 7 4 29 19 14 13 2 38 20 12 10 4 41 21 12 9 4 38 21 9 9 4 24 23 11 15 3 34 24 8 13 2 38 23 5 16 2 37 19 10 12 3 46 17 11 6 5 48 27 15 4 5 42 27 16 12 4 46 25 12 10 4 43 18 14 14 5 38 22 13 9 4 39 26 10 10 4 34 26 18 14 4 39 23 17 14 4 35 16 12 10 2 41 27 13 9 3 40 25 13 14 3 43 14 11 8 4 37 19 13 9 2 41 20 12 8 4 46 26 12 10 4 26 16 12 9 3 41 18 12 9 3 37 22 9 9 3 39 25 17 9 4 44 29 18 11 5 39 21 7 15 2 36 22 17 8 4 38 22 12 10 2 38 32 12 8 0 38 23 9 14 4 32 31 9 11 4 33 18 13 10 3 46 23 10 12 4 42 24 12 9 4 42 19 10 13 2 43 26 11 14 4 41 14 13 15 2 49 20 6 8 4 45 22 7 7 3 39 24 13 10 4 45 25 11 10 5 31 21 18 13 3 30 21 18 13 3 45 28 9 11 4 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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
LeadershipPreference[t] = + 1.63596771428962 + 0.0405311256109401Career[t] + 0.047890142115417PersonalStandards[t] + 0.0137973603388139ParentalExpectations[t] -0.0745266685219804Doubts[t] -0.000855430748768299t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.635967714289620.7348552.22620.0275960.013798
Career0.04053112561094010.0139292.90980.0042090.002104
PersonalStandards0.0478901421154170.0178852.67760.0083010.004151
ParentalExpectations0.01379736033881390.0217580.63410.5270360.263518
Doubts-0.07452666852198040.02579-2.88980.0044690.002235
t-0.0008554307487682990.001719-0.49770.6194840.309742


Multiple Linear Regression - Regression Statistics
Multiple R0.456013921999117
R-squared0.207948697057017
Adjusted R-squared0.179661150523339
F-TEST (value)7.35124542559537
F-TEST (DF numerator)5
F-TEST (DF denominator)140
p-value3.79880482204165e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.8475088091418
Sum Squared Residuals100.557965420213


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
134.03036237485918-1.03036237485918
243.907913567277610.092086432722387
343.565388797886590.434611202113411
423.04828931544630-1.04828931544630
543.737780649495060.262219350504939
643.596480809074560.403519190925438
733.48315045040938-0.483150450409379
844.09163925050089-0.091639250500891
943.682964740628070.317035259371934
1043.709075074483470.290924925516527
1144.14480831120229-0.144808311202293
1254.673702575887170.326297424112834
1344.52571019663657-0.525710196636566
1443.944617867737670.0553821322623282
1543.573083509391920.426916490608085
1654.739402415052650.260597584947350
1743.878836639957260.121163360042743
1843.372135714244000.627864285756004
1943.623091290470310.37690870952969
2053.876210630446311.12378936955369
2153.471825571663791.52817442833621
2253.470970140915021.52902985908498
2344.68088973760087-0.680889737600873
2422.92506907318701-0.925069073187013
2543.532869199940440.467130800059564
2643.776023956661890.223976043338115
2743.612183068063850.387816931936145
2832.720106872538500.279893127461495
2923.28011409604207-1.28011409604207
3023.12852093903926-1.12852093903926
3133.26266728999988-0.262667289999880
3253.991769076989431.00823092301057
3354.755120097015930.244879902984066
3443.92866192476450.0713380752355042
3544.08801460791736-0.0880146079173586
3653.359822852117561.64017714788244
3743.706708344046850.293291655953155
3843.822025857832260.177974142167738
3943.430787007651380.569212992348616
4043.475119418272250.524880581727749
4123.20602836266565-1.20602836266565
4234.06347527771291-1.06347527771291
4333.55367509451246-0.553675094512464
4443.567186767781180.432813232218816
4523.51566334609951-1.51566334609951
4643.785551868093080.214448131906917
4744.12563958104756-0.125639581047556
4832.909786885447800.0902131145522034
4933.61267862309396-0.612678623093963
5033.59986717734666-0.599867177346661
5143.934123306876540.0658766931234643
5254.192228095938990.807771904061011
5323.15571826239731-1.15571826239731
5443.740819879973140.25918012002686
5523.60298656170822-1.60298656170822
5604.23008588915758-4.23008588915758
5743.309667087221740.690332912778262
5843.672326045296610.327673954703394
5933.21914600253559-0.219146002535593
6043.794200497245730.205799502754272
6143.930285432412190.0697145675878141
6223.36427789632078-1.36427789632078
6343.678455277807710.321544722192293
6422.9749239426077-0.974923942607703
6544.01076352672112-0.0107635267211218
6634.03188790662022-1.03188790662022
6743.742830162903590.257169837096411
6854.005456907258250.99454309274175
6933.11860666630041-0.118606666300410
7033.0772201099407-0.0772201099407018
7144.04443965215859-0.0444396521585882
7254.197197035346910.802802964653086
7342.548939883225151.45106011677485
7423.47797916671655-1.47797916671655
7543.675160169864710.324839830135286
7643.633009896965070.366990103034934
7743.644933915019410.355066084980590
7843.115856221916880.884143778083121
7943.183853337265550.816146662734447
8022.81392782005817-0.813927820058166
8154.604735971501170.39526402849883
8243.756829705809750.243170294190246
8322.30442307810982-0.304423078109816
8433.23848583715845-0.238485837158451
8533.65399869564133-0.653998695641332
8653.971448121552711.02855187844729
8743.669648955503750.330351044496247
8834.13734191206221-1.13734191206221
8943.668626767344310.331373232655695
9033.65295606472102-0.652956064721021
9143.85320612841350.146793871586499
9254.040842205582080.959157794417918
9322.50476026350089-0.504760263500894
9443.61031284424740.389687155752602
9543.434703548655460.565296451344543
9643.302747336695210.697252663304788
9753.262318974606571.73768102539343
9823.02181835554959-1.02181835554959
9933.22757076446906-0.227570764469056
10043.735735634243670.264264365756327
10143.589449839866870.410550160133135
10233.747132954877-0.747132954877001
10333.72491134361660-0.724911343616605
10453.451126050650391.54887394934961
10543.700224450729350.299775549270649
10644.17079249497086-0.170792494970860
10742.912424566674241.08757543332576
10843.943390761634130.0566092383658726
10923.53794226843582-1.53794226843582
11043.498928774624280.501071225375718
11153.268894259086881.73110574091312
11233.71615703374106-0.716157033741063
11333.32626583816336-0.326265838163360
11433.93739722173602-0.937397221736016
11543.71365045875940.286349541240604
11644.19533525338779-0.195335253387790
11743.27088869176670.729111308233299
11833.19372496442031-0.193724964420311
11923.23426161468798-1.23426161468798
12032.969354770026970.0306452299730272
12133.46920192415619-0.469201924156188
12243.466295344398800.533704655601196
12354.021780107740300.978219892259696
12443.386628813824630.613371186175369
12533.85445653084957-0.854456530849574
12633.45594057709257-0.455940577092569
12743.384923476983830.615076523016172
12843.796409080651320.203590919348676
12943.501834170640350.498165829359645
13033.30211836732022-0.30211836732022
13154.089792568469750.91020743153025
13233.33208970345019-0.332089703450193
13343.464004117185770.535995882814232
13443.650794564886060.349205435113941
13543.529071952243480.470928047756515
13643.966565126244090.0334348737559073
13753.735594107229481.26440589277052
13833.35504603524218-0.355046035242175
13923.45020288805629-1.45020288805629
14033.38775719371885-0.387757193718854
14133.60609457371031-0.606094573710307
14233.50087212702219-0.500872127022188
14342.906213932246671.09378606775333
14423.4391581522805-1.4391581522805
14543.320505105052100.679494894947896
14623.18711182915104-1.18711182915104


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.511551364698740.976897270602520.48844863530126
100.3433169044580830.6866338089161670.656683095541917
110.2237545988674110.4475091977348230.776245401132589
120.1383196359820250.2766392719640490.861680364017975
130.09266819305210130.1853363861042030.907331806947899
140.05272409675308690.1054481935061740.947275903246913
150.02806798350877030.05613596701754050.97193201649123
160.01498883987922210.02997767975844420.985011160120778
170.009488436054084690.01897687210816940.990511563945915
180.006895512372661160.01379102474532230.993104487627339
190.004163586786303740.008327173572607470.995836413213696
200.002673830482274460.005347660964548930.997326169517726
210.004083817967190990.008167635934381970.99591618203281
220.003373184419821560.006746368839643120.996626815580179
230.01566137694284950.0313227538856990.98433862305715
240.1233322255030150.2466644510060290.876667774496985
250.09760111390284350.1952022278056870.902398886097156
260.08365453788502530.1673090757700510.916345462114975
270.06594585750588460.1318917150117690.934054142494115
280.04699539971773040.09399079943546090.95300460028227
290.1512282341005620.3024564682011240.848771765899438
300.2029002533112630.4058005066225260.797099746688737
310.1725476007132860.3450952014265720.827452399286714
320.1497222301588420.2994444603176840.850277769841158
330.1226009543655950.2452019087311900.877399045634405
340.09338312959943780.1867662591988760.906616870400562
350.07239001940557710.1447800388111540.927609980594423
360.1266444666272940.2532889332545880.873355533372706
370.1007581216250040.2015162432500090.899241878374996
380.07731995344689320.1546399068937860.922680046553107
390.06350121544208450.1270024308841690.936498784557915
400.04995073753084450.0999014750616890.950049262469155
410.1184974390073960.2369948780147930.881502560992603
420.1501308558089450.3002617116178890.849869144191056
430.1323009487682560.2646018975365120.867699051231744
440.1091311168157440.2182622336314880.890868883184256
450.1951039150046070.3902078300092140.804896084995393
460.1622963528583480.3245927057166970.837703647141652
470.1312891703978100.2625783407956200.86871082960219
480.1051996523582920.2103993047165830.894800347641708
490.09482168532135170.1896433706427030.905178314678648
500.07986534256747750.1597306851349550.920134657432522
510.0625490894562530.1250981789125060.937450910543747
520.0660298788390540.1320597576781080.933970121160946
530.0727558153836310.1455116307672620.927244184616369
540.05903020279089020.1180604055817800.94096979720911
550.09690235898796250.1938047179759250.903097641012037
560.897705797493340.2045884050133210.102294202506661
570.9097448501518570.1805102996962850.0902551498481425
580.9211683031277640.1576633937444720.0788316968722358
590.9023251522529510.1953496954940980.0976748477470488
600.8847759112095490.2304481775809020.115224088790451
610.8630351316130260.2739297367739470.136964868386974
620.895106782198060.209786435603880.10489321780194
630.8818315758527680.2363368482944640.118168424147232
640.8855746669933620.2288506660132760.114425333006638
650.864312691196850.2713746176062990.135687308803150
660.881966612403580.2360667751928400.118033387596420
670.8655542604423510.2688914791152980.134445739557649
680.8821230556642480.2357538886715040.117876944335752
690.8569769761522630.2860460476954740.143023023847737
700.8286171225858750.3427657548282510.171382877414125
710.8080136063061160.3839727873877680.191986393693884
720.805817252330850.38836549533830.19418274766915
730.8684527686301940.2630944627396110.131547231369806
740.9242102121083280.1515795757833440.0757897878916718
750.9083237060024110.1833525879951770.0916762939975886
760.8923183236333760.2153633527332490.107681676366624
770.8713438685886960.2573122628226070.128656131411304
780.8720598978067770.2558802043864460.127940102193223
790.8712188926456830.2575622147086340.128781107354317
800.8694087346456420.2611825307087160.130591265354358
810.8519874372758830.2960251254482330.148012562724117
820.8248258398172040.3503483203655920.175174160182796
830.8112126688790540.3775746622418930.188787331120946
840.7867597759502480.4264804480995030.213240224049752
850.7786781315388610.4426437369222790.221321868461139
860.784875931679070.4302481366418610.215124068320930
870.7496621296545980.5006757406908040.250337870345402
880.7932609658907640.4134780682184710.206739034109236
890.7618280353677160.4763439292645680.238171964632284
900.7704413368949930.4591173262100140.229558663105007
910.7301123875319750.539775224936050.269887612468025
920.7236938234649460.5526123530701070.276306176535054
930.7259054796828830.5481890406342340.274094520317117
940.7023274633489460.5953450733021080.297672536651054
950.6688135735221350.662372852955730.331186426477865
960.6349970255192780.7300059489614440.365002974480722
970.743349984936520.5133000301269580.256650015063479
980.7706835458338990.4586329083322010.229316454166101
990.7394839368902860.5210321262194280.260516063109714
1000.7028559253947630.5942881492104730.297144074605237
1010.65908380996920.6818323800616010.340916190030800
1020.6328874863109370.7342250273781250.367112513689062
1030.6279010626963840.7441978746072310.372098937303616
1040.6716080147337120.6567839705325760.328391985266288
1050.6214189377254430.7571621245491140.378581062274557
1060.5680088658257530.8639822683484940.431991134174247
1070.5995060913085480.8009878173829050.400493908691452
1080.5454517610550330.9090964778899340.454548238944967
1090.7485717888007330.5028564223985340.251428211199267
1100.7100773921872930.5798452156254140.289922607812707
1110.8509551438966150.2980897122067690.149044856103385
1120.836413143928980.3271737121420410.163586856071020
1130.797201137365540.4055977252689220.202798862634461
1140.8229526997932980.3540946004134030.177047300206702
1150.779799007180090.4404019856398190.220200992819909
1160.7930777765708980.4138444468582040.206922223429102
1170.7637093577198360.4725812845603290.236290642280164
1180.7148438076716350.570312384656730.285156192328365
1190.7919266872336040.4161466255327920.208073312766396
1200.7594443515899870.4811112968200260.240555648410013
1210.7489351479054660.5021297041890670.251064852094534
1220.7081002078427640.5837995843144730.291899792157236
1230.6599746568902760.6800506862194480.340025343109724
1240.5981758336768560.8036483326462880.401824166323144
1250.5884900036871150.8230199926257710.411509996312885
1260.6325633373511650.734873325297670.367436662648835
1270.5762552967087010.8474894065825970.423744703291299
1280.5070786871799240.9858426256401530.492921312820077
1290.4577395071239530.9154790142479050.542260492876047
1300.3691081145472220.7382162290944450.630891885452778
1310.3653065385522780.7306130771045560.634693461447722
1320.3129832106949600.6259664213899210.68701678930504
1330.4440112269928970.8880224539857950.555988773007103
1340.35717502333530.71435004667060.6428249766647
1350.2535008280900290.5070016561800590.74649917190997
1360.1719396183515570.3438792367031150.828060381648443
1370.3826716080677340.7653432161354680.617328391932266


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level40.0310077519379845NOK
5% type I error level80.062015503875969NOK
10% type I error level110.0852713178294574OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/10uhv01290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/10uhv01290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/15yyo1290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/15yyo1290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/2y7fr1290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/2y7fr1290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/3y7fr1290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/3y7fr1290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/4y7fr1290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/4y7fr1290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/59zxc1290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/59zxc1290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/69zxc1290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/69zxc1290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/7j8ex1290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/7j8ex1290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/8uhv01290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/8uhv01290458249.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/9uhv01290458249.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458386mlepjcjv0onjxbf/9uhv01290458249.ps (open in new window)


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