Home » date » 2010 » Dec » 24 »

*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, 24 Dec 2010 15:56:42 +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/24/t12932060758qoxu9owcm6lem7.htm/, Retrieved Fri, 24 Dec 2010 16:54:35 +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/24/t12932060758qoxu9owcm6lem7.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 «
15 10 12 16 6 2 0 0 9 12 9 7 12 6 1 1 2 9 9 12 11 11 4 1 2 1 9 10 12 11 12 6 0 0 0 9 13 9 14 14 6 0 0 0 9 16 11 16 16 7 1 0 0 9 14 12 13 13 6 0 0 0 9 16 11 13 14 7 1 1 0 9 10 12 5 13 6 0 0 0 9 8 12 8 13 4 2 0 1 10 12 11 14 13 5 1 0 0 10 15 11 15 15 8 0 0 0 10 14 12 8 14 4 0 1 0 10 14 6 13 12 6 1 1 2 10 12 13 12 12 6 1 2 1 10 12 11 11 12 5 0 0 0 10 10 12 8 11 4 0 0 0 10 4 10 4 10 2 0 0 0 10 14 11 15 15 8 0 1 0 10 15 12 12 16 7 0 0 0 10 16 12 14 14 6 0 0 0 10 12 12 9 13 4 0 1 0 10 12 11 16 13 4 0 0 0 10 12 12 10 13 4 0 0 1 10 12 12 8 13 5 1 0 1 9 12 12 14 14 4 0 0 0 9 11 6 6 9 4 3 2 1 9 11 5 16 14 6 1 0 0 9 11 12 11 12 6 1 1 0 9 11 14 7 13 6 1 1 0 9 11 12 13 11 4 3 1 1 9 11 9 7 13 2 0 0 0 9 15 11 14 15 7 0 0 0 9 15 11 17 16 6 0 0 0 9 9 11 15 15 7 0 0 0 9 16 12 8 14 4 0 0 0 9 13 10 8 8 4 0 2 1 9 9 12 11 11 4 1 0 0 9 16 11 16 15 6 0 0 0 9 12 12 10 15 6 0 0 0 9 15 9 5 11 3 0 0 2 9 5 15 8 12 3 0 0 0 9 11 11 8 12 6 2 2 0 9 17 11 15 14 5 2 2 0 9 9 15 6 8 4 0 1 1 9 13 12 16 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] = + 1.04499634277405 + 0.119499232591395FindingFriends[t] + 0.241564101757528KnowingPeople[t] + 0.378018708974303Liked[t] + 0.607491789609728Celebrity[t] -0.0489828130821502B[t] + 0.174147430517712`2B`[t] + 0.508543630098061`3B`[t] -0.136999283939151Month[t] -0.00188085357862906t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.044996342774053.9280530.2660.7905880.395294
FindingFriends0.1194992325913950.0968751.23350.2193570.109678
KnowingPeople0.2415641017575280.0619263.90080.0001467.3e-05
Liked0.3780187089743030.0980763.85430.0001738.7e-05
Celebrity0.6074917896097280.1571963.86450.0001678.3e-05
B-0.04898281308215020.224347-0.21830.8274730.413736
`2B`0.1741474305177120.2708020.64310.5211810.26059
`3B`0.5085436300980610.3186461.5960.1126610.056331
Month-0.1369992839391510.40264-0.34030.7341560.367078
t-0.001880853578629060.00416-0.45220.6518250.325912


