Home » date » 2010 » Dec » 01 »

multiple regression - model 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: Wed, 01 Dec 2010 16:37:19 +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/01/t1291223247yzvd40mevpd2vd2.htm/, Retrieved Wed, 01 Dec 2010 18:07:38 +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/01/t1291223247yzvd40mevpd2vd2.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 «
0 9 15 10 12 16 6 3 9 12 9 7 12 6 3 9 10 10 10 11 5 1 9 12 12 7 12 3 3 9 15 13 16 18 8 1 9 9 12 11 11 4 4 9 12 12 14 14 4 0 9 11 6 6 9 4 3 9 11 5 16 14 6 2 9 11 12 11 12 6 4 9 15 11 16 11 5 3 9 7 14 12 12 4 1 9 11 14 7 13 6 1 9 11 12 13 11 4 2 9 10 12 11 12 6 3 9 14 11 15 16 6 1 9 10 11 7 9 4 1 9 6 7 9 11 4 2 9 11 9 7 13 2 3 9 15 11 14 15 7 4 9 11 11 15 10 5 2 9 12 12 7 11 4 1 9 14 12 15 13 6 2 9 15 11 17 16 6 2 9 9 11 15 15 7 4 9 13 8 14 14 5 2 9 13 9 14 14 6 3 9 16 12 8 14 4 3 9 13 10 8 8 4 3 9 12 10 14 13 7 4 9 14 12 14 15 7 2 9 11 8 8 13 4 2 9 9 12 11 11 4 4 9 16 11 16 15 6 3 9 12 12 10 15 6 4 9 10 7 8 9 5 2 9 13 11 14 13 6 5 9 16 11 16 16 7 3 9 14 12 13 13 6 1 9 15 9 5 11 3 1 9 5 15 8 12 3 1 9 8 11 10 12 4 2 9 11 11 8 12 6 3 9 16 11 13 14 7 9 9 17 11 15 14 5 0 9 9 15 6 8 4 0 9 9 11 12 13 5 2 9 13 12 16 16 6 2 9 10 12 5 13 6 3 9 6 9 15 11 6 1 9 12 12 12 14 5 2 10 8 12 8 13 4 0 10 14 13 13 13 5 5 10 12 11 14 13 5 2 10 11 9 12 12 4 4 10 16 9 16 16 6 3 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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
aantalVrienden[t] = + 0.766368778596676 + 0.048718031746747maand[t] + 0.0991533235522943Popularity[t] -0.0609920300506682FindingFriends[t] + 0.128326230337218KnowingPeople[t] -0.076124742332118Liked[t] + 0.0313954332780401`Celebrity `[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.7663687785966762.4517660.31260.7550440.377522
maand0.0487180317467470.246460.19770.8435750.421788
Popularity0.09915332355229430.0549951.8030.0734440.036722
FindingFriends-0.06099203005066820.065252-0.93470.3514690.175734
KnowingPeople0.1283262303372180.0439922.9170.0040890.002045
Liked-0.0761247423321180.068512-1.11110.2683350.134168
`Celebrity `0.03139543327804010.1131380.27750.7817880.390894


Multiple Linear Regression - Regression Statistics
Multiple R0.402657535519121
R-squared0.162133090910332
Adjusted R-squared0.127934441559734
F-TEST (value)4.74092088398498
F-TEST (DF numerator)6
F-TEST (DF denominator)147
p-value0.000191518186576811
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.41891364789336
Sum Squared Residuals295.957443206173


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
102.59250210349606-2.59250210349606
232.018901980532260.981098019467736
332.189311303442740.810688696557262
411.74173959054614-0.74173959054614
532.833372316584810.166627683415192
612.06510471684829-1.06510471684829
742.519169151520471.48083084847953
802.13998187723503-2.13998187723503
933.16640336555337-0.166403365553368
1022.25007748817684-0.250077488176837
1143.394043273176850.60595672682315
1231.797015497647461.20298450235254
1311.53866376439451-0.538663764394512
1412.52006382462731-1.52006382462731
1522.15092416462454-0.150924164624543
1632.817335440904790.182664559095212
1711.86419463376661-0.864194633766614
1811.81595243577031-0.815952435770309
1921.718042181535690.281957818464308
2032.895682709730020.104317290269977
2142.945228490962571.05477150903743
2221.84925976615630.150740233843702
2312.98471763785047-1.98471763785047
2423.17314122513152-1.17314122513152
2522.42908899875347-0.429088998753474
2642.893686028553481.10631397144652
2722.86408943178085-0.864089431780848
2832.145825063706340.85417493629366
2932.42709760714350.5729023928565
3032.811464253788040.188535746211956
3142.735537356127061.26446264387294
3221.970151308479660.0298486915203416
3322.06510471684829-0.0651047168482865
3443.220093060678710.779906939321287
3531.992530354395561.00746964560444
3642.267884417584541.73211558241546
3722.81823011401163-0.81823011401163
3853.175363751624631.82463624837537
3932.728065177176040.271934822823962
4012.04164793301271-1.04164793301271
4110.9930164658652930.00698353413470687
4211.82249245067732-0.822492450677325
4321.926090827215850.073909172784148
4432.942634545277220.0573654547227828
4593.235649462947875.76435053705213
4601.46887170200655-1.46887170200655
4702.13356892584998-2.13356892584998
4822.78551631763904-0.785516317639044
4921.304842040269120.695157959730882
5032.526716624248360.473283375751640
5112.29391212412407-1.29391212412407
5221.477441249366850.52255875063315
5302.68439574559408-2.68439574559408
5452.736399388928042.26360061107196
5522.54730697385673-0.547306973856727
5643.314670410194680.685329589805322
5731.580045388871641.41995461112836
5803.10412240509203-3.10412240509203
5901.42301723486863-1.42301723486863
6043.283943804706910.71605619529309
6113.80584142343022-2.80584142343022
6213.01215863175102-2.01215863175102
6341.610438378006872.38956162199313
6422.74538777564474-0.745387775644745
6542.812100441272461.18789955872754
6611.95240181240126-0.952401812401262
6742.875936532475081.12406346752492
6821.090899369360620.909100630639377
6953.033859359584931.96614064041507
7042.646234452092451.35376554790755
7142.176142632031981.82385736796802
7242.669102679578661.33089732042134
7342.572134391582321.42786560841768
7432.835129022492630.164870977507368
7532.690540071158820.309459928841176
7632.791049248742830.208950751257171
7721.99623644834850.00376355165150205
7811.11194075969598-0.111940759695981
7911.32608643780946-0.326086437809456
8053.218860131558911.78113986844109
8142.60940101197711.3905989880229
8222.29023082319459-0.290230823194586
8331.632958485170751.36704151482925
8422.46528304376243-0.465283043762429
8521.865960829966170.134039170033834
8622.44313933345483-0.443139333454826
8723.07494949830710-1.07494949830710
8831.941190899191441.05880910080856
8922.22442232096545-0.224422320965446
9032.288912460100040.71108753989996
9143.163089753320710.836910246679286
9233.38289928358807-0.382899283588070
9332.427545440248510.572454559751493
9401.82799738113567-1.82799738113567
9511.3318873448274-0.331887344827399
9621.485101782697280.514898217302723
9722.66797267086352-0.667972670863517
9832.420977424696060.579022575303945
9943.35240801370860.6475919862914
10043.110888265315610.889111734684386
10112.78748035850973-1.78748035850973
10221.480511155835380.519488844164624
10320.8550904543504111.14490954564959
10432.165229127420190.83477087257981
10532.052161890754090.947838109245906
10633.00496908153973-0.00496908153973336
10711.74855759453246-0.748557594532464
10811.75847814529317-0.758478145293173
10912.36546089241986-1.36546089241986
11013.11049257597335-2.11049257597335
11101.70936585624260-1.70936585624260
11212.62453372425855-1.62453372425855
11332.550631508419550.449368491580452
11433.08828337408314-0.088283374083142
11503.02729134403247-3.02729134403247
11621.609317859583460.390682140416541
11752.95731092726512.04268907273490
11822.72278288441227-0.722782884412273
11932.38735946492490.612640535075101
12033.26748323903918-0.267483239039185
12151.742884252086853.25711574791315
12242.797165573662141.20283442633786
12343.155617574369690.844382425630308
12401.57267277384751-1.57267277384751
12532.937832725924320.0621672740756817
12602.83512902249263-2.83512902249263
12722.23079249184676-0.230792491846763
12801.75326629567497-1.75326629567497
12962.937832725924323.06216727407568
13032.808602332188530.19139766781147
13111.44737366947508-0.447373669475085
13262.207735909981153.79226409001885
13322.79981179014296-0.799811790142962
13412.00238077391325-1.00238077391325
13533.01830295731577-0.0183029573157713
13612.06464838655472-1.06464838655472
13723.37695280269446-1.37695280269446
13842.721266676646591.27873332335341
13912.96165641632444-1.96165641632444
14022.72983137337559-0.729831373375591
14102.71309766925986-2.71309766925986
14252.388950966467452.61104903353255
14322.13070700425046-0.130707004250463
14411.16424181162798-0.164241811627979
14511.43271194031277-0.432711940312772
14642.301596800571801.69840319942820
14733.24578251120528-0.245782511205283
14802.757305007582-2.757305007582
14932.641691118361980.358308881638018
15033.03476352298350-0.0347635229834959
15101.84203757563915-1.84203757563915
15222.61819155402267-0.618191554022668
15353.042226211642791.95777378835721
15422.18110965575015-0.181109655750151


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.8638776565532830.2722446868934350.136122343446717
110.7964780963816420.4070438072367150.203521903618358
120.6902942753205770.6194114493588460.309705724679423
130.5805403859113470.8389192281773050.419459614088653
140.6299260301317430.7401479397365150.370073969868257
150.5321390558599010.9357218882801980.467860944140099
160.435541390513570.871082781027140.56445860948643
170.3455950106389540.6911900212779080.654404989361046
180.2708996975011950.5417993950023890.729100302498805
190.2588208239637660.5176416479275320.741179176036234
200.1957883788133960.3915767576267920.804211621186604
210.162456389474960.324912778949920.83754361052504
220.1266026630383690.2532053260767380.873397336961631
230.1907593560806090.3815187121612180.809240643919391
240.1698209473836550.3396418947673090.830179052616346
250.1340173723350320.2680347446700640.865982627664968
260.1438590003872190.2877180007744390.85614099961278
270.1129270670011290.2258541340022580.88707293299887
280.1087855909886130.2175711819772250.891214409011387
290.09240962854460960.1848192570892190.90759037145539
300.07049416045359750.1409883209071950.929505839546402
310.07315640447688050.1463128089537610.92684359552312
320.05446324678988230.1089264935797650.945536753210118
330.03853775591041950.0770755118208390.96146224408958
340.02990603936661530.05981207873323060.970093960633385
350.02662948794678790.05325897589357570.973370512053212
360.04275635414516140.08551270829032270.957243645854839
370.03498397789586870.06996795579173740.965016022104131
380.04500048629809370.09000097259618730.954999513701906
390.03250523873927960.06501047747855920.96749476126072
400.02713640564379660.05427281128759330.972863594356203
410.01904108603062500.03808217206125010.980958913969375
420.01482094755751670.02964189511503340.985179052442483
430.01016060674348090.02032121348696190.98983939325652
440.006842770411512510.01368554082302500.993157229588488
450.3664063629706810.7328127259413620.633593637029319
460.3476250689175050.695250137835010.652374931082495
470.3834986025402410.7669972050804820.616501397459759
480.3566000044223290.7132000088446580.643399995577671
490.3449712888610020.6899425777220050.655028711138998
500.3200827986963860.6401655973927710.679917201303614
510.3030747538088990.6061495076177980.696925246191101
520.2596467757098270.5192935514196540.740353224290173
530.3827934108370670.7655868216741350.617206589162933
540.4807338777705760.9614677555411520.519266122229424
550.4373395310040320.8746790620080640.562660468995968
560.3964754095083850.792950819016770.603524590491615
570.3981126012975920.7962252025951830.601887398702408
580.5668566963244760.8662866073510480.433143303675524
590.5506833578693350.8986332842613310.449316642130665
600.5177743256091380.9644513487817230.482225674390862
610.6289853543696160.7420292912607690.371014645630384
620.6475862136135290.7048275727729420.352413786386471
630.7689144500564160.4621710998871670.231085549943584
640.7360151810070750.527969637985850.263984818992925
650.7394783669053620.5210432661892770.260521633094638
660.710288592354210.5794228152915790.289711407645790
670.703076698757610.593846602484780.29692330124239
680.6863860667741330.6272278664517330.313613933225866
690.724629385445340.5507412291093190.275370614554659
700.71977939859790.5604412028041990.280220601402099
710.7411641415462440.5176717169075120.258835858453756
720.7343736595028540.5312526809942920.265626340497146
730.7310086368421130.5379827263157750.268991363157887
740.6900668579167230.6198662841665540.309933142083277
750.6474861446590.7050277106820.352513855341
760.6045693544307210.7908612911385580.395430645569279
770.5594723002854790.8810553994290430.440527699714521
780.5132579566902620.9734840866194760.486742043309738
790.4696173508263380.9392347016526770.530382649173662
800.5108431534762860.9783136930474270.489156846523714
810.5080700693900290.9838598612199420.491929930609971
820.4631494138334570.9262988276669140.536850586166543
830.461305693702320.922611387404640.53869430629768
840.4239680094621620.8479360189243240.576031990537838
850.3774029635409730.7548059270819470.622597036459027
860.3442258952231470.6884517904462930.655774104776853
870.3245607940526010.6491215881052020.675439205947399
880.3047770265612210.6095540531224420.695222973438779
890.2659566624299880.5319133248599750.734043337570012
900.2335834070392580.4671668140785150.766416592960742
910.2094848760679570.4189697521359140.790515123932043
920.1789469054208610.3578938108417210.82105309457914
930.1538391377264590.3076782754529170.846160862273541
940.1769989758180130.3539979516360260.823001024181987
950.1475310937476410.2950621874952820.85246890625236
960.1220847649060540.2441695298121080.877915235093946
970.1038102917651840.2076205835303680.896189708234816
980.08559000343510030.1711800068702010.9144099965649
990.07332538003756250.1466507600751250.926674619962437
1000.06392762446143590.1278552489228720.936072375538564
1010.07813956489861590.1562791297972320.921860435101384
1020.07036688017634070.1407337603526810.929633119823659
1030.0655125874912550.131025174982510.934487412508745
1040.05401656559422510.1080331311884500.945983434405775
1050.05023357714684720.1004671542936940.949766422853153
1060.03837731753907410.07675463507814820.961622682460926
1070.03063702185634220.06127404371268430.969362978143658
1080.02496329634745090.04992659269490180.97503670365255
1090.02205050363336210.04410100726672420.977949496366638
1100.02885426487858740.05770852975717470.971145735121413
1110.03136979616872180.06273959233744360.968630203831278
1120.0333252484727740.0666504969455480.966674751527226
1130.02509753639079240.05019507278158480.974902463609208
1140.01843881541223380.03687763082446760.981561184587766
1150.04371740851914950.0874348170382990.95628259148085
1160.03296036374573040.06592072749146090.96703963625427
1170.03925213212652680.07850426425305370.960747867873473
1180.02972644190423380.05945288380846750.970273558095766
1190.02352475152132490.04704950304264980.976475248478675
1200.01669263781746240.03338527563492470.983307362182538
1210.0624068053902720.1248136107805440.937593194609728
1220.05184913692717310.1036982738543460.948150863072827
1230.04225693086958310.08451386173916630.957743069130417
1240.03793398759826330.07586797519652650.962066012401737
1250.02711436155000800.05422872310001610.972885638449992
1260.07632724550376490.1526544910075300.923672754496235
1270.06201954390288110.1240390878057620.937980456097119
1280.08681371802920530.1736274360584110.913186281970795
1290.1928331914471990.3856663828943980.8071668085528
1300.1509531515027910.3019063030055810.84904684849721
1310.1217863614741640.2435727229483280.878213638525836
1320.5948326205853290.8103347588293430.405167379414671
1330.5212879363651760.9574241272696490.478712063634824
1340.4451298865158270.8902597730316550.554870113484173
1350.3643537180473310.7287074360946610.63564628195267
1360.3895361689730820.7790723379461630.610463831026918
1370.3137134513735480.6274269027470960.686286548626452
1380.3644801430780960.7289602861561920.635519856921904
1390.496490543603130.992981087206260.50350945639687
1400.4295231932444930.8590463864889850.570476806755507
1410.5014188430338810.9971623139322390.498581156966119
1420.3916305003876870.7832610007753740.608369499612313
1430.2668675710307820.5337351420615630.733132428969218
1440.2922326967238760.5844653934477520.707767303276124


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


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/1hl6u1291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/1hl6u1291221426.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/29u6f1291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/29u6f1291221426.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/39u6f1291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/39u6f1291221426.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/49u6f1291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/49u6f1291221426.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/59u6f1291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/59u6f1291221426.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/62l5i1291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/62l5i1291221426.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/7vv431291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/7vv431291221426.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/8vv431291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/8vv431291221426.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/96ml61291221426.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291223247yzvd40mevpd2vd2/96ml61291221426.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