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:21:29 +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/t1293203993nm7y1rh06agx4cj.htm/, Retrieved Fri, 24 Dec 2010 16:20:05 +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/t1293203993nm7y1rh06agx4cj.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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 1.04499634277411 + 0.119499232591394FindingFriends[t] + 0.241564101757528KnowingPeople[t] + 0.378018708974302Liked[t] + 0.607491789609728Celebrity[t] -0.0489828130821504B[t] + 0.174147430517712`2B`[t] + 0.508543630098061`3B`[t] -0.136999283939156Month[t] -0.00188085357862904t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.044996342774113.9280530.2660.7905880.395294
FindingFriends0.1194992325913940.0968751.23350.2193570.109678
KnowingPeople0.2415641017575280.0619263.90080.0001467.3e-05
Liked0.3780187089743020.0980763.85430.0001738.7e-05
Celebrity0.6074917896097280.1571963.86450.0001678.3e-05
B-0.04898281308215040.224347-0.21830.8274730.413736
`2B`0.1741474305177120.2708020.64310.5211810.26059
`3B`0.5085436300980610.3186461.5960.1126610.056331
Month-0.1369992839391560.40264-0.34030.7341560.367078
t-0.001880853578629040.00416-0.45220.6518250.325912


Multiple Linear Regression - Regression Statistics
Multiple R0.717470503794906
R-squared0.514763923815717
Adjusted R-squared0.484852110900247
F-TEST (value)17.2093856454115
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.10188999122863
3911.2935847722229-2.29358477222292
41012.0768505287867-2.07685052878672
51313.1972017006551-0.197201700655100
61615.23199391025050.768006089749506
71412.93235488054021.06764511945981
81613.92164991038982.07835008961024
91010.9960803593227-0.996080359322713
10810.7774869517918-2.77748695179182
111212.2534224487608-0.253422448760775
121515.1206012967996-0.120601296799614
131410.91343252661423.08656747338582
141412.82942739465961.17057260534035
151213.0880808678829-1.08808086788290
161211.19028997970290.809710020297105
17109.597705554859050.402294445140954
1846.79756754087376-2.79756754087376
191415.2815827522669-1.28158275226692
201514.27088831485400.729111685146033
211613.38860645723212.61139354276794
221210.76005023718971.23994976281026
231212.1554714328047-0.155471432804704
241211.33224883137040.667751168629636
251211.54274803474340.457251965256587
261212.3012178940586-0.301217894058613
27118.469625337886922.53037466211308
281113.1100905284140-2.11009052841396
291112.1549938067566-1.15499380675656
301111.8038737203049-0.803873720304908
311111.4519360188544-0.451936018854355
32118.64748407431622.35251592568380
331514.36904676422030.630953235779697
341514.86238513527880.137614864721169
35914.6068491588206-5.60684915882057
361610.83302474772725.16697525227284
37139.180871666253413.81912833374659
38910.3709164058374-1.37091640583742
391614.23339805665391.76660194334614
401212.9016318251215-0.901631825121455
41159.015969820450745.98403017954927
4259.81670811647123-4.81670811647123
431111.4096349362273-0.409634936227334
441713.24724842329033.75275157670972
4599.10604536654858-0.106045366548582
461314.7177500231691-1.71775002316915
471614.22037218787721.77962781212282
481613.82095161412412.17904838587587
491414.3483495841271-0.348349584127119
501613.54359836675262.45640163324742
511112.8177075336821-1.81770753368211
521111.8786166688209-0.878616668820854
531113.7454798740905-2.74547987409047
541212.2263929114652-0.226392911465155
551213.8219110758755-1.82191107587552
561212.0787466070131-0.078746607013105
571413.71586981200110.284130187998903
581010.8938292706448-0.89382927064478
5999.36948662402635-0.369486624026353
601212.2721352488986-0.272135248898607
611010.0150315755398-0.015031575539804
621412.98177323883541.01822676116463
6389.91845471742309-1.91845471742309
641614.48582154061041.51417845938958
651415.7326316930428-1.73263169304281
661410.73031961291923.26968038708076
671211.22595670090630.774043299093691
681413.37328839512050.626711604879522
69711.1119568444562-4.11195684445617
701913.91602744261115.08397255738893
711512.83561761702982.16438238297025
72811.2358065245671-3.23580652456708
731014.2688825796494-4.26888257964936
741312.91576686209370.0842331379063027
751311.34304480271321.65695519728685
761010.4753560056011-0.475356005601083
77129.150816441687512.84918355831249
781517.4307739990282-2.43077399902825
79711.1523826850283-4.15238268502825
801414.2927376671468-0.292737667146839
81108.497229457468421.50277054253158
8269.778959586541-3.77895958654100
831111.3135254367911-0.31352543679111
84129.367123547272532.63287645272747
851414.2858637651183-0.285863765118304
861213.3938248740130-1.39382487401296
871414.3869799035657-0.386979903565729
881110.12953395716970.870466042830311
89109.312802406856970.687197593143026
901313.4068525327782-0.406852532778176
91810.3371693538776-2.33716935387761
92911.8039272023981-2.80392720239807
93612.0021952766312-6.00219527663121
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.225598372184357
1041512.15468487030172.84531512969832
1051312.17768758680340.822312413196627
1061211.52366237234150.476337627658545
10767.68133413696577-1.68133413696577
10879.56300248642058-2.56300248642058
109138.470501639717164.52949836028284
1101614.8198781617721.180121838228
1111013.2362850097808-3.23628500978083
1121615.06410619265020.935893807349795
1131513.08167895735621.91832104264385
11488.30768738998187-0.307687389981865
1151112.5043362098399-1.50433620983993
1161313.1382002746666-0.138200274666611
1171615.12778398084100.872216019158957
118118.592594201301022.40740579869898
1191414.3285466292558-0.328546629255758
120910.1143989090423-1.11439890904234
121810.1727908583271-2.17279085832707
122811.0159195208167-3.01591952081667
1231111.7691753077400-0.769175307740024
1241213.1879187906606-1.18791879066065
1251110.92809901144900.0719009885509587
1261414.5188061294066-0.518806129406618
1271112.5720705896542-1.57207058965423
1281412.18745488768411.81254511231592
1291314.6398066696386-1.63980666963858
1301210.64358881349151.35641118650846
13145.77603215019459-1.77603215019459
1321512.78391099937502.21608900062505
1331011.2696200846096-1.26962008460959
1341313.7567513171914-0.756751317191425
1351514.07487692514250.925123074857496
1361213.1336737189485-1.13367371894854
1371313.1704274421111-0.170427442111091
13887.724158465305690.275841534694312
1391010.3945396148313-0.394539614831347
1401513.52841385229891.47158614770114
1411614.27277811247531.72722188752472
1421614.76611648353381.23388351646619
1431412.81503436091581.18496563908423
1441412.91543306405431.08456693594569
1451210.51493016471281.48506983528721
1461513.10381478894741.89618521105255
1471312.83683771782230.163162282177728
1481613.03023882015482.96976117984522
1491413.38942130092510.61057869907493
15089.84763560704182-1.84763560704182
1511613.55980702428552.44019297571448
1521615.74694388313330.253056116866661
1531213.0038791776363-1.00387917763625
1541112.1176937259202-1.11769372592018
1551615.74130132239750.258698677602548
15699.83635048557004-0.836350485570045


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.5652350178937870.8695299642124250.434764982106213
140.3958443088041280.7916886176082560.604155691195872
150.2695099681347230.5390199362694450.730490031865277
160.1866369674411240.3732739348822480.813363032558876
170.1202391393883440.2404782787766890.879760860611656
180.2170170241590830.4340340483181650.782982975840917
190.3642432927011710.7284865854023420.635756707298829
200.2750050187130930.5500100374261850.724994981286907
210.2830881042085190.5661762084170380.716911895791481
220.2108870105713010.4217740211426010.7891129894287
230.1766944787215410.3533889574430830.823305521278459
240.1256549829147800.2513099658295600.87434501708522
250.08664178288384180.1732835657676840.913358217116158
260.07658123655360470.1531624731072090.923418763446395
270.0671015388700470.1342030777400940.932898461129953
280.1724156868602410.3448313737204820.827584313139759
290.1444939221843160.2889878443686330.855506077815684
300.11483698477960.22967396955920.8851630152204
310.08478095357321460.1695619071464290.915219046426785
320.07287112601724750.1457422520344950.927128873982753
330.05180763821153380.1036152764230680.948192361788466
340.03792182297567920.07584364595135830.962078177024321
350.2251574135599480.4503148271198960.774842586440052
360.446130916308310.892261832616620.55386908369169
370.5778616877575120.8442766244849750.422138312242488
380.5247598800173550.950480239965290.475240119982645
390.4958802109014190.9917604218028380.504119789098581
400.467811263222470.935622526444940.53218873677753
410.6990230712026160.6019538575947680.300976928797384
420.858815487243760.282369025512480.14118451275624
430.8271550144032850.345689971193430.172844985596715
440.8635799939660960.2728400120678080.136420006033904
450.8371863358444030.3256273283111940.162813664155597
460.8362284039390230.3275431921219540.163771596060977
470.814300414805880.3713991703882380.185699585194119
480.8244099017550580.3511801964898840.175590098244942
490.7893521484790740.4212957030418510.210647851520926
500.7958030661184760.4083938677630470.204196933881524
510.772248233313520.4555035333729590.227751766686479
520.759289056428260.481421887143480.24071094357174
530.8659444633488770.2681110733022470.134055536651123
540.8361709755231480.3276580489537050.163829024476852
550.8271987617765060.3456024764469890.172801238223494
560.7961078180274850.4077843639450290.203892181972515
570.7594858279383050.4810283441233910.240514172061695
580.719117428808090.5617651423838190.280882571191910
590.6853803880948980.6292392238102030.314619611905102
600.6643864537570870.6712270924858270.335613546242913
610.6185215286830770.7629569426338450.381478471316923
620.5853349576214230.8293300847571550.414665042378577
630.5585494112235170.8829011775529660.441450588776483
640.5595711236060920.8808577527878170.440428876393908
650.5475531397292450.904893720541510.452446860270755
660.6329817735288180.7340364529423650.367018226471182
670.5959829545743420.8080340908513160.404017045425658
680.5614067588642460.8771864822715090.438593241135754
690.6971394199481960.6057211601036080.302860580051804
700.8813087962970560.2373824074058890.118691203702944
710.8928182445796780.2143635108406450.107181755420322
720.907673365353170.1846532692936590.0923266346468293
730.948426166920060.1031476661598780.0515738330799391
740.9361565955069570.1276868089860850.0638434044930427
750.9290241534020110.1419516931959790.0709758465979893
760.9114996921399890.1770006157200230.0885003078600114
770.9328447570867610.1343104858264780.0671552429132392
780.9349125949264110.1301748101471780.0650874050735889
790.971123681288190.05775263742361940.0288763187118097
800.962142946066610.07571410786678120.0378570539333906
810.9594313573635020.08113728527299510.0405686426364976
820.9774806159062630.04503876818747370.0225193840937368
830.971217521018390.0575649579632190.0287824789816095
840.9771422693229260.04571546135414840.0228577306770742
850.9697949881195060.06041002376098890.0302050118804944
860.9631847755667660.07363044886646760.0368152244332338
870.9530744498872890.09385110022542190.0469255501127109
880.9459700041059750.1080599917880500.0540299958940251
890.9504682599157450.09906348016851030.0495317400842551
900.9373629049542420.1252741900915170.0626370950457583
910.9348604912144440.1302790175711120.065139508785556
920.9540560486926250.09188790261475080.0459439513073754
930.9960636147665980.007872770466803920.00393638523340196
940.9944025292079580.01119494158408380.00559747079204192
950.9935805665140580.01283886697188480.00641943348594238
960.9914058202051380.01718835958972320.0085941797948616
970.9914305636886120.01713887262277680.00856943631138839
980.9924870527849440.01502589443011130.00751294721505564
990.9894697292720890.02106054145582210.0105302707279111
1000.9883058069830680.02338838603386480.0116941930169324
1010.9923255202242630.01534895955147390.00767447977573696
1020.9927270052297160.01454598954056830.00727299477028416
1030.9898969715692950.02020605686141030.0101030284307051
1040.9928251648717350.01434967025653070.00717483512826537
1050.9899494082745730.02010118345085460.0100505917254273
1060.9872666177464580.02546676450708420.0127333822535421
1070.985281666146470.02943666770706140.0147183338535307
1080.9897177397141850.02056452057162990.0102822602858150
1090.9989839938287670.002032012342466830.00101600617123342
1100.9986715678116050.002656864376789470.00132843218839473
1110.9995775553514220.0008448892971559760.000422444648577988
1120.9993048291287390.001390341742523010.000695170871261506
1130.9992934582974520.001413083405095460.000706541702547729
1140.9988433619189880.002313276162024000.00115663808101200
1150.9982662994649720.003467401070055580.00173370053502779
1160.997134693425850.005730613148298910.00286530657414946
1170.995571155669910.008857688660180590.00442884433009030
1180.999285753840140.001428492319720000.000714246159859999
1190.998756898382330.002486203235338790.00124310161766940
1200.9979066340330360.004186731933927490.00209336596696375
1210.997375158216690.005249683566618170.00262484178330908
1220.9966283230390090.00674335392198270.00337167696099135
1230.9947249008402540.01055019831949250.00527509915974623
1240.9946227046848370.01075459063032610.00537729531516306
1250.9911118586567290.01777628268654280.00888814134327138
1260.987067373375360.02586525324928000.0129326266246400
1270.9836509421863660.0326981156272680.016349057813634
1280.975891995263840.0482160094723220.024108004736161
1290.9876906715339190.02461865693216190.0123093284660809
1300.9897892192266070.02042156154678520.0102107807733926
1310.9848997658581250.03020046828375060.0151002341418753
1320.9819961069316690.03600778613666150.0180038930683308
1330.974884054550830.05023189089834130.0251159454491706
1340.962213970710840.07557205857831990.0377860292891600
1350.9378786285014610.1242427429970780.0621213714985389
1360.9538394773033850.09232104539322980.0461605226966149
1370.9721441799188520.05571164016229580.0278558200811479
1380.9475841741985940.1048316516028120.0524158258014058
1390.904257992527850.1914840149443010.0957420074721503
1400.8538580446191890.2922839107616220.146141955380811
1410.7731204477397170.4537591045205660.226879552260283
1420.7099513496636820.5800973006726360.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/t1293203993nm7y1rh06agx4cj/10l6vl1293204076.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/10l6vl1293204076.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/37wfc1293204076.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/37wfc1293204076.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/47wfc1293204076.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/47wfc1293204076.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/57wfc1293204076.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/57wfc1293204076.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/60owy1293204076.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203993nm7y1rh06agx4cj/60owy1293204076.ps (open in new window)


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


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


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