Home » date » 2010 » Dec » 29 »

*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: Wed, 29 Dec 2010 10:35:59 +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/29/t12936189569ubsj5nieiiea4p.htm/, Retrieved Wed, 29 Dec 2010 11:35:56 +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/29/t12936189569ubsj5nieiiea4p.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 «
13 13 14 182 13 169 3 39 2 26 12 12 8 96 13 156 5 60 1 12 15 10 12 120 16 160 6 60 0 0 12 9 7 63 12 108 6 54 3 27 10 10 10 100 11 110 5 50 3 30 12 12 7 84 12 144 3 36 1 12 15 13 16 208 18 234 8 104 3 39 9 12 11 132 11 132 4 48 1 12 12 12 14 168 14 168 4 48 4 48 11 6 6 36 9 54 4 24 0 0 11 5 16 80 14 70 6 30 3 15 11 12 11 132 12 144 6 72 2 24 15 11 16 176 11 121 5 55 4 44 7 14 12 168 12 168 4 56 3 42 11 14 7 98 13 182 6 84 1 14 11 12 13 156 11 132 4 48 1 12 10 12 11 132 12 144 6 72 2 24 14 11 15 165 16 176 6 66 3 33 10 11 7 77 9 99 4 44 1 11 6 7 9 63 11 77 4 28 1 7 11 9 7 63 13 117 2 18 2 18 15 11 14 154 15 165 7 77 3 33 11 11 15 165 10 110 5 55 4 44 12 12 7 84 11 132 4 48 2 24 14 12 15 180 13 156 6 72 1 12 15 11 17 187 16 176 6 66 2 22 9 11 15 165 15 165 7 77 2 22 13 8 14 112 14 112 5 40 4 32 13 9 14 126 14 126 6 54 2 18 16 12 8 96 14 168 4 48 3 36 13 10 8 80 8 80 4 40 3 30 12 10 14 140 13 130 7 70 3 30 14 12 14 168 15 180 7 84 4 48 11 8 8 64 13 104 4 32 2 16 9 12 11 132 11 13 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 7.13071247390462 -0.501068230469552FindingFriends[t] + 0.0144399681786133KnowingPeople[t] + 0.0195920449423166friends_knowning[t] + 0.453370355865983Liked[t] -0.0119296940515774friends_liked[t] -1.04257015127669Celebrity[t] + 0.146732923963820friends_celeb[t] + 1.14069077304853Sum[t] -0.0845908632946571friends_sum[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.130712473904625.6180271.26930.206370.103185
FindingFriends-0.5010682304695520.493294-1.01580.3114250.155712
KnowingPeople0.01443996817861330.399690.03610.971230.485615
friends_knowning0.01959204494231660.0357770.54760.5847940.292397
Liked0.4533703558659830.5020720.9030.3680140.184007
friends_liked-0.01192969405157740.047077-0.25340.8003080.400154
Celebrity-1.042570151276691.209949-0.86170.3902850.195143
friends_celeb0.1467329239638200.1071871.36890.1731210.086561
Sum1.140690773048530.8414241.35570.1772980.088649
friends_sum-0.08459086329465710.075323-1.1230.2632630.131631


Multiple Linear Regression - Regression Statistics
Multiple R0.722001202058945
R-squared0.521285735774562
Adjusted R-squared0.491775952363404
F-TEST (value)17.6648445199185
F-TEST (DF numerator)9
F-TEST (DF denominator)146
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.09351674679716
Sum Squared Residuals639.890605891545


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11310.93932622453882.06067377546120
21210.86375721733151.13624278266855
31512.53808435620292.46191564379708
41210.91479031769241.08520968230763
51010.9065837761927-0.906583776192664
6128.867548810019663.13245118998034
71517.3348198468565-2.3348198468565
8910.2737377490074-1.27373774900742
91212.3298145937458-0.329814593745755
10117.7036958121163.296304187884
111112.2356569872936-1.23565698729358
121112.1460020623454-1.14600206234544
131512.54000744258592.45999255741406
14710.9327752831474-3.93277528314743
151111.8860311300230-0.886031130023043
161110.77282676398020.227173236019755
171012.1460020623454-2.14600206234543
181414.2820743220530-0.282074322053041
19108.624081994344561.37591800565544
2069.54277687401174-3.54277687401174
21119.769315766106751.23068423389325
221514.30147015053560.69852984946435
231111.9879112587432-0.98791125874321
24129.401160132574412.59883986742559
251413.32879370602550.671206293974503
261514.53178797033390.468212029666069
27914.3212313362724-5.32123133627244
281313.0420161354698-0.0420161354698297
291312.56280214171560.437197858284434
301610.70694713531465.29305286468537
31139.058883606576963.94111639342304
321213.2656904540232-1.26569045402324
331414.7947034298603-0.794703429860287
341110.59780439189720.402195608102836
35910.3993381625201-1.39933816252006
361614.40007434010581.59992565989419
371212.9527000501128-0.952700050112832
381010.2816921026549-0.281692102654871
391312.87549941880570.124500581194254
401615.50390135053710.496098649462922
411413.08090551807800.91909448192204
42158.594425962985336.40557403701467
4358.72145244464665-3.72145244464665
44810.2803705458728-2.28037054587275
451111.1736409222425-0.173640922242536
461613.74937396669292.25062603330708
471714.32744252797422.67255747202575
4898.293707264202580.706292735797424
49911.4237199277776-2.42371992777761
501314.6345807087657-1.63458070876572
511010.9589490446740-0.958949044674013
52612.0949341895663-6.09493418956629
531212.1721492745242-0.172149274524155
54810.2711326945549-2.27113269455493
551412.31808629218001.68191370781997
561212.9345812369023-0.934581236902313
571110.93320684879770.0667931512023279
581614.39509111263131.60490888736870
59810.5242002387326-2.52420023873258
601514.47234079498320.527659205016821
6178.99149290399343-1.99149290399343
621614.26535348129691.7346465187031
631412.44526478281271.55473521718731
641613.30959558459572.69040441540429
65910.8253687840318-1.82536878403182
661412.23708016827621.76291983172384
671113.3953809193164-2.39538091931638
681310.30399868259802.69600131740202
691513.20650593159061.79349406840939
7054.638663774814840.361336225185164
711512.93458123690232.06541876309769
721312.48828099530140.511719004698553
731112.3566762937614-1.35667629376135
741114.0222084053631-3.02220840536308
751212.7149926705601-0.71499267056012
761213.5799945330508-1.57999453305079
771212.4119671620672-0.411967162067243
781212.0489431376080-0.0489431376080456
791410.58134672180203.41865327819801
8067.58956533899704-1.58956533899704
8179.58577374630882-2.58577374630882
821412.61440080302861.38559919697144
831414.0323606737721-0.0323606737721499
841011.1562354690427-1.15623546904270
85138.619660622072134.38033937792787
861212.6976423672448-0.697642367244776
8799.3863694549946-0.386369454994595
881211.85851047603720.14148952396285
891614.66277088605371.33722911394631
901010.4708006369433-0.470800636943257
911412.92212073252531.07787926747474
921013.5000256756662-3.50002567566622
931615.60400647208020.395993527919833
941513.26165220086531.73834779913472
951211.50219757435680.497802425643212
96109.399503813035540.600496186964465
9789.49370108808758-1.49370108808758
9888.16051735795124-0.160517357951236
991112.4720212055406-1.47202120554065
1001312.58181650310510.418183496894865
1011615.52366253627390.476337463726128
1021615.04424793734670.9557520626533
1031416.205090299453-2.20509029945300
104119.37862820205921.62137179794081
10547.74128845004527-3.74128845004527
1061415.1234318658932-1.12343186589317
107910.9355728477718-1.93557284777183
1081415.1029146254051-1.10291462540508
109810.4697215653163-2.46972156531634
110811.0222268640315-3.02222686403150
1111111.7399605772429-0.739960577242937
1121211.72595454052750.274045459472454
1131111.2068372326215-0.206837232621550
1141413.45013274554680.549867254453218
1151514.48022802862190.51977197137813
1161613.40783441691172.59216558308832
1171613.26386281227352.73613718772651
1181112.6382246488744-1.63822464887442
1191414.1414093873231-0.14140938732313
1201410.95046674776823.04953325223176
1211211.39491113801320.60508886198677
1221412.65195988707731.34804011292273
123810.8911831905579-2.89118319055786
1241314.1836397913579-1.18363979135789
1251614.01580897381051.98419102618952
1261210.54928181609301.45071818390697
1271615.69754197988390.302458020116145
1281213.2031932925129-1.20319329251285
1291111.4293830912187-0.429383091218697
13046.10612877200004-2.10612877200004
1311616.0743432204218-0.0743432204217874
1321512.62578577052492.37421422947515
1331011.0761743627835-1.07617436278346
1341313.4873970152744-0.487397015274428
1351513.26551913181241.73448086818763
1361210.39507678852871.60492321147130
1371413.63778687945580.362213120544224
138710.3648158549381-3.36481585493814
1391914.07482217403234.92517782596775
1401213.0450278327524-1.04502783275237
1411211.98222904243600.0177709575640404
1421313.5150636392988-0.515063639298784
1431512.44784099418932.55215900581071
14489.40102189128402-1.40102189128402
1451210.77022170952781.22977829047224
1461010.8018247307924-0.80182473079243
147811.1739712445785-3.17397124457850
1481014.7937263715450-4.79372637154504
1491513.86773934199991.13226065800013
1501614.51143769712601.48856230287396
1511313.1972777828502-0.197277782850192
1521615.22886155108110.77113844891889
15399.84022680652135-0.840226806521353
1541412.79357522105661.20642477894338
1551413.18392952792900.816070472070982
1561210.22181770317071.77818229682926


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.7898567546380460.4202864907239080.210143245361954
140.7942902572015090.4114194855969820.205709742798491
150.7202810796803480.5594378406393040.279718920319652
160.6523604345969260.6952791308061480.347639565403074
170.5596470212249780.8807059575500430.440352978775022
180.4616115289743370.9232230579486750.538388471025663
190.3668002944528090.7336005889056180.633199705547191
200.7874859103076980.4250281793846050.212514089692302
210.7466492526422180.5067014947155630.253350747357782
220.715504873072460.568990253855080.28449512692754
230.6495913161694570.7008173676610860.350408683830543
240.6776320019475840.6447359961048330.322367998052416
250.6120636709968890.7758726580062230.387936329003111
260.5424017602106330.9151964795787350.457598239789367
270.7794511569164080.4410976861671850.220548843083592
280.7229350643796290.5541298712407430.277064935620371
290.673630398785580.652739202428840.32636960121442
300.8204145699553320.3591708600893360.179585430044668
310.8636022889041690.2727954221916620.136397711095831
320.829536882497180.3409262350056390.170463117502820
330.7938871419278080.4122257161443840.206112858072192
340.7480112086196110.5039775827607780.251988791380389
350.7267026399417630.5465947201164740.273297360058237
360.7295595217307130.5408809565385740.270440478269287
370.6969631452702820.6060737094594360.303036854729718
380.7141915196329010.5716169607341980.285808480367099
390.6703875633683330.6592248732633350.329612436631667
400.6315972753847290.7368054492305420.368402724615271
410.5998466211228090.8003067577543820.400153378877191
420.8589058849516620.2821882300966760.141094115048338
430.9440001586580830.1119996826838330.0559998413419166
440.9491198464297440.1017603071405120.050880153570256
450.9338427767558440.1323144464883110.0661572232441556
460.9399472788790720.1201054422418570.0600527211209284
470.9347969007239560.1304061985520890.0652030992760443
480.920770403555790.1584591928884180.0792295964442091
490.9190128067438660.1619743865122680.0809871932561338
500.9059598217031260.1880803565937480.094040178296874
510.8948115087000930.2103769825998140.105188491299907
520.9781574702131610.04368505957367770.0218425297868389
530.9711648381510990.05767032369780280.0288351618489014
540.976673377976080.04665324404783940.0233266220239197
550.9785811898977020.0428376202045950.0214188101022975
560.9738781980005920.05224360399881540.0261218019994077
570.9658585222950670.06828295540986530.0341414777049327
580.9594751766150940.08104964676981110.0405248233849056
590.9722119773976130.05557604520477470.0277880226023874
600.9669889602787060.06602207944258780.0330110397212939
610.9664756164496840.06704876710063230.0335243835503162
620.9637195857009570.07256082859808680.0362804142990434
630.9751667111340090.04966657773198210.0248332888659910
640.979524992909630.04095001418074130.0204750070903706
650.9799913370157180.04001732596856430.0200086629842821
660.9780335338043740.04393293239125270.0219664661956263
670.9810279010737370.03794419785252530.0189720989262627
680.9846393529409020.03072129411819540.0153606470590977
690.983258741185670.03348251762865910.0167412588143296
700.9784648100384530.04307037992309320.0215351899615466
710.9784387556958410.04312248860831750.0215612443041588
720.9717362325257350.05652753494853010.0282637674742651
730.967229320697420.06554135860515940.0327706793025797
740.9831713469439960.03365730611200830.0168286530560041
750.9786314960716230.04273700785675470.0213685039283773
760.976356828459680.04728634308063950.0236431715403197
770.9693359646131150.06132807077376940.0306640353868847
780.9599077610062060.08018447798758810.0400922389937940
790.974872137223660.05025572555268060.0251278627763403
800.9735242855972280.05295142880554410.0264757144027721
810.9797943457412680.04041130851746460.0202056542587323
820.979387216776990.04122556644601890.0206127832230095
830.9726502437570050.05469951248598920.0273497562429946
840.9671765957549930.06564680849001420.0328234042450071
850.9897074137121950.02058517257561010.0102925862878050
860.986493814682750.02701237063449910.0135061853172496
870.9818999273584570.03620014528308590.0181000726415430
880.9757554052950730.04848918940985480.0242445947049274
890.9703204393328270.05935912133434670.0296795606671734
900.9616352920621850.07672941587563010.0383647079378151
910.953494781228670.09301043754265960.0465052187713298
920.9774566890846160.04508662183076810.0225433109153841
930.9699903255022870.06001934899542570.0300096744977128
940.9644198627730510.07116027445389750.0355801372269487
950.9537786927207020.09244261455859660.0462213072792983
960.9406497936862630.1187004126274730.0593502063137367
970.9277892354035930.1444215291928140.0722107645964068
980.9101136706320.1797726587360000.0898863293680002
990.9071066109921910.1857867780156180.0928933890078088
1000.8846070787330330.2307858425339340.115392921266967
1010.8606153615192670.2787692769614660.139384638480733
1020.8358715669629590.3282568660740830.164128433037041
1030.8757964797091980.2484070405816040.124203520290802
1040.9143595963501020.1712808072997960.0856404036498978
1050.9250435429538480.1499129140923040.074956457046152
1060.9094357696655790.1811284606688430.0905642303344213
1070.9058587229002440.1882825541995120.0941412770997558
1080.9101648604873420.1796702790253170.0898351395126584
1090.9088652677780540.1822694644438920.0911347322219461
1100.901221164039380.1975576719212410.0987788359606207
1110.8860252928460510.2279494143078970.113974707153949
1120.8999150570776140.2001698858447730.100084942922386
1130.8717775715931930.2564448568136150.128222428406807
1140.8410652168344690.3178695663310620.158934783165531
1150.8028144007972280.3943711984055450.197185599202772
1160.7922881920239450.4154236159521090.207711807976055
1170.801063213911620.3978735721767580.198936786088379
1180.792850862305770.414298275388460.20714913769423
1190.7457259070626480.5085481858747030.254274092937352
1200.8158713462780110.3682573074439780.184128653721989
1210.7834726047041890.4330547905916220.216527395295811
1220.739600669094390.5207986618112190.260399330905610
1230.7317012568237270.5365974863525470.268298743176273
1240.6771872465931970.6456255068136060.322812753406803
1250.6825765944906980.6348468110186050.317423405509303
1260.6522920413468990.6954159173062020.347707958653101
1270.5889594662349450.822081067530110.411040533765055
1280.5521664216091330.8956671567817330.447833578390867
1290.4990352412599930.9980704825199870.500964758740007
1300.4449438086425620.8898876172851230.555056191357438
1310.3749814216961040.7499628433922070.625018578303896
1320.3753661108333590.7507322216667170.624633889166641
1330.375471583932360.750943167864720.62452841606764
1340.3350051002977190.6700102005954380.664994899702281
1350.2998499717172930.5996999434345850.700150028282707
1360.3010401747229900.6020803494459790.69895982527701
1370.2265019924438770.4530039848877550.773498007556123
1380.3514909112215160.7029818224430320.648509088778484
1390.618000476480680.7639990470386410.381999523519320
1400.8133173246534130.3733653506931750.186682675346587
1410.7460326293487730.5079347413024540.253967370651227
1420.719534248872320.560931502255360.28046575112768
1430.6100577640657470.7798844718685070.389942235934253


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level220.16793893129771NOK
10% type I error level440.33587786259542NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/101s781293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/101s781293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/1v9se1293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/1v9se1293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/25i9z1293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/25i9z1293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/35i9z1293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/35i9z1293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/45i9z1293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/45i9z1293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/5g9q21293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/5g9q21293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/6g9q21293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/6g9q21293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/78ip51293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/78ip51293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/88ip51293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/88ip51293618948.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/98ip51293618948.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936189569ubsj5nieiiea4p/98ip51293618948.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by