Home » date » 2010 » Dec » 02 »

WS 4: Personality and friends

*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: Thu, 02 Dec 2010 16:43:36 +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/02/t1291308221q85huyy4y49d1oc.htm/, Retrieved Thu, 02 Dec 2010 17:43:42 +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/02/t1291308221q85huyy4y49d1oc.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13 13 14 13 3 1 1 0 12 12 8 13 5 1 0 0 15 10 12 16 6 0 0 0 12 9 7 12 6 2 0 1 10 10 10 11 5 0 1 2 12 12 7 12 3 0 0 1 15 13 16 18 8 1 1 1 9 12 11 11 4 1 0 0 12 12 14 14 4 4 0 0 11 6 6 9 4 0 0 0 11 5 16 14 6 0 2 1 11 12 11 12 6 2 0 0 15 11 16 11 5 0 2 2 7 14 12 12 4 1 1 1 11 14 7 13 6 0 1 0 11 12 13 11 4 0 0 1 10 12 11 12 6 1 1 0 14 11 15 16 6 2 0 1 10 11 7 9 4 1 0 0 6 7 9 11 4 1 0 0 11 9 7 13 2 0 1 1 15 11 14 15 7 1 2 0 11 11 15 10 5 1 2 1 12 12 7 11 4 2 0 0 14 12 15 13 6 1 0 0 15 11 17 16 6 1 1 0 9 11 15 15 7 1 1 0 13 8 14 14 5 2 2 0 13 9 14 14 6 0 0 2 16 12 8 14 4 1 1 1 13 10 8 8 4 0 1 2 12 10 14 13 7 1 1 1 14 12 14 15 7 1 2 1 11 8 8 13 4 0 2 0 9 12 11 11 4 1 1 0 16 11 16 15 6 2 2 0 12 12 10 15 6 1 1 1 10 7 8 9 5 1 1 2 13 11 14 13 6 1 0 1 16 11 16 16 7 1 3 1 14 12 13 13 6 0 1 2 15 9 5 11 3 1 0 0 5 15 8 12 3 1 0 0 8 11 10 12 4 1 0 0 11 11 8 12 6 0 1 1 16 11 13 14 7 2 0 1 17 11 15 14 5 1 4 4 9 15 6 8 4 0 0 0 9 11 12 13 5 0 0 0 13 12 16 16 6 1 0 1 10 12 5 13 6 1 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 time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = -0.17879188700372 + 0.100252682453213FindingFriends[t] + 0.212183545436264KnowingPeople[t] + 0.382293973272379Liked[t] + 0.592277125614447Celebrity[t] + 0.310366099758153bestfriend[t] -0.0288664388538009secondbestfriend[t] + 0.408723247498028thirdbestfriend[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.178791887003721.432707-0.12480.9008570.450428
FindingFriends0.1002526824532130.0966951.03680.3015210.150761
KnowingPeople0.2121835454362640.0635973.33640.0010730.000537
Liked0.3822939732723790.097263.93060.000136.5e-05
Celebrity0.5922771256144470.1555383.80790.0002050.000102
bestfriend0.3103660997581530.2094361.48190.140490.070245
secondbestfriend-0.02886643885380090.200708-0.14380.8858360.442918
thirdbestfriend0.4087232474980280.2130141.91880.056940.02847


Multiple Linear Regression - Regression Statistics
Multiple R0.718894523522317
R-squared0.516809335950379
Adjusted R-squared0.493955723461546
F-TEST (value)22.6139012465928
F-TEST (DF numerator)7
F-TEST (DF denominator)148
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.08902237966842
Sum Squared Residuals645.874146407814


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.12321531128441.87678468871563
21210.96328204629631.03671795370375
31513.04030380880831.95969619119169
41211.37941295309860.6205870469014
51010.9007697821017-0.9007697821017
6129.28260742409862.71739257590141
71516.8291611440890-1.82916114408904
8910.2429676104458-1.24296761044584
91212.9574984658462-0.95749846584623
10117.505579742242343.49442025775766
111112.9741770015330-1.97417700153297
121112.1201819347053-1.12018193470527
131512.24525729831872.75474270168130
14711.4178073027051-4.41780730270514
151111.2046484527689-0.204648452768911
161110.76569184905820.234308150941755
171011.7809493960933-1.78094939609331
181414.8065625745847-0.806562574584652
19108.529392799702821.47060720029718
2069.31733710730725-3.31733710730725
21118.742999785543092.25700021445691
221514.02753995652670.972460043473327
231111.5524226318702-0.552422631870179
24129.704599528458942.29540047154106
251413.04084398996450.959156010035451
261514.48297387934720.517026120652803
27914.2685899408167-5.26858994081674
281312.47029978442390.529700215576085
291313.4172767656789-0.417276765678926
301611.13315570259844.86684429740159
31138.737243645797594.26275635420241
321213.6002890138805-1.60028901388053
331414.5365158864779-0.536515886477914
34119.60189521340321.39810478659680
35910.2141011715920-1.21410117159204
361614.16999602154291.83000397845709
371213.1243710179722-1.12437101797221
38109.721422797082930.278577202917070
391313.1371310095731-0.137131009573099
401615.21405782931580.785942170684194
411413.09469085547610.905309144523878
42158.076831164854176.92316883514583
4359.69719186915463-4.69719186915462
44810.3128253558287-2.31282535582874
451111.1425032250712-0.142503225071184
461614.20988466278181.79011533721819
471714.25003538974622.74996461025383
4898.025559911048870.974440088951125
49911.4013974458299-2.40139744582994
501314.8086327027160-1.80863270271598
511010.8901420967481-0.89014209674811
52612.0161222660924-6.01612226609242
531211.85507766270170.144922337298265
54810.4404956295679-2.44049562956788
551411.81408635617262.18591364382737
561212.8958442537491-0.895844253749078
571111.0437674770327-0.0437674770327478
581614.11090923903681.88909076096322
59810.2174201467094-2.21742014670938
601514.57936740552680.420632594473168
6179.08606772203683-2.08606772203683
621613.88795473072372.11204526927626
631412.86729361246561.13270638753437
641613.59135285635972.4086471436403
65910.2068533045821-1.20685330458214
661412.33456587323571.66543412676427
671113.2504157773547-2.25041577735468
681310.36880452758762.63119547241239
691512.96746726888242.03253273111755
7055.79023616619341-0.790236166193413
711512.89584425374912.10415574625092
721311.93760045691621.06239954308383
731113.0096865681784-2.00968656817842
741114.1073106126889-3.10731061268895
751212.2155458199278-0.215545819927803
761213.4207007986088-1.42070079860878
771212.7717885230907-0.771788523090728
781212.1014030000488-0.101403000048823
791411.06366499371232.93633500628766
8067.99749563203563-1.99749563203563
8179.43729486336121-2.43729486336121
821412.63325583926091.36674416073910
831414.0140965062464-0.0140965062463691
841010.9881669055724-0.98816690557244
85139.38061538500253.6193846149975
861212.4326181625947-0.432618162594745
8799.09500387955766-0.095003879557659
881212.3702376121216-0.37023761212164
891615.08627320734670.913726792653251
901010.8197311576487-0.819731157648661
911412.99768906129341.00231093870665
921013.6606689718278-3.66066897182779
931615.00394441201090.996055587989134
941513.33402183139871.66597816860126
951211.49714283552370.502857164476318
96109.29605087437890.703949125621102
97810.3039187256395-2.30391872563946
9888.49104857341337-0.491048573413374
991112.5710940967919-1.57109409679194
1001313.0095563032155-0.00955630321554896
1011615.89269749995770.107302500042301
1021615.1862891182660.813710881733994
1031415.6755434598453-1.67554345984527
104119.011162502738221.98883749726178
10547.39905245048233-3.39905245048233
1061414.6931147771868-0.693114777186823
107910.5946298751140-1.59462987511395
1081415.2695903139292-1.26959031392921
109810.0456509556939-2.04565095569389
110810.5072804617848-2.50728046178481
1111111.9938048364073-0.993804836407263
1121213.2321103857661-1.23211038576614
1131111.0330095267163-0.0330095267162853
1141413.04183230702480.958167692975176
1151514.42495205999170.575047940008309
1161613.39220139625182.6077986037482
1171612.90058831804253.09941168195749
1181112.6735746528740-1.67357465287404
1191413.40602935556160.593970644438402
1201411.04755854645942.95244145354057
1211211.59959591107110.400404088928909
1221413.09400739679670.905992603203296
123810.8603554276809-2.86035542768093
1241314.3119707018324-1.31197070183239
1251614.55095055799111.44904944200886
1261210.61084282893801.38915717106205
1271615.87918596283050.120814037169506
1281212.7304778902064-0.730477890206395
1291111.3400659417745-0.340065941774508
13045.79461524078687-1.79461524078687
1311616.1318191848810-0.131819184881045
1321513.12148716619861.8785128338014
1331011.178654301887-1.17865430188699
1341314.3237444497438-1.32374444974382
1351512.63067189489862.36932810510136
1361210.24395592750611.75604407249388
1371412.92591986446421.07408013553584
138710.4573515489763-3.4573515489763
1391913.77656549765555.22343450234449
1401213.1083948356822-1.10839483568217
1411211.96822060171870.0317793982812942
1421313.2804451266867-0.280445126686737
1431512.48062201335842.51937798664163
14489.01775498964167-1.01775498964167
1451211.20409525905240.795904740947636
1461010.4678451340069-0.467845134006906
147811.3455760195686-3.34557601956863
1481014.3588232059195-4.3588232059195
1491514.25415817347620.745841826523842
1501614.04306945167131.95693054832875
1511313.2761746054612-0.276174605461218
1521615.06150269630050.938497303699518
15399.79027571063433-0.790275710634327
1541413.37709918279210.622900817207884
1551413.44505994470310.554940055296899
1561210.07617615772711.92382384227293


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.2614611292221170.5229222584442340.738538870777883
120.1388829890218400.2777659780436800.86111701097816
130.6133159687199050.773368062560190.386684031280095
140.8647090486143670.2705819027712670.135290951385633
150.8059182230822240.3881635538355520.194081776917776
160.7401202663768420.5197594672463160.259879733623158
170.6636766582465220.6726466835069570.336323341753478
180.5733743347615890.8532513304768230.426625665238411
190.4940433790442870.9880867580885740.505956620955713
200.7440425860324480.5119148279351030.255957413967552
210.6837722217914430.6324555564171140.316227778208557
220.6851569506316470.6296860987367050.314843049368353
230.6158860580678330.7682278838643340.384113941932167
240.6129406307656220.7741187384687570.387059369234378
250.5772857075038330.8454285849923350.422714292496167
260.5164351808880590.9671296382238830.483564819111941
270.7425610496384540.5148779007230910.257438950361546
280.699798351442880.600403297114240.30020164855712
290.6388799441910440.7222401116179120.361120055808956
300.7566081187445440.4867837625109120.243391881255456
310.8207686914043230.3584626171913550.179231308595677
320.784607512721310.4307849745573800.215392487278690
330.7378282682535840.5243434634928320.262171731746416
340.6987410736495310.6025178527009380.301258926350469
350.6735364491920640.6529271016158720.326463550807936
360.7045437008211580.5909125983576840.295456299178842
370.6820521807676150.635895638464770.317947819232385
380.6343645407259740.7312709185480520.365635459274026
390.5849390359063390.8301219281873230.415060964093661
400.5418095622940460.9163808754119070.458190437705954
410.4933899109254220.9867798218508440.506610089074578
420.8201510223441170.3596979553117660.179848977655883
430.9575031925767030.08499361484659450.0424968074232972
440.9615093951465030.07698120970699450.0384906048534972
450.9506264293537040.09874714129259160.0493735706462958
460.9543590487179660.09128190256406880.0456409512820344
470.9552881372414160.0894237255171680.044711862758584
480.9460721450457430.1078557099085130.0539278549542566
490.9467459202982580.1065081594034840.0532540797017418
500.9410485458479360.1179029083041280.0589514541520638
510.933030902170690.1339381956586190.0669690978293093
520.9891537196909740.02169256061805210.0108462803090260
530.9852450027051370.02950999458972560.0147549972948628
540.9901900545393240.01961989092135290.00980994546067645
550.9924166407996260.01516671840074840.00758335920037418
560.9903106726310110.01937865473797740.00968932736898872
570.9872026825522080.02559463489558360.0127973174477918
580.9866799714961810.02664005700763750.0133200285038188
590.9904728722107740.01905425557845170.00952712778922585
600.9885697721692750.02286045566145090.0114302278307254
610.9889988800572660.02200223988546820.0110011199427341
620.990163650696620.01967269860676030.00983634930338016
630.9889802764548350.02203944709033090.0110197235451655
640.9902364952937780.01952700941244420.00976350470622212
650.9888000983379820.02239980332403620.0111999016620181
660.9873683120012950.0252633759974090.0126316879987045
670.9886330851756110.02273382964877790.0113669148243890
680.990603640393710.01879271921258010.00939635960629004
690.990669929918730.01866014016254110.00933007008127055
700.9877281825817030.02454363483659360.0122718174182968
710.9883790416521390.02324191669572270.0116209583478613
720.985664684435910.02867063112817820.0143353155640891
730.9855911407760010.02881771844799750.0144088592239987
740.9900150228679390.01996995426412300.00998497713206149
750.9866018267727140.02679634645457190.0133981732272859
760.9843432741033830.03131345179323510.0156567258966175
770.97976320393560.04047359212880050.0202367960644003
780.97366793426680.05266413146640090.0263320657332004
790.9800619984841350.0398760030317290.0199380015158645
800.9796433634994480.04071327300110450.0203566365005523
810.981264145287460.03747170942507850.0187358547125393
820.979187754149380.0416244917012390.0208122458506195
830.972349988027680.05530002394464150.0276500119723208
840.9654917701951120.06901645960977590.0345082298048880
850.9855484778169030.02890304436619360.0144515221830968
860.9809439746324210.03811205073515750.0190560253675788
870.974780944195140.05043811160971990.0252190558048600
880.9676507754066320.06469844918673560.0323492245933678
890.9594274145294980.08114517094100320.0405725854705016
900.9492633563191270.1014732873617450.0507366436808727
910.9402979916274520.1194040167450970.0597020083725485
920.9662563646341640.06748727073167180.0337436353658359
930.957709641148740.08458071770252040.0422903588512602
940.953160767572930.09367846485414020.0468392324270701
950.9415400023334980.1169199953330030.0584599976665017
960.9276961486576470.1446077026847060.0723038513423532
970.9241705364247580.1516589271504840.075829463575242
980.905781518326750.1884369633465000.0942184816732498
990.8973089073544350.2053821852911310.102691092645565
1000.8726997813408020.2546004373183950.127300218659198
1010.845252117712840.309495764574320.15474788228716
1020.8161083499707650.367783300058470.183891650029235
1030.844015972810250.3119680543795010.155984027189751
1040.8844484521370340.2311030957259310.115551547862966
1050.891802422686170.2163951546276620.108197577313831
1060.8671749344729170.2656501310541670.132825065527083
1070.8456960875737550.3086078248524890.154303912426245
1080.8408456295907870.3183087408184260.159154370409213
1090.8326763205528640.3346473588942730.167323679447136
1100.8545954674456510.2908090651086980.145404532554349
1110.842200233462480.3155995330750390.157799766537519
1120.886160387958570.2276792240828600.113839612041430
1130.8564507370826780.2870985258346440.143549262917322
1140.8256501668851590.3486996662296820.174349833114841
1150.7878216948411710.4243566103176580.212178305158829
1160.7993282437061750.4013435125876510.200671756293825
1170.8083614870413760.3832770259172490.191638512958624
1180.7908367067637820.4183265864724360.209163293236218
1190.7486765439383780.5026469121232430.251323456061622
1200.8295178872995930.3409642254008140.170482112700407
1210.7989138047382250.4021723905235500.201086195261775
1220.7531780658401930.4936438683196140.246821934159807
1230.7535117969913280.4929764060173440.246488203008672
1240.7221348368826990.5557303262346030.277865163117301
1250.6979772209867370.6040455580265270.302022779013263
1260.6816893253331960.6366213493336070.318310674666804
1270.6190850667373380.7618298665253240.380914933262662
1280.604098320408820.791803359182360.39590167959118
1290.595087127880760.809825744238480.40491287211924
1300.583916776722240.832166446555520.41608322327776
1310.5170328696803710.9659342606392580.482967130319629
1320.4881460029228370.9762920058456740.511853997077163
1330.4536106142182480.9072212284364960.546389385781752
1340.4094417839599710.8188835679199420.590558216040029
1350.3609712769556650.721942553911330.639028723044335
1360.3372528720262520.6745057440525050.662747127973748
1370.3042138989317730.6084277978635470.695786101068227
1380.3352764335017480.6705528670034970.664723566498252
1390.7298268530738040.5403462938523920.270173146926196
1400.7275974199120.5448051601759990.272402580088000
1410.635969982353420.7280600352931610.364030017646581
1420.6347135128653790.7305729742692420.365286487134621
1430.5128198137942240.9743603724115510.487180186205776
1440.3956039295584320.7912078591168640.604396070441568
1450.3507749987437050.701549997487410.649225001256295


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


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/1lxnx1291308204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/1lxnx1291308204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/2lxnx1291308204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/2lxnx1291308204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/3von01291308204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/3von01291308204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/4von01291308204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/4von01291308204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/5von01291308204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/5von01291308204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/6ogml1291308204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/6ogml1291308204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/7h7l61291308204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/7h7l61291308204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/8h7l61291308204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291308221q85huyy4y49d1oc/8h7l61291308204.ps (open in new window)


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