Home » date » 2010 » Dec » 03 »

*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: Fri, 03 Dec 2010 10:07: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/03/t12913709328g35fe7584jimu8.htm/, Retrieved Fri, 03 Dec 2010 11:09:04 +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/03/t12913709328g35fe7584jimu8.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 «
1 13 13 14 14 13 3 3 25 25 55 55 147 147 0 12 0 8 0 13 5 0 158 0 7 0 71 0 1 10 10 12 12 16 6 6 0 0 0 1 9 9 7 7 12 6 6 143 143 10 10 0 1 10 10 10 10 11 5 5 67 67 74 74 43 43 1 12 12 7 7 12 3 3 0 0 0 1 13 13 16 16 18 8 8 148 148 138 138 8 8 1 12 12 11 11 11 4 4 28 28 0 0 1 12 12 14 14 14 4 4 114 114 113 113 34 34 0 6 0 6 0 9 4 0 0 0 0 0 5 0 16 0 14 6 0 123 0 115 0 103 0 0 12 0 11 0 12 6 0 145 0 9 0 0 1 11 11 16 16 11 5 5 113 113 114 114 73 73 0 14 0 12 0 12 4 0 152 0 59 0 159 0 0 14 0 7 0 13 6 0 0 0 0 0 12 0 13 0 11 4 0 36 0 114 0 113 0 1 12 12 11 11 12 6 6 0 0 0 1 11 11 15 15 16 6 6 8 8 102 102 44 44 0 11 0 7 0 9 4 0 108 0 0 0 0 7 0 9 0 11 4 0 112 0 86 0 0 0 9 0 7 0 13 2 0 51 0 17 0 41 0 1 11 11 14 14 15 7 7 43 43 45 45 74 74 0 11 0 15 0 10 5 0 120 0 123 0 0 0 12 0 7 0 11 4 0 13 0 24 0 0 0 12 0 15 0 13 6 0 55 0 5 0 0 0 11 0 17 0 16 6 0 103 0 123 0 32 0 0 11 0 15 0 15 7 0 127 0 136 0 126 0 1 8 8 14 14 14 5 5 14 14 4 4 154 154 0 9 0 14 0 14 6 0 135 0 76 0 129 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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
Liked[t] = + 10.9076439084437 -0.0539084263550218gender[t] + 0.0942832024265008FindingFriends[t] -0.239150405757677FF_G[t] + 0.306793741609170KnowingPeople[t] + 0.0479727705095403KP_G[t] + 0.434063277964381Celebrity[t] + 0.175313638246559C_G[t] -0.162231908269386FBF[t] + 0.140103616364116FBF_G[t] -0.0138083217008717SBF[t] + 0.0259449406246356SBF_G[t] + 0.0539522434431308TBF[t] -0.171883276901893`TBF_G `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)10.90764390844375.7145971.90870.0583140.029157
gender-0.05390842635502180.068714-0.78450.4340310.217016
FindingFriends0.09428320242650080.0650611.44910.1495010.074751
FF_G-0.2391504057576770.068283-3.50240.0006170.000308
KnowingPeople0.3067937416091700.0653694.69336e-063e-06
KP_G0.04797277050954030.0700320.6850.4944560.247228
Celebrity0.4340632779643810.0634866.837100
C_G0.1753136382465590.0750682.33540.0209240.010462
FBF-0.1622319082693860.074656-2.17310.0314340.015717
FBF_G0.1401036163641160.0847421.65330.1004790.050239
SBF-0.01380832170087170.071324-0.19360.8467650.423383
SBF_G0.02594494062463560.0846460.30650.7596660.379833
TBF0.05395224344313080.0739480.72960.4668350.233418
`TBF_G `-0.1718832769018930.072502-2.37080.0190950.009548