Multiple Linear Regression - Regression Statistics
Multiple R0.717470503794907
R-squared0.514763923815717
Adjusted R-squared0.484852110900247
F-TEST (value)17.2093856454116
F-TEST (DF numerator)9
F-TEST (DF denominator)146
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10772912266704
Sum Squared Residuals648.608219962662


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11513.49916793583021.50083206416975
21211.89811000877140.101889991228633
3911.2935847722229-2.29358477222292
41012.0768505287867-2.07685052878672
51313.1972017006551-0.197201700655095
61615.23199391025050.768006089749507
71412.93235488054021.06764511945981
81613.92164991038982.07835008961024
91010.9960803593227-0.99608035932271
10810.7774869517918-2.77748695179182
111212.2534224487608-0.253422448760777
121515.1206012967996-0.120601296799615
131410.91343252661423.08656747338582
141412.82942739465961.17057260534035
151213.0880808678829-1.08808086788291
161211.19028997970290.809710020297104
17109.597705554859050.402294445140952
1846.79756754087376-2.79756754087376
191415.2815827522669-1.28158275226692
201514.27088831485400.72911168514603
211613.38860645723212.61139354276794
221210.76005023718971.23994976281025
231212.1554714328047-0.155471432804706
241211.33224883137040.667751168629633
251211.54274803474340.457251965256588
261212.3012178940586-0.301217894058612
27118.469625337886922.53037466211308
281113.1100905284140-2.11009052841395
291112.1549938067566-1.15499380675655
301111.8038737203049-0.803873720304907
311111.4519360188544-0.451936018854354
32118.64748407431622.3525159256838
331514.36904676422030.6309532357797
341514.86238513527880.137614864721171
35914.6068491588206-5.60684915882057
361610.83302474772725.16697525227284
37139.18087166625343.81912833374659
38910.3709164058374-1.37091640583742
391614.23339805665391.76660194334615
401212.9016318251215-0.901631825121454
41159.015969820450735.98403017954927
4259.81670811647123-4.81670811647123
431111.4096349362273-0.409634936227332
441713.24724842329033.75275157670973
4599.10604536654858-0.106045366548579
461314.7177500231691-1.71775002316915
471614.22037218787721.77962781212282
481613.82095161412412.17904838587587
491414.3483495841271-0.34834958412712
501613.54359836675262.45640163324742
511112.8177075336821-1.81770753368211
521111.8786166688209-0.878616668820855
531113.7454798740905-2.74547987409047
541212.2263929114652-0.226392911465156
551213.8219110758755-1.82191107587552
561212.0787466070131-0.0787466070131064
571413.71586981200110.284130187998901
581010.8938292706448-0.89382927064478
5999.36948662402635-0.369486624026354
601212.2721352488986-0.272135248898609
611010.0150315755398-0.0150315755398049
621412.98177323883541.01822676116463
6389.91845471742309-1.91845471742309
641614.48582154061041.51417845938958
651415.7326316930428-1.73263169304282
661410.73031961291923.26968038708076
671211.22595670090630.774043299093689
681413.37328839512050.626711604879521
69711.1119568444562-4.11195684445617
701913.91602744261115.08397255738893
711512.83561761702982.16438238297024
72811.2358065245671-3.23580652456709
731014.2688825796494-4.26888257964936
741312.91576686209370.0842331379063024
751311.34304480271321.65695519728685
761010.4753560056011-0.475356005601079
77129.15081644168752.8491835583125
781517.4307739990282-2.43077399902825
79711.1523826850282-4.15238268502825
801414.2927376671468-0.292737667146837
81108.497229457468411.50277054253159
8269.778959586541-3.778959586541
831111.3135254367911-0.313525436791105
84129.367123547272522.63287645272748
851414.2858637651183-0.285863765118301
861213.3938248740130-1.39382487401296
871414.3869799035657-0.386979903565727
881110.12953395716970.870466042830313
89109.312802406856970.687197593143033
901313.4068525327782-0.406852532778172
91810.3371693538776-2.33716935387761
92911.8039272023981-2.80392720239807
93612.0021952766312-6.0021952766312
941213.1287885999813-1.12878859998133
951412.14184792466331.85815207533665
961110.43489554037760.565104459622418
97810.5675183131860-2.56751831318605
9879.21588333435467-2.21588333435467
99910.4441986498397-1.44419864983974
1001412.08912622853221.91087377146778
1011310.18366025108072.81633974891929
1021512.61667450663132.38332549336872
10355.22559837218436-0.225598372184355
1041512.15468487030172.84531512969831
1051312.17768758680340.822312413196625
1061211.52366237234150.476337627658545
10767.68133413696577-1.68133413696577
10879.56300248642058-2.56300248642058
109138.470501639717174.52949836028283
1101614.8198781617721.18012183822800
1111013.2362850097808-3.23628500978083
1121615.06410619265020.935893807349793
1131513.08167895735621.91832104264385
11488.30768738998187-0.307687389981865
1151112.5043362098399-1.50433620983993
1161313.1382002746666-0.138200274666613
1171615.12778398084100.872216019158957
118118.592594201301022.40740579869898
1191414.3285466292558-0.32854662925576
120910.1143989090423-1.11439890904234
121810.1727908583271-2.17279085832707
122811.0159195208167-3.01591952081667
1231111.7691753077400-0.769175307740025
1241213.1879187906606-1.18791879066064
1251110.92809901144900.0719009885509566
1261414.5188061294066-0.518806129406621
1271112.5720705896542-1.57207058965423
1281412.18745488768411.81254511231592
1291314.6398066696386-1.63980666963858
1301210.64358881349151.35641118650845
13145.77603215019458-1.77603215019458
1321512.78391099937502.21608900062504
1331011.2696200846096-1.26962008460959
1341313.7567513171914-0.756751317191428
1351514.07487692514250.925123074857494
1361213.1336737189485-1.13367371894854
1371313.1704274421111-0.170427442111091
13887.724158465305680.275841534694315
1391010.3945396148313-0.394539614831348
1401513.52841385229891.47158614770114
1411614.27277811247531.72722188752472
1421614.76611648353381.23388351646619
1431412.81503436091581.18496563908422
1441412.91543306405431.08456693594569
1451210.51493016471281.48506983528721
1461513.10381478894741.89618521105256
1471312.83683771782230.163162282177732
1481613.03023882015482.96976117984522
1491413.38942130092510.61057869907493
15089.84763560704182-1.84763560704182
1511613.55980702428552.44019297571448
1521615.74694388313330.25305611686666
1531213.0038791776363-1.00387917763625
1541112.1176937259202-1.11769372592018
1551615.74130132239750.258698677602547
15699.83635048557004-0.836350485570044


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.5652350178937870.8695299642124260.434764982106213
140.3958443088041260.7916886176082530.604155691195874
150.2695099681347230.5390199362694460.730490031865277
160.1866369674411240.3732739348822480.813363032558876
170.1202391393883440.2404782787766890.879760860611656
180.2170170241590840.4340340483181670.782982975840916
190.3642432927011710.7284865854023410.63575670729883
200.2750050187130940.5500100374261870.724994981286906
210.2830881042085210.5661762084170410.71691189579148
220.2108870105713000.4217740211426010.7891129894287
230.1766944787215400.3533889574430810.82330552127846
240.1256549829147810.2513099658295610.87434501708522
250.08664178288384090.1732835657676820.913358217116159
260.07658123655360450.1531624731072090.923418763446396
270.06710153887004690.1342030777400940.932898461129953
280.1724156868602420.3448313737204830.827584313139758
290.1444939221843170.2889878443686330.855506077815683
300.11483698477960.22967396955920.8851630152204
310.0847809535732150.169561907146430.915219046426785
320.07287112601724740.1457422520344950.927128873982753
330.05180763821153380.1036152764230680.948192361788466
340.03792182297567940.07584364595135880.96207817702432
350.2251574135599470.4503148271198940.774842586440053
360.4461309163083080.8922618326166170.553869083691692
370.5778616877575120.8442766244849770.422138312242488
380.5247598800173550.950480239965290.475240119982645
390.4958802109014190.9917604218028380.504119789098581
400.4678112632224680.9356225264449360.532188736777532
410.6990230712026140.6019538575947710.300976928797386
420.858815487243760.282369025512480.14118451275624
430.8271550144032860.3456899711934280.172844985596714
440.8635799939660950.2728400120678090.136420006033905
450.8371863358444020.3256273283111950.162813664155598
460.8362284039390240.3275431921219530.163771596060976
470.8143004148058830.3713991703882330.185699585194117
480.8244099017550580.3511801964898830.175590098244942
490.7893521484790730.4212957030418540.210647851520927
500.7958030661184760.4083938677630490.204196933881524
510.7722482333135210.4555035333729580.227751766686479
520.7592890564282590.4814218871434820.240710943571741
530.8659444633488770.2681110733022460.134055536651123
540.8361709755231480.3276580489537050.163829024476852
550.8271987617765060.3456024764469890.172801238223494
560.7961078180274850.4077843639450300.203892181972515
570.7594858279383050.481028344123390.240514172061695
580.7191174288080910.5617651423838180.280882571191909
590.6853803880948970.6292392238102070.314619611905104
600.6643864537570870.6712270924858260.335613546242913
610.6185215286830740.7629569426338530.381478471316927
620.5853349576214230.8293300847571550.414665042378577
630.5585494112235180.8829011775529650.441450588776482
640.5595711236060910.8808577527878190.440428876393909
650.5475531397292460.9048937205415090.452446860270754
660.6329817735288190.7340364529423630.367018226471181
670.5959829545743390.8080340908513220.404017045425661
680.5614067588642470.8771864822715060.438593241135753
690.6971394199481960.6057211601036090.302860580051804
700.8813087962970540.2373824074058920.118691203702946
710.892818244579680.2143635108406420.107181755420321
720.9076733653531690.1846532692936620.092326634646831
730.948426166920060.1031476661598780.0515738330799391
740.9361565955069570.1276868089860860.0638434044930429
750.9290241534020110.1419516931959770.0709758465979886
760.9114996921399890.1770006157200220.0885003078600112
770.9328447570867610.1343104858264770.0671552429132387
780.9349125949264110.1301748101471780.0650874050735888
790.971123681288190.05775263742361880.0288763187118094
800.962142946066610.0757141078667810.0378570539333905
810.9594313573635030.08113728527299430.0405686426364971
820.9774806159062630.04503876818747320.0225193840937366
830.971217521018390.05756495796322040.0287824789816102
840.9771422693229260.04571546135414840.0228577306770742
850.9697949881195060.06041002376098890.0302050118804944
860.9631847755667670.07363044886646640.0368152244332332
870.9530744498872890.0938511002254220.046925550112711
880.9459700041059750.1080599917880500.0540299958940252
890.9504682599157450.09906348016851050.0495317400842552
900.9373629049542420.1252741900915160.0626370950457579
910.9348604912144440.1302790175711110.0651395087855555
920.9540560486926240.09188790261475120.0459439513073756
930.9960636147665980.007872770466803920.00393638523340196
940.9944025292079580.01119494158408410.00559747079204203
950.9935805665140580.01283886697188480.00641943348594242
960.9914058202051390.01718835958972270.00859417979486136
970.9914305636886120.01713887262277680.00856943631138841
980.9924870527849440.01502589443011140.00751294721505569
990.9894697292720890.02106054145582200.0105302707279110
1000.9883058069830680.02338838603386370.0116941930169318
1010.9923255202242630.01534895955147400.00767447977573699
1020.9927270052297160.01454598954056820.00727299477028412
1030.9898969715692950.02020605686140960.0101030284307048
1040.9928251648717350.01434967025653070.00717483512826536
1050.9899494082745730.02010118345085460.0100505917254273
1060.9872666177464580.0254667645070840.012733382253542
1070.9852816661464690.02943666770706260.0147183338535313
1080.9897177397141850.02056452057162970.0102822602858148
1090.9989839938287670.002032012342466770.00101600617123339
1100.9986715678116050.002656864376789380.00132843218839469
1110.9995775553514220.0008448892971559850.000422444648577992
1120.9993048291287390.001390341742522940.000695170871261468
1130.9992934582974520.001413083405095460.000706541702547731
1140.9988433619189880.0023132761620240.001156638081012
1150.9982662994649720.003467401070055550.00173370053502778
1160.997134693425850.005730613148298850.00286530657414942
1170.995571155669910.0088576886601810.0044288443300905
1180.999285753840140.001428492319720000.000714246159860001
1190.998756898382330.002486203235338800.00124310161766940
1200.9979066340330360.004186731933927480.00209336596696374
1210.997375158216690.005249683566618130.00262484178330906
1220.9966283230390090.00674335392198280.0033716769609914
1230.9947249008402540.01055019831949230.00527509915974613
1240.9946227046848370.01075459063032610.00537729531516303
1250.9911118586567290.01777628268654290.00888814134327143
1260.987067373375360.02586525324928020.0129326266246401
1270.9836509421863660.03269811562726810.0163490578136341
1280.975891995263840.04821600947232180.0241080047361609
1290.987690671533920.02461865693216170.0123093284660809
1300.9897892192266070.02042156154678520.0102107807733926
1310.9848997658581250.03020046828375030.0151002341418751
1320.981996106931670.03600778613666130.0180038930683307
1330.974884054550830.05023189089834120.0251159454491706
1340.962213970710840.07557205857831980.0377860292891599
1350.9378786285014610.1242427429970770.0621213714985387
1360.9538394773033850.09232104539323050.0461605226966152
1370.9721441799188520.05571164016229610.0278558200811481
1380.9475841741985940.1048316516028110.0524158258014057
1390.904257992527850.1914840149443010.0957420074721503
1400.8538580446191890.2922839107616230.146141955380811
1410.7731204477397170.4537591045205650.226879552260283
1420.7099513496636820.5800973006726370.290048650336318
1430.5544296499310780.8911407001378440.445570350068922


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level150.114503816793893NOK
5% type I error level420.320610687022901NOK
10% type I error level560.427480916030534NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/106yz51293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/106yz51293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/1hf2c1293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/1hf2c1293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/2sp2x1293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/2sp2x1293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/3sp2x1293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/3sp2x1293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/4sp2x1293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/4sp2x1293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/53gjz1293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/53gjz1293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/63gjz1293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/63gjz1293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/7v7ik1293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/7v7ik1293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/8v7ik1293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/8v7ik1293206190.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/96yz51293206190.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t12932060758qoxu9owcm6lem7/96yz51293206190.ps (open in new window)


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