Home » date » 2010 » Dec » 14 »

Multiple Linear Regression - Celebrity 2

*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: Tue, 14 Dec 2010 15:31:03 +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/14/t1292340549ba7r64phytrtzzk.htm/, Retrieved Tue, 14 Dec 2010 16:29:20 +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/14/t1292340549ba7r64phytrtzzk.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 «
6 2 1 73 62 66 4 1 1 58 54 54 5 1 1 68 41 82 4 1 1 62 49 61 4 1 1 65 49 65 6 1 1 81 72 77 6 1 1 73 78 66 4 2 1 64 58 66 4 1 1 68 58 66 6 1 1 51 23 48 4 1 1 68 39 57 6 1 1 61 63 80 5 1 1 69 46 60 4 1 1 73 58 70 6 2 1 61 39 85 3 2 1 62 44 59 5 1 1 63 49 72 6 1 1 69 57 70 4 2 1 47 76 74 6 2 1 66 63 70 2 1 1 58 18 51 7 2 1 63 40 70 5 1 1 69 59 71 2 2 1 59 62 72 4 1 1 59 70 50 4 2 1 63 65 69 6 2 1 65 56 73 6 1 1 65 45 66 5 2 1 71 57 73 6 1 1 60 50 58 6 2 1 81 40 78 4 1 1 67 58 83 6 2 1 66 49 76 6 1 1 62 49 77 6 1 1 63 27 79 2 2 1 73 51 71 4 2 1 55 75 79 5 1 1 59 65 60 3 1 1 64 47 73 7 2 1 63 49 70 5 1 1 64 65 42 3 1 1 73 61 74 8 1 1 54 46 68 8 1 1 76 69 83 5 2 1 74 55 62 6 2 1 63 78 79 3 2 1 73 58 61 5 2 1 67 34 86 4 2 1 68 67 64 5 1 1 66 45 75 5 2 1 62 68 59 6 2 1 71 49 82 5 1 1 63 19 61 6 1 1 75 72 69 6 1 1 77 59 60 4 2 1 62 46 59 8 1 1 74 56 81 6 2 1 67 45 65 4 2 1 56 53 60 6 2 1 60 67 60 5 2 1 58 73 45 5 1 1 65 46 75 6 2 1 49 70 84 6 1 1 61 38 77 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] = + 1.64525178041472 -0.44459465358534Gender[t] + 1.67653317331531Age[t] -0.000771955540575894NV[t] + 0.00519221184566125ANX[t] + 0.032351106163234GR[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.645251780414721.602231.02690.3062610.153131
Gender-0.444594653585340.235481-1.8880.0610910.030546
Age1.676533173315311.0024411.67250.0966690.048334
NV-0.0007719555405758940.01603-0.04820.961660.48083
ANX0.005192211845661250.0091820.56550.5726480.286324
GR0.0323511061632340.0122842.63350.00940.0047


Multiple Linear Regression - Regression Statistics
Multiple R0.287648778695546
R-squared0.082741819885039
Adjusted R-squared0.0499825991666475
F-TEST (value)2.52575665936359
F-TEST (DF numerator)5
F-TEST (DF denominator)140
p-value0.0319025204519411
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.35922235913879
Sum Squared Residuals258.647959021595


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
164.833333033301751.16666696669825
244.85975605127163-0.859756051271635
355.69036871444282-0.690368714442823
445.05716491302367-1.05716491302367
545.18425347105487-1.18425347105487
665.679536328814680.320463671185325
765.361003076417680.638996923582325
844.81951178578429-0.819511785784295
945.26101861720733-1.26101861720733
1064.510094535860771.48990546413923
1144.87120663667066-0.87120663667066
1265.745298851504940.254701148495056
1355.00383348253941-0.00383348253941515
1445.38656326415739-1.38656326415739
1565.337846644439900.662153355560095
1634.52190698788355-1.52190698788355
1755.41225512527866-0.412255125278662
1865.384458874474030.615541125525971
1945.18490369250186-1.18490369250186
2064.973333358584391.02666664141561
2124.57578310633813-2.57578310633813
2274.856228352755902.14377164724410
2355.42719440432859-0.427194404328585
2425.03824704784922-3.03824704784922
2544.8126550606087-0.812655060608705
2644.9536825427342-0.95368254273420
2765.034813149695030.965186850304966
2865.195835729835460.804164270164538
2955.03537362829724-0.0353736282972399
3064.966847717460781.03315228253922
3165.101142002331410.89885799766859
3245.81175937752288-1.81175937752288
3365.094749029724530.905250970275469
3465.574782611635410.425217388364591
3565.524484207816750.475515792183247
3624.93797423381565-2.93797423381565
3745.33529136714776-1.33529136714776
3855.11020506301274-0.110205063012738
3935.43344985221-2.43344985221000
4074.902958259366862.09704174063314
4154.524025374371650.475974625628353
4235.5315443243473-2.53154432434731
4385.274221664953932.72577833504607
4485.861926107959972.13807389204003
4554.666811170188620.333188829811384
4665.344692358360140.655307641639862
4734.65080865510294-1.65080865510294
4855.33960495813138-0.339604958131377
4944.79845165790647-0.798451657906474
5055.48622372976399-0.486223729763992
5154.646520072179420.353479927820579
5265.284995889001060.715004110998944
5354.900626602113250.0993733978867491
5465.425359212752260.574640787247742
5565.06515659220840.934843407791596
5644.53229141157487-0.532291411574873
5785.731269052721062.26873094727894
5864.717346059005741.28265394099426
5944.60561973390119-0.605619733901192
6064.675222877578151.32477712242185
6154.222653467284760.777346532715245
6255.49218789715023-0.492187897150229
6365.475717571979080.524282428020919
6465.518440236873710.48155976312629
6564.732496814994031.26750318500597
6664.368991969677551.63100803032245
6764.950539925075191.04946007492481
6864.886991823474071.11300817652594
6974.793976606104682.20602339389532
7045.12031214313619-1.12031214313619
7145.51034959741597-1.51034959741597
7234.78878439425902-1.78878439425902
7365.063013197660210.936986802339787
7455.2871363578773-0.287136357877297
7555.37527228587197-0.375272285871973
7635.08135366175576-2.08135366175576
7755.19799491501553-0.197994915015529
7844.23719480051803-0.237194800518033
7935.03369511816257-2.03369511816257
8075.502998200390241.49700179960976
8144.72120583670862-0.721205836708616
8245.18635786073823-1.18635786073823
8354.901760424277590.0982395757224112
8465.323561644353730.67643835564627
8525.23766470509593-3.23766470509593
8624.23242554254911-2.23242554254911
8765.864398656023360.135601343976637
8844.62998208655164-0.629982086551636
8955.17635738605881-0.176357386058815
9064.678160310055061.32183968994494
9175.446499144186881.55350085581312
9285.111271224720442.88872877527956
9364.867052652800661.13294734719934
9464.97518547263741.0248145273626
9534.94858413125008-1.94858413125008
9674.951988241967662.04801175803234
9735.36776128173263-2.36776128173263
9864.861340761044761.13865923895524
9944.78708087606426-0.787080876064256
10045.60740291590567-1.60740291590567
10165.304256904495430.695743095504568
10265.36839863821970.631601361780305
10366.11985382027483-0.119853820274826
10444.86284387343394-0.86284387343394
10576.88014617972520.119853820274797
10655.35351708033843-0.353517080338432
10775.626067373604961.37393262639504
10845.41702145757563-1.41702145757563
10965.025972637084860.974027362915136
11065.812028575629910.187971424370086
11164.627279345246051.37272065475395
11254.394431555168490.605568444831515
11355.30796000075665-0.307960000756652
11465.458238084409130.541761915590867
11575.161435029485581.83856497051442
11644.85431335762277-0.854313357622772
11745.38403299492534-1.38403299492534
11885.405307525413482.59469247458652
11965.210294333839980.789705666160016
12035.00516299101025-2.00516299101025
12145.22874438892895-1.22874438892895
12255.36150583385122-0.361505833851221
12355.0593648968957-0.0593648968957037
12465.084419401529920.915580598470081
12585.364036103083272.63596389691673
12624.84566853131909-2.84566853131909
12744.48055868766849-0.480558687668486
12875.42937567189681.57062432810320
12955.21114316726541-0.211143167265415
13065.386950138841240.613049861158757
13165.477940770084080.522059229915923
13245.44383135022937-1.44383135022937
13354.728579316122490.27142068387751
13465.064461514552680.935538485447317
13565.914565386460450.085434613539547
13665.367856875921320.632143124078684
13765.148932219306160.851067780693838
13855.4984212626435-0.498421262643496
13954.460509926001660.539490073998343
14065.102296113056750.897703886943246
14145.41507667500589-1.41507667500589
14265.216123902172710.783876097827294
14335.79386980103612-2.79386980103612
14465.305512460753360.694487539246641
14585.385573980334542.61442601966546
14645.26615603355628-1.26615603355628


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.1865014888941510.3730029777883020.813498511105849
100.3530604485735350.7061208971470710.646939551426465
110.5016156439785390.9967687120429220.498384356021461
120.4561417789866110.9122835579732220.543858221013389
130.3418483290312390.6836966580624780.658151670968761
140.3023751864542220.6047503729084450.697624813545778
150.2271412467766490.4542824935532980.772858753223351
160.2718421953906260.5436843907812510.728157804609374
170.1974083394568880.3948166789137760.802591660543112
180.1685208354658490.3370416709316980.831479164534151
190.1377180072015750.2754360144031490.862281992798425
200.1346371118608670.2692742237217350.865362888139133
210.2072845209286010.4145690418572030.792715479071399
220.3091241041053860.6182482082107720.690875895894614
230.2451636384562620.4903272769125230.754836361543738
240.5046083672119590.9907832655760820.495391632788041
250.441353830985510.882707661971020.55864616901449
260.3919630695537570.7839261391075140.608036930446243
270.3627863730247750.7255727460495510.637213626975225
280.3442861962095130.6885723924190260.655713803790487
290.2864904643822770.5729809287645540.713509535617723
300.3110095393420070.6220190786840140.688990460657993
310.2612235905477960.5224471810955920.738776409452204
320.2835945968732350.567189193746470.716405403126765
330.2517611111919650.503522222383930.748238888808035
340.2216626914032370.4433253828064740.778337308596763
350.1838559573822270.3677119147644540.816144042617773
360.3987136691084550.797427338216910.601286330891545
370.3698764213472160.7397528426944310.630123578652784
380.3252397877914290.6504795755828570.674760212208571
390.4198736083519520.8397472167039050.580126391648048
400.5112210427992630.9775579144014730.488778957200737
410.4783250667576570.9566501335153140.521674933242343
420.5794039400748470.8411921198503050.420596059925153
430.7579047897941270.4841904204117470.242095210205873
440.8273303186751260.3453393626497490.172669681324875
450.7935968447087810.4128063105824370.206403155291219
460.7664242677116380.4671514645767250.233575732288362
470.7766562246377520.4466875507244950.223343775362248
480.7394255278972130.5211489442055740.260574472102787
490.7064868141463120.5870263717073760.293513185853688
500.6647623771198840.6704752457602320.335237622880116
510.6245598326740220.7508803346519560.375440167325978
520.5877946344169280.8244107311661440.412205365583072
530.5378285663424720.9243428673150550.462171433657528
540.5009098339807850.998180332038430.499090166019215
550.4771953142965440.9543906285930870.522804685703456
560.4322502852107920.8645005704215840.567749714789208
570.5117266011567930.9765467976864140.488273398843207
580.5074740854389260.9850518291221470.492525914561074
590.4646968666456240.9293937332912480.535303133354376
600.4695743514497760.9391487028995530.530425648550224
610.441274656361640.882549312723280.55872534363836
620.3974521648875210.7949043297750420.602547835112479
630.3590149692753430.7180299385506860.640985030724657
640.3203235995796380.6406471991592760.679676400420362
650.3126576090863250.625315218172650.687342390913675
660.3290037676577470.6580075353154950.670996232342253
670.309789997636660.619579995273320.69021000236334
680.2995186753529390.5990373507058790.70048132464706
690.3685993990649760.7371987981299510.631400600935024
700.3557000906123700.7114001812247390.64429990938763
710.3633825632129120.7267651264258240.636617436787088
720.3928394375850470.7856788751700930.607160562414953
730.3688584141118890.7377168282237780.631141585888111
740.3253203192231080.6506406384462160.674679680776892
750.2855499745506750.5710999491013490.714450025449325
760.3356108430744520.6712216861489040.664389156925548
770.2928859485006540.5857718970013080.707114051499346
780.2536542219096350.5073084438192700.746345778090365
790.3000512856857750.6001025713715510.699948714314225
800.3062999587974640.6125999175949270.693700041202536
810.2757040631276110.5514081262552220.724295936872389
820.2650486897317320.5300973794634630.734951310268268
830.2262789555418110.4525579110836220.773721044458189
840.1986773684387610.3973547368775220.801322631561239
850.3855584632066890.7711169264133770.614441536793311
860.474670298040070.949340596080140.52532970195993
870.4257486140104250.8514972280208510.574251385989575
880.3942545685628710.7885091371257420.605745431437129
890.3484109049082430.6968218098164860.651589095091757
900.3403515664051150.680703132810230.659648433594885
910.3476538749704360.6953077499408730.652346125029564
920.5047652413496240.9904695173007520.495234758650376
930.487794677059810.975589354119620.51220532294019
940.4716419895623570.9432839791247130.528358010437643
950.5120969199747850.975806160050430.487903080025215
960.5722269251287580.8555461497424840.427773074871242
970.6735955276456240.6528089447087510.326404472354376
980.6486112324426920.7027775351146150.351388767557308
990.6301027163889750.739794567222050.369897283611025
1000.6535674632754490.6928650734491030.346432536724551
1010.6142306982421510.7715386035156980.385769301757849
1020.5713292422568510.8573415154862970.428670757743149
1030.5186739475267870.9626521049464260.481326052473213
1040.4939799915476110.9879599830952220.506020008452389
1050.4387252213997220.8774504427994450.561274778600278
1060.3886676364407740.7773352728815480.611332363559226
1070.3782819362574570.7565638725149140.621718063742543
1080.3874164970507820.7748329941015640.612583502949218
1090.3500619445681230.7001238891362450.649938055431877
1100.2982799555987290.5965599111974570.701720044401271
1110.2961761748020930.5923523496041850.703823825197907
1120.2604180985415720.5208361970831440.739581901458428
1130.2213862194460100.4427724388920190.77861378055399
1140.1949986238893160.3899972477786320.805001376110684
1150.2102011084680870.4204022169361740.789798891531913
1160.1995546554920340.3991093109840690.800445344507966
1170.2116768592419580.4233537184839160.788323140758042
1180.356550183829160.713100367658320.64344981617084
1190.3393543633384150.6787087266768290.660645636661585
1200.4184886959947140.8369773919894280.581511304005286
1210.4240743098167650.848148619633530.575925690183235
1220.3943126392915610.7886252785831220.605687360708439
1230.3558506417794460.7117012835588910.644149358220554
1240.2945134578428830.5890269156857650.705486542157117
1250.4152905241806610.8305810483613220.584709475819339
1260.6992356782619840.6015286434760330.300764321738016
1270.8373316129051110.3253367741897780.162668387094889
1280.8493601443051170.3012797113897660.150639855694883
1290.7867392242449820.4265215515100370.213260775755018
1300.7209999005587480.5580001988825030.279000099441252
1310.6466698517962460.7066602964075070.353330148203754
1320.8594423346868930.2811153306262140.140557665313107
1330.8829879338536740.2340241322926510.117012066146326
1340.8092268848810610.3815462302378780.190773115118939
1350.886474417303870.2270511653922600.113525582696130
1360.8500557791906630.2998884416186730.149944220809337
1370.7513036391789370.4973927216421250.248696360821063


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/1g5391292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/1g5391292340652.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/2qwkc1292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/2qwkc1292340652.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/3qwkc1292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/3qwkc1292340652.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/4qwkc1292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/4qwkc1292340652.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/51njx1292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/51njx1292340652.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/61njx1292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/61njx1292340652.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/7uwi01292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/7uwi01292340652.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/8uwi01292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/8uwi01292340652.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/9n6031292340652.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292340549ba7r64phytrtzzk/9n6031292340652.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