Multiple Linear Regression - Regression Statistics
Multiple R0.72593515474096
R-squared0.526981848888782
Adjusted R-squared0.483677370265924
F-TEST (value)12.1692228066826
F-TEST (DF numerator)13
F-TEST (DF denominator)142
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation30.5403940626352
Sum Squared Residuals132445.625069148


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
113-1.4562314181849314.4562314181849
213-5.2349818137499218.2349818137499
31616.2830887309628-0.283088730962812
414371.717258343200471.2827416567996
56758.84221737146368.1577826285364
6011.5425192736505-11.5425192736505
7841.4155338144981-33.4155338144981
81-5.82996591674886.8299659167488
902.06464382494511-2.06464382494511
101618.4286965290779-2.42869652907785
11118.650336646890652.34966335310935
121628.1858409077172-12.1858409077172
1305.60697039539112-5.60697039539112
14012.5274527415966-12.5274527415966
1509.2628008121568-9.2628008121568
16611.1412060005519-5.14120600055185
1710257.089862600480744.9101373995193
18042.5793682918182-42.5793682918182
19050.8553611323748-50.8553611323748
2007.96939416550511-7.96939416550511
217423.796909300176450.2030906998236
220-23.18632556060223.186325560602
231220.5060158122785-8.50601581227855
240-1.679525031052831.67952503105283
250-0.5705154776582930.570515477658293
26830.8004373737074-22.8004373737074
270-16.100085361695016.1000853616950
2809.37698757142566-9.37698757142566
29109.050568323490690.949431676509306
3010-6.2422426562193116.2422426562193
31124.093328924613987.90667107538602
32811.4700314761331-3.47003147613315
331118.7616405864576-7.76164058645758
341615.64655875743730.353441242562654
351022.1939388338959-12.1939388338959
3686.975769717445381.02423028255462
37149.327964926822564.67203507317744
381616.6951366360267-0.695136636026657
391313.7182089494011-0.718208949401064
40510.2716212593308-5.27162125933084
4112-9.3913523726221221.3913523726221
42416.6473074666009-12.6473074666009
4312749.787065192814277.2129348071858
447636.558430995453339.4415690045467
452535.5521462206598-10.5521462206598
46010.6070553094009-10.6070553094009
47111100.14179175052410.8582082494760
48037.5832940338728-37.5832940338728
4902.07822619829041-2.07822619829041
505197.5274131348986-46.5274131348986
5153106.231846568909-53.2318465689087
5213118.6614706720989112.338529327901
531115.8749104633964-4.87491046339637
54915.9768764533434-6.9768764533434
55913.9627838796735-4.96278387967353
561130.6795719977376-19.6795719977376
5704.88594333092586-4.88594333092586
581226.0340806920860-14.0340806920860
59148.504126740233245.49587325976676
601216.8937572617192-4.89375726171916
611518.8519562062100-3.85195620621003
6212-2.2740924708925514.2740924708926
631312.77168637744220.228313622557798
641217.9714297500092-5.97142975000919
651210.83484482466111.16515517533886
66057.0337272609345-57.0337272609345
67280.2129704944614-78.2129704944614
683641.290091438925-5.29009143892499
693642.0219758280602-6.02197582806017
7014184.776865370931856.2231346290682
71013.7360696884561-13.7360696884561
723714.351918793218122.6480812067819
73014.4706962574182-14.4706962574182
741030.9643674627582-20.9643674627582
75054.3239372287093-54.3239372287093
76023.6593405449579-23.6593405449579
77014.1468443770239-14.1468443770239
785818.87654775557839.123452244422
79440.7381380512141-36.7381380512141
809185.4208386227645.5791613772361
8113294.812324943945437.1876750560546
82052.9449868010472-52.9449868010472
83012.2671642865290-12.2671642865290
84713.7207336818016-6.72073368180163
851119.0880713803169-8.08807138031689
861117.5118336357838-6.51183363578381
871111.0701850748028-0.0701850748028354
880-3.367997366157273.36799736615727
891233.5193050927784-21.5193050927784
901020.205681104634-10.2056811046340
910-13.322947731073313.3229477310733
92821.4032501415980-13.4032501415980
931313.8920224653129-0.89202246531288
942117.56455375630693.43544624369305
9511870.481040723826947.5189592761731
963980.2578239020356-41.2578239020356
976355.63252389568217.36747610431785
987870.4255441661677.57445583383294
992619.15949166335416.84050833664593
1005054.591463459504-4.59146345950401
101104116.392455188913-12.3924551889129
102059.2400392627704-59.2400392627704
10305.71723967964059-5.71723967964059
104122107.99518809888014.0048119011202
10514985.88113650890263.1188634910979
1061729.8093921189283-12.8093921189283
1079179.459465049440511.5405349505595
10811158.611883966173252.3881160338268
1099969.005393131931629.9946068680684
1104028.228300510118711.7716994898813
11113259.548143917945372.4518560820547
11212360.912614420183462.0873855798166
1135447.96952675450536.03047324549466
1149039.481906627777650.5180933722224
1158638.710685247630947.2893147523691
11615297.735144393691454.2648556063086
117152125.39366539400426.6063346059965
11812349.798149166239673.2018508337604
11910093.93310904489426.0668909551058
12011696.867507317233719.1324926827663
1215971.1309121679744-12.1309121679744
1221220.5647370157687-8.56473701576867
1231213.1403891508116-1.14038915081164
124820.5231556414531-12.5231556414531
125825.2447438763270-17.2447438763270
1261421.5019145705868-7.50191457058685
1271225.3388208463015-13.3388208463015
128018.3962483587954-18.3962483587954
129613.5774206049397-7.57742060493974
130033.5505461039532-33.5505461039532
131080.5421866652787-80.5421866652787
1329370.75136328933822.248636710662
13309.16523906799077-9.16523906799077
134050.9031810564828-50.9031810564828
1350-19.818860178539919.8188601785399
1361729.3499923500707-12.3499923500707
1370-16.054723633358116.0547236333581
1380-5.569836244242735.56983624424273
139114.7210575963478-13.7210575963478
140139.7952241566575-38.7952241566575
141028.1516177636635-28.1516177636635
1420-4.661138606071624.66113860607162
143116.574255555570494.42574444442951
14412-12.920660330607924.9206603306079
14511-26.569104630202237.5691046302022
14601.89367081705365-1.89367081705365
1470-3.259863434062423.25986343406242
1481217.4291204682336-5.42912046823356
1491414.1461602963893-0.146160296389311
1501113.1594271374496-2.15942713744955
1511413.82928896665080.170711033349214
152820.1881295214837-12.1881295214837
1531218.0977848718506-6.09778487185056
154616.3933329657405-10.3933329657405
155550.2384699413155-45.2384699413155
156311.4830987067367-8.4830987067367


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.03682072092407020.07364144184814040.96317927907593
180.04869571456586430.09739142913172870.951304285434136
190.01796339215934150.03592678431868310.982036607840658
200.00718193978713670.01436387957427340.992818060212863
210.1977942844051200.3955885688102390.80220571559488
220.1343824443460670.2687648886921340.865617555653933
230.08198456537642550.1639691307528510.918015434623574
240.04799999068007240.0959999813601450.952000009319928
250.02714117407501520.05428234815003040.972858825924985
260.01546763402368940.03093526804737880.98453236597631
270.0228690883768550.045738176753710.977130911623145
280.01281251496806640.02562502993613280.987187485031934
290.00747424232481240.01494848464962480.992525757675188
300.004282570145560940.008565140291121880.99571742985444
310.003374797017418270.006749594034836540.996625202982582
320.002156186085496020.004312372170992030.997843813914504
330.001096892529841510.002193785059683030.998903107470158
340.0005417550563057390.001083510112611480.999458244943694
350.0002743198724251510.0005486397448503020.999725680127575
360.0001311365407092780.0002622730814185560.99986886345929
377.40280417108423e-050.0001480560834216850.99992597195829
383.35438891355874e-056.70877782711749e-050.999966456110864
391.63966523136878e-053.27933046273757e-050.999983603347686
407.27345541745506e-061.45469108349101e-050.999992726544582
417.57175240829552e-061.51435048165910e-050.999992428247592
423.54765497799009e-067.09530995598019e-060.999996452345022
430.002385555694277370.004771111388554740.997614444305723
440.001908271211969190.003816542423938370.99809172878803
450.001461125073547770.002922250147095540.998538874926452
460.0008836631709471490.001767326341894300.999116336829053
470.002000244673165070.004000489346330150.997999755326835
480.01733323785403610.03466647570807220.982666762145964
490.01200455155416000.02400910310832000.98799544844584
500.05517035651351980.1103407130270400.94482964348648
510.07057697688469350.1411539537693870.929423023115307
520.4388584225865070.8777168451730140.561141577413493
530.3904706184692240.7809412369384480.609529381530776
540.4116357212987930.8232714425975850.588364278701208
550.3713532857530050.742706571506010.628646714246995
560.3545913874312920.7091827748625850.645408612568708
570.3122866596309510.6245733192619030.687713340369049
580.2715877808801320.5431755617602630.728412219119868
590.2323853396266180.4647706792532350.767614660373382
600.1944344557921250.3888689115842500.805565544207875
610.1621165926889480.3242331853778950.837883407311052
620.1374502305618030.2749004611236060.862549769438197
630.1107328861030220.2214657722060430.889267113896978
640.08819942011512120.1763988402302420.911800579884879
650.06989180695743760.1397836139148750.930108193042562
660.1036261251322930.2072522502645860.896373874867707
670.26415444107160.52830888214320.7358455589284
680.2278647838282350.455729567656470.772135216171765
690.1942237024135280.3884474048270570.805776297586472
700.3561488546948130.7122977093896270.643851145305187
710.3219375158394810.6438750316789610.67806248416052
720.3030492098783940.6060984197567890.696950790121606
730.3078737298208840.6157474596417680.692126270179116
740.277385705056990.554771410113980.72261429494301
750.3912822555699490.7825645111398980.608717744430051
760.4071418051552650.8142836103105310.592858194844735
770.3713138766033690.7426277532067390.62868612339663
780.4155486822283450.831097364456690.584451317771655
790.4059559556255020.8119119112510040.594044044374498
800.3969581655262770.7939163310525540.603041834473723
810.4668461882339850.933692376467970.533153811766015
820.5278585521981680.9442828956036640.472141447801832
830.498132110004850.99626422000970.50186788999515
840.4497232848175120.8994465696350250.550276715182488
850.4033662361948060.8067324723896120.596633763805194
860.3640240176856230.7280480353712460.635975982314377
870.3192568651586420.6385137303172840.680743134841358
880.2756494203748530.5512988407497060.724350579625147
890.2551047494954870.5102094989909740.744895250504513
900.2280894090386680.4561788180773360.771910590961332
910.1923873650109740.3847747300219490.807612634989026
920.1616038771221620.3232077542443240.838396122877838
930.1323666718241090.2647333436482170.867633328175891
940.1074036324016910.2148072648033830.892596367598309
950.1318090290639840.2636180581279690.868190970936016
960.1417344155144540.2834688310289080.858265584485546
970.1146845877585120.2293691755170240.885315412241488
980.09307973721390330.1861594744278070.906920262786097
990.0757276019741080.1514552039482160.924272398025892
1000.059696159361750.11939231872350.94030384063825
1010.05225536940663880.1045107388132780.947744630593361
1020.09602281042811530.1920456208562310.903977189571885
1030.07799385822585380.1559877164517080.922006141774146
1040.07320522329184230.1464104465836850.926794776708158
1050.1574519869232390.3149039738464790.84254801307676
1060.134376474446880.268752948893760.86562352555312
1070.1134997205527260.2269994411054510.886500279447274
1080.1613832797608840.3227665595217680.838616720239116
1090.1470434764966570.2940869529933130.852956523503343
1100.1221709559066220.2443419118132450.877829044093378
1110.2474111761362550.494822352272510.752588823863745
1120.3726265956528760.7452531913057510.627373404347124
1130.3186542278606760.6373084557213520.681345772139324
1140.3895863389070930.7791726778141870.610413661092907
1150.5135253732636440.9729492534727120.486474626736356
1160.6957084360471740.6085831279056510.304291563952826
1170.7360517465474850.5278965069050290.263948253452515
1180.9822210783960450.03555784320790920.0177789216039546
1190.983493643315530.033012713368940.01650635668447
1200.9996862804781920.0006274390436161260.000313719521808063
1210.99999188089121.62382175990573e-058.11910879952863e-06
1220.9999819886431633.60227136735071e-051.80113568367535e-05
1230.999955508007328.89839853612628e-054.44919926806314e-05
1240.9998979363580550.0002041272838896880.000102063641944844
1250.9998378851018740.0003242297962522590.000162114898126129
1260.9996560238831020.0006879522337966480.000343976116898324
1270.999321220912680.001357558174638960.000678779087319482
1280.9988189297872440.002362140425512980.00118107021275649
1290.9974711489633960.005057702073207220.00252885103660361
1300.9984758907690880.003048218461824530.00152410923091227
1310.9999790529815924.18940368161043e-052.09470184080521e-05
1320.999999976845314.63093783613257e-082.31546891806629e-08
1330.9999998087378123.82524376720981e-071.91262188360490e-07
1340.9999990521104641.8957790712539e-069.4788953562695e-07
1350.999996140330557.71933889966302e-063.85966944983151e-06
1360.99999873424362.53151279910016e-061.26575639955008e-06
1370.9999871206425772.57587148469673e-051.28793574234836e-05
1380.9998886052534610.0002227894930770470.000111394746538524
1390.9987073796515520.002585240696896370.00129262034844818


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level380.308943089430894NOK
5% type I error level480.390243902439024NOK
10% type I error level520.422764227642276NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/10zhan1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/10zhan1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/1azwt1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/1azwt1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/2azwt1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/2azwt1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/3azwt1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/3azwt1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/43qve1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/43qve1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/53qve1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/53qve1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/63qve1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/63qve1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/7vhuz1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/7vhuz1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/8oqbk1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/8oqbk1291370811.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/9oqbk1291370811.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913709328g35fe7584jimu8/9oqbk1291370811.ps (open in new window)


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