Home » date » 2010 » Nov » 22 »

WS7 Celebrity aanpassing

*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 11: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/Nov/22/t1290425886ytaqo2nonoousup.htm/, Retrieved Mon, 22 Nov 2010 12:38:36 +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/t1290425886ytaqo2nonoousup.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 14 13 3 12 8 13 5 15 12 16 6 12 7 12 6 10 10 11 5 12 7 12 3 15 16 18 8 9 11 11 4 12 14 14 4 11 6 9 4 11 16 14 6 11 11 12 6 15 16 11 5 7 12 12 4 11 7 13 6 11 13 11 4 10 11 12 6 14 15 16 6 10 7 9 4 6 9 11 4 11 7 13 2 15 14 15 7 11 15 10 5 12 7 11 4 14 15 13 6 15 17 16 6 9 15 15 7 13 14 14 5 13 14 14 6 16 8 14 4 13 8 8 4 12 14 13 7 14 14 15 7 11 8 13 4 9 11 11 4 16 16 15 6 12 10 15 6 10 8 9 5 13 14 13 6 16 16 16 7 14 13 13 6 15 5 11 3 5 8 12 3 8 10 12 4 11 8 12 6 16 13 14 7 17 15 14 5 9 6 8 4 9 12 13 5 13 16 16 6 10 5 13 6 6 15 11 6 12 12 14 5 8 8 13 4 14 13 13 5 12 14 13 5 11 12 12 4 16 16 16 6 8 10 15 2 15 15 15 8 7 8 12 3 16 16 14 6 14 19 12 6 16 14 15 6 9 6 12 5 14 13 13 5 11 15 12 6 13 7 12 5 15 13 13 6 5 4 5 2 15 14 13 5 13 13 13 5 11 11 14 5 11 14 17 6 12 12 13 6 12 15 13 6 12 14 12 5 12 13 13 5 14 8 14 4 6 6 11 2 7 7 12 4 14 13 12 6 14 13 16 6 10 11 12 5 13 5 12 3 12 12 12 6 9 8 10 4 12 11 15 5 16 14 15 8 10 9 12 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
Celebrity[t] = + 0.228869730297837 + 0.152948770159782Popularity[t] + 0.104099951420784KnowingPeople[t] + 0.146565226481132Liked[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.2288697302978370.5179490.44190.6592070.329603
Popularity0.1529487701597820.0381344.01099.5e-054.7e-05
KnowingPeople0.1040999514207840.0307093.38980.0008910.000446
Liked0.1465652264811320.0481743.04240.0027660.001383


Multiple Linear Regression - Regression Statistics
Multiple R0.677006667554951
R-squared0.45833802791386
Adjusted R-squared0.447647331096371
F-TEST (value)42.8726055689874
F-TEST (DF numerator)3
F-TEST (DF denominator)152
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.04086140973719
Sum Squared Residuals164.675656090573


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
135.57995100652068-2.57995100652068
254.80240252783620.197597472163795
366.11734432344208-0.117344323442084
464.551737349934291.44826265006571
554.411574437395950.588425562604054
634.55173734993429-1.55173734993429
786.826874582087481.17312541791252
844.36272561865695-0.362725618656947
945.57356746284204-1.57356746284204
1043.854992948910330.145007051089670
1165.628818595523830.371181404476174
1264.815188385457641.18481161454236
1355.80091799671956-0.80091799671956
1444.3074932562393-0.307493256239298
1564.545353806255641.45464619374436
1644.87682306181808-0.87682306181808
1764.662239615297861.33776038470214
1866.27669540754465-0.276695407544653
1943.806144130171330.193855869828669
2043.695679405336030.304320594663967
2124.54535380625564-2.54535380625564
2276.178978999802520.82102100019748
2354.938457738178520.0615422618214848
2444.40517212345316-0.405172123453159
2565.836999728101260.163000271898742
2666.637844080546-0.637844080546003
2775.365386330264611.63461366973539
2855.72651623300182-0.726516233001823
2965.726516233001820.273483766998176
3045.56076283495647-1.56076283495647
3144.22252516559033-0.22252516559033
3275.427002236360911.57299776363909
3376.026030229642740.973969770357262
3444.64945375767642-0.649453757676424
3544.36272561865695-0.362725618656947
3666.54012767280387-0.54012767280387
3765.303732883640040.696267116359962
3853.910244081592111.08975591840789
3965.579951006520690.420048993479308
4076.6866928992850.313307100714998
4165.628799825259690.37120017474031
4234.65581853109094-1.65581853109094
4333.5851959102366-0.585195910236598
4444.25224212355751-0.252242123557513
4564.502888531195291.49711146880471
4676.081262592060390.918737407939613
4756.44241126506174-1.44241126506174
4843.402530182109630.597469817890367
4954.75995602304000.240043976960005
5066.22784658880565-0.227846588805655
5164.184205133254291.81579486674571
5264.320279113860741.67972088613926
5355.36536756000047-0.365367560000474
5444.19060744719708-0.190607447197077
5555.62879982525969-0.62879982525969
5655.42700223636091-0.427002236360909
5744.91928833687843-0.919288336878428
5866.686692899285-0.686692899285002
5924.69193780300091-2.69193780300091
6086.28307895122331.71692104877670
6133.89109345055616-0.891093450556163
6266.39356244632274-0.393562446322738
6366.10683430730326-0.106834307303261
6466.3319277699623-0.331927769962302
6553.988791088034161.01120891196584
6655.62879982525969-0.62879982525969
6765.231588191140780.768411808859221
6854.704686120094070.295313879905927
6965.781748595419470.218251404580527
7022.14283951918554-0.142839519185540
7155.88584854684026-0.885848546840256
7255.47585105509991-0.475851055099908
7355.10831883841991-0.108318838419907
7465.860314372125650.139685627874346
7565.218802333519340.781197666480658
7665.531102187781690.468897812218307
7755.28043700987978-0.280437009879777
7855.32290228494013-0.322902284940125
7945.2548652946369-1.25486529463690
8023.38337955107368-1.38337955107368
8143.786993499135380.213006500864621
8265.482234598778560.517765401221442
8366.06849550470309-0.0684955047030857
8454.662239615297860.337760384702139
8534.49648621725251-1.49648621725251
8665.072237107038210.92776289296179
8743.903860537913460.096139462086536
8855.40783283506082-0.407832835060822
8986.33192776996231.66807223003770
9044.45403971245629-0.454039712456294
9165.756195650440730.243804349559266
9265.310135197582820.689864802417176
9376.6866928992850.313307100714998
9466.09404844968182-0.094048449681824
9554.968137155617430.0318628443825739
9644.20337453455438-0.203374534554378
9763.774207641513942.22579235848606
9833.6468118163329-0.646811816332898
9955.56718391916339-0.567183919163391
10065.267651152258340.73234884774166
10176.790792850705790.209207149294215
10276.436027721383090.563972278616914
10366.77802576334848-0.778025763348484
10434.33715390341407-1.33715390341407
10522.72271688143142-0.722716881431417
10685.756195650440732.24380434955927
10734.65585607161921-1.65585607161921
10886.130130181063521.86986981893648
10934.54537257651978-1.54537257651978
11044.58783785158012-0.587837851580125
11155.21241878984069-0.212418789840691
11275.531102187781691.46889781221831
11364.545353806255641.45464619374436
11465.921930278221950.0780697217780461
11576.117344323442080.882655676557916
11666.18536254348117-0.185362543481170
11766.18536254348117-0.185362543481170
11865.089149437119820.91085056288018
11965.983564954582390.0164350454176105
12045.37813464735777-1.37813464735777
12145.21880233351934-1.21880233351934
12255.79453445304091-0.79453445304091
12344.14814217213673-0.148142172136729
12465.830616184422610.169383815577393
12566.28946249490195-0.289462494901954
12654.740767851475770.259232148524229
12786.478492996443431.52150700355657
12865.531102187781690.468897812218307
12955.00421888699912-0.00421888699912362
13042.051525425386191.94847457461381
13186.478492996443431.52150700355657
13265.677648643998690.322351356001311
13344.93620066696004-0.936200666960037
13465.56078160522060.439218394779396
13565.92831382190060.0716861780993956
13644.90650247925699-0.90650247925699
13765.983564954582390.0164350454176105
13834.41159320766008-1.41159320766008
13966.89487403186243-0.894874031862433
14055.57356746284204-0.573567462842041
14145.63520213920248-1.63520213920248
14265.726516233001820.273483766998176
14346.32554422628365-2.32554422628365
14443.372850764670720.627149235329278
14545.01060243067777-1.01060243067777
14664.080105181833511.91989481816649
14754.337172673678210.662827326321791
14865.518335100424390.481664899575608
14966.24061367616296-0.240613676162956
15086.123727867120731.87627213287926
15175.371751103679121.62824889632088
15276.582592947864220.417407052135782
15344.30109094229651-0.301090942296511
15465.817830326801170.18216967319883
15565.586334550199340.413665449800658
15625.26126760857969-3.26126760857969


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.8221137404802690.3557725190394620.177886259519731
80.7876969304940680.4246061390118640.212303069505932
90.796973039787850.40605392042430.20302696021215
100.8448140932469480.3103718135061040.155185906753052
110.8212516565789760.3574966868420480.178748343421024
120.8525676418121290.2948647163757420.147432358187871
130.8824584438334060.2350831123331870.117541556166594
140.8403965041719150.3192069916561690.159603495828085
150.8242417141577150.3515165716845700.175758285842285
160.7706842694072450.4586314611855100.229315730592755
170.7954316992255570.4091366015488860.204568300774443
180.7368446288720180.5263107422559630.263155371127982
190.6721784361735320.6556431276529360.327821563826468
200.6066951972655790.7866096054688430.393304802734421
210.915701752562440.1685964948751200.0842982474375602
220.9114210691146240.1771578617707510.0885789308853757
230.8881560564264520.2236878871470950.111843943573548
240.8562573785713090.2874852428573830.143742621428691
250.8222783049557570.3554433900884870.177721695044243
260.7870121991613940.4259756016772130.212987800838606
270.8108518132661090.3782963734677820.189148186733891
280.7821745216313780.4356509567372450.217825478368622
290.7394207239644480.5211585520711030.260579276035552
300.7516868231284820.4966263537430350.248313176871518
310.7156072281141190.5687855437717620.284392771885881
320.7734952706740630.4530094586518740.226504729325937
330.7698893291419310.4602213417161380.230110670858069
340.7433563575380040.5132872849239920.256643642461996
350.7057471083721620.5885057832556760.294252891627838
360.661174617926960.677650764146080.33882538207304
370.6257571407125440.7484857185749120.374242859287456
380.6402198569603940.7195602860792120.359780143039606
390.5986828967650330.8026342064699340.401317103234967
400.5547857190861810.8904285618276380.445214280913819
410.5132010081231320.9735979837537350.486798991876868
420.5441722839482940.9116554321034110.455827716051706
430.545316496839820.909367006320360.45468350316018
440.5014425321071380.9971149357857240.498557467892862
450.5635192659201590.8729614681596820.436480734079841
460.5633296137153860.8733407725692290.436670386284614
470.5920840114950370.8158319770099270.407915988504963
480.5614468840416350.8771062319167290.438553115958365
490.5135177035294270.9729645929411450.486482296470573
500.468267970331780.936535940663560.53173202966822
510.5490353784297320.9019292431405350.450964621570268
520.6044720842469550.791055831506090.395527915753045
530.5646484153401490.8707031693197020.435351584659851
540.5286046457345260.9427907085309480.471395354265474
550.4941428395916740.9882856791833480.505857160408326
560.4539972198761390.9079944397522790.546002780123861
570.4460584876827760.8921169753655510.553941512317224
580.4131173933512790.8262347867025590.586882606648721
590.7090564358943350.5818871282113310.290943564105665
600.7811549339559870.4376901320880250.218845066044013
610.7728713815784420.4542572368431150.227128618421558
620.7401144311962940.5197711376074130.259885568803706
630.7009237858936190.5981524282127620.299076214106381
640.6625511466811840.6748977066376330.337448853318816
650.6584079613947590.6831840772104820.341592038605241
660.6292795683713070.7414408632573860.370720431628693
670.6090652934527360.7818694130945280.390934706547264
680.5690838768512030.8618322462975950.430916123148797
690.525978221300060.948043557399880.47402177869994
700.4821231685265740.9642463370531470.517876831473426
710.4684125536199720.9368251072399430.531587446380028
720.4312762196652970.8625524393305930.568723780334703
730.3861741032788980.7723482065577960.613825896721102
740.3451284426344270.6902568852688530.654871557365573
750.3267658970784240.6535317941568490.673234102921576
760.2950344336436580.5900688672873150.704965566356343
770.2585518346562220.5171036693124430.741448165343778
780.2252358331965720.4504716663931440.774764166803428
790.2469271877190250.493854375438050.753072812280975
800.2774576925468650.5549153850937290.722542307453135
810.2416443968028270.4832887936056540.758355603197173
820.2146893253967570.4293786507935150.785310674603243
830.1823883488471100.3647766976942190.81761165115289
840.1563143353082820.3126286706165640.843685664691718
850.2137258502685480.4274517005370970.786274149731451
860.2058263710429550.4116527420859100.794173628957045
870.1742363315878950.3484726631757890.825763668412105
880.1493352013703960.2986704027407910.850664798629604
890.1944989856379800.3889979712759600.80550101436202
900.1704122468006220.3408244936012440.829587753199378
910.1450640606490000.2901281212980010.854935939351
920.1387573438059960.2775146876119910.861242656194004
930.1169654488910130.2339308977820270.883034551108987
940.09545934240420260.1909186848084050.904540657595797
950.07704131205902420.1540826241180480.922958687940976
960.0631249398554770.1262498797109540.936875060144523
970.1240197972800390.2480395945600780.875980202719961
980.1117496437018360.2234992874036720.888250356298164
990.09481762645912750.1896352529182550.905182373540872
1000.08286973051357040.1657394610271410.91713026948643
1010.0671841108672240.1343682217344480.932815889132776
1020.05632755699366390.1126551139873280.943672443006336
1030.04769623602098020.09539247204196040.95230376397902
1040.06874374868675940.1374874973735190.93125625131324
1050.06267402537851190.1253480507570240.937325974621488
1060.1226491367776560.2452982735553120.877350863222344
1070.1532709627057690.3065419254115370.846729037294231
1080.2490834248214040.4981668496428070.750916575178596
1090.2799401559556150.5598803119112290.720059844044385
1100.2475378999739660.4950757999479320.752462100026034
1110.2094293748421920.4188587496843840.790570625157808
1120.2751926204520290.5503852409040580.724807379547971
1130.2817405365342060.5634810730684110.718259463465794
1140.2399393527321130.4798787054642250.760060647267887
1150.22644881951630.45289763903260.7735511804837
1160.1895289799822800.3790579599645590.81047102001772
1170.1564420470824850.312884094164970.843557952917515
1180.1458203250246060.2916406500492110.854179674975394
1190.1185349278834350.2370698557668690.881465072116565
1200.1561007013234390.3122014026468780.84389929867656
1210.1660420001711090.3320840003422170.833957999828891
1220.1493922130484370.2987844260968740.850607786951563
1230.1191554447450060.2383108894900120.880844555254994
1240.0968772126074620.1937544252149240.903122787392538
1250.07648060189610120.1529612037922020.923519398103899
1260.05957015767307770.1191403153461550.940429842326922
1270.08286495975812890.1657299195162580.917135040241871
1280.0731521736488540.1463043472977080.926847826351146
1290.05416443062094180.1083288612418840.945835569379058
1300.0628624478447040.1257248956894080.937137552155296
1310.09083891193310970.1816778238662190.90916108806689
1320.06755593593083510.1351118718616700.932444064069165
1330.05896605979173830.1179321195834770.941033940208262
1340.04438749362882990.08877498725765980.95561250637117
1350.0307295241418230.0614590482836460.969270475858177
1360.03222235848909820.06444471697819630.967777641510902
1370.02288138423272180.04576276846544350.977118615767278
1380.01911941512507580.03823883025015150.980880584874924
1390.01591231828666240.03182463657332480.984087681713338
1400.009942432893280270.01988486578656050.99005756710672
1410.009399832305682450.01879966461136490.990600167694317
1420.005794678513418870.01158935702683770.994205321486581
1430.02116628388285770.04233256776571540.978833716117142
1440.01439392587000690.02878785174001370.985606074129993
1450.01585702710195890.03171405420391770.98414297289804
1460.01533420277393720.03066840554787440.984665797226063
1470.01389218381796490.02778436763592970.986107816182035
1480.0565764686022170.1131529372044340.943423531397783
1490.02654758661214630.05309517322429260.973452413387854


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


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290425886ytaqo2nonoousup/148js1290425749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290425886ytaqo2nonoousup/148js1290425749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290425886ytaqo2nonoousup/248js1290425749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290425886ytaqo2nonoousup/248js1290425749.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290425886ytaqo2nonoousup/5x0id1290425749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290425886ytaqo2nonoousup/5x0id1290425749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290425886ytaqo2nonoousup/6qrhg1290425749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290425886ytaqo2nonoousup/6qrhg1290425749.ps (open in new window)


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


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


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


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