Home » date » 2010 » Dec » 02 »

Workshop 4

*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 10:27:01 +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/t1291286474ib52he2zhoacpt8.htm/, Retrieved Thu, 02 Dec 2010 11:41:30 +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/t1291286474ib52he2zhoacpt8.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 12 12 8 13 5 15 10 12 16 6 12 9 7 12 6 10 10 10 11 5 12 12 7 12 3 15 13 16 18 8 9 12 11 11 4 12 12 14 14 4 11 6 6 9 4 11 5 16 14 6 11 12 11 12 6 15 11 16 11 5 7 14 12 12 4 11 14 7 13 6 11 12 13 11 4 10 12 11 12 6 14 11 15 16 6 10 11 7 9 4 6 7 9 11 4 11 9 7 13 2 15 11 14 15 7 11 11 15 10 5 12 12 7 11 4 14 12 15 13 6 15 11 17 16 6 9 11 15 15 7 13 8 14 14 5 13 9 14 14 6 16 12 8 14 4 13 10 8 8 4 12 10 14 13 7 14 12 14 15 7 11 8 8 13 4 9 12 11 11 4 16 11 16 15 6 12 12 10 15 6 10 7 8 9 5 13 11 14 13 6 16 11 16 16 7 14 12 13 13 6 15 9 5 11 3 5 15 8 12 3 8 11 10 12 4 11 11 8 12 6 16 11 13 14 7 17 11 15 14 5 9 15 6 8 4 9 11 12 13 5 13 12 16 16 6 10 12 5 13 6 6 9 15 11 6 12 12 12 14 5 8 12 8 13 4 14 13 13 13 5 12 11 14 13 5 11 9 12 12 4 16 9 16 16 6 8 11 10 15 2 15 11 15 15 8 7 12 8 12 3 16 12 16 14 6 14 9 19 12 6 16 11 14 15 6 9 9 6 12 5 14 12 13 13 5 11 12 15 12 6 13 12 7 12 5 15 12 13 13 6 5 14 4 5 2 15 11 14 13 5 13 12 13 13 5 11 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 time13 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 0.311900251104237 + 0.0962538968572746FindingFriends[t] + 0.243370280084765KnowingPeople[t] + 0.351380635996807Liked[t] + 0.627591839447788Celebrity[t] -0.000729053587325985t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.3119002511042371.4303540.21810.827680.41384
FindingFriends0.09625389685727460.0966810.99560.3210550.160528
KnowingPeople0.2433702800847650.0616163.94980.000126e-05
Liked0.3513806359968070.0976573.59810.0004350.000217
Celebrity0.6275918394477880.1565554.00889.6e-054.8e-05
t-0.0007290535873259850.003824-0.19070.849050.424525


Multiple Linear Regression - Regression Statistics
Multiple R0.706626862823286
R-squared0.499321523263479
Adjusted R-squared0.482632240705595
F-TEST (value)29.918693121269
F-TEST (DF numerator)5
F-TEST (DF denominator)150
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.11226554360225
Sum Squared Residuals669.249859003394


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.42037956415001.57962043585001
21211.11835861209240.881641387907585
31513.58033663256781.41966336743221
41210.86097973771211.13902026228785
51010.7076429457918-0.707642945791806
6129.265507802765972.73449219723403
71516.7976081800186-1.79760818001857
8910.5137420193814-1.51374201938136
91212.2972657140387-0.297265714038744
10118.015147858645632.98485214135437
111113.3639545679283-2.36395456792827
121112.1173901199244-1.11739011992444
131512.25828609445912.74171390554094
14711.2966264076535-4.29662640765352
151111.6856102685348-0.685610268534754
161110.99465015085230.00534984914772031
171012.1137448519878-2.11374485198781
181414.3957655658695-0.395765565869487
19108.733226140730831.26677385926917
2069.53698333187755-3.53698333187755
21118.689599104933282.31040089506672
221514.42569027488640.5743097251136
231111.6562446425042-0.656244642504234
24129.528596041645082.47140395835491
251413.43277417962510.567225820374939
261514.87667369734040.123326302659592
27914.6654152870345-5.66541528703453
281312.52598994789820.47401005210176
291313.2491066306160-0.249106630615976
301610.82173390819635.17826609180369
31138.52021324491364.4797867550864
321213.6193845701623-1.61938457016225
331414.5139245822831-0.513924582283088
341110.08242147042110.917578529578896
35910.4940575725236-1.49405757252356
361614.27463224538561.72536775461442
371212.9099354081469-0.909935408146939
38109.205320654675090.794679345324912
391313.0829432524605-0.0829432524604587
401615.25068850648090.749311493519133
411412.93436876205831.06563123794168
42158.112378986884086.88762101311592
4359.7706647906915-4.7706647906915
44810.4992525492924-2.49925254929239
451111.2669666144311-0.26696661443111
461613.8134420727092.18655792729099
471713.04426990039563.95573009960437
4898.50234825804590.497651741954098
49911.9613203169699-2.96132031696988
501314.7120600280171-1.71206002801709
511010.9801159855069-0.980115985506941
52612.4215667702018-6.42156677020182
531212.4060386354747-0.406038635474659
54810.4528559861037-2.45285598610368
551412.39282406924521.60717593075476
561212.4429575020281-0.44295750202813
571110.78400761911210.215992380887868
581614.41746590874671.58253409125334
59810.2872749745773-2.28727497457734
601515.2689483581006-0.268948358100564
6179.4687801355478-2.46878013554781
621614.00055011297561.99944988702443
631413.73840893707710.261591062922897
641613.76747818477092.23252181522908
6599.94554534935273-0.945545349352725
661412.28855058292741.71144941707262
671113.0507732929606-2.05077329296056
681310.47549015924732.52450984075266
691512.91395526161322.08604473838681
7055.59398903521193-0.593989035211934
711512.43202169821822.56797830178176
721312.28417626140340.715823738596576
731112.0518333867861-1.0518333867861
741113.9816794366049-2.9816794366049
751212.4737028662899-0.47370286628992
761213.3955924466714-1.39559244667144
771212.2687745344120-0.268774534412027
781211.89478635245040.105213647549630
791410.78601028241733.21398971758266
8067.98921508177449-1.98921508177449
8179.8384206231643-2.83842062316431
821411.97557354783752.0244264521625
831413.86163652252380.138363477476231
841011.2447986284746-1.24479862847463
85138.721172009197694.27882799080231
861212.4030643314044-0.403064331404351
8799.27840141287423-0.278401412874232
881212.0072626315439-0.00726263154391892
891615.00443552398330.995564476016654
901010.2223458041906-0.22234580419063
911413.12569325357090.874306746429133
921013.5036944042410-3.50369440424103
931615.30830256320990.691697436790136
941513.43333196846981.56666803153022
951211.33303293587130.666967064128683
96109.719474463442380.280525536557622
97810.2219397561188-2.22193975611881
9888.59192749759564-0.591927497595643
991112.8256077791949-1.8256077791949
1001312.40461404023660.595385959763445
1011615.44958651773870.550413482261253
1021614.70699016484241.29300983515764
1031415.8120595336817-1.81205953368174
104118.866192833320752.13380716667925
10546.94035975221046-2.94035975221046
1061414.5624489223711-0.562448922371101
107910.3242273530674-1.32422735306736
1081415.2339537859089-1.23395378590892
109810.4307796018048-2.43077960180475
110810.8768910530054-2.87689105300543
1111112.1712457336952-1.17124573369520
1121213.6119227695464-1.61192276954639
1131111.4216552232623-0.421655223262259
1141413.58390912217710.416090877822868
1151514.31878226394960.681217736050366
1161613.37818676223322.62181323776684
1171613.47371160550312.52628839449689
1181112.7155221434008-1.71552214340081
1191413.71562377841320.284376221586775
1201410.93058503682513.06941496317486
1211211.37749051609190.622509483908102
1221412.53019988943731.46980011056266
123810.1982870358089-2.19828703580887
1241313.8082324073339-0.80823240733387
1251613.71124945688932.28875054311073
1261210.89259604309131.10740395690872
1271615.42436602051900.575633979480961
1281213.3576816601305-1.35768166013049
1291111.4788744152393-0.478874415239257
13046.36326604189703-2.36326604189703
1311615.42144980616970.578550193830265
1321512.52840070866962.47159929133039
1331011.4494026606953-1.44940266069535
1341313.1788413871184-0.178841387118357
1351513.21721836084651.78278163915352
1361210.63644387202771.36355612797228
1371413.60624691698410.393753083015917
138710.6294944097475-3.62949440974753
1391914.05242334266354.94757665733649
1401212.6368437398323-0.636843739832278
1411212.2401366678272-0.240136667827162
1421313.4554852658200-0.455485265819963
1431512.90233380533072.09766619466933
14488.22180947772168-0.221809477721681
1451210.87325266982651.12674733017345
1461010.7637395114835-0.763739511483482
147811.3640264779270-3.36402647792696
1481014.3346235509494-4.3346235509494
1491513.84086855402091.15913144597906
1501614.56947659184421.43052340815579
1511313.1421405299582-0.142140529958206
1521615.02191812147290.978081878527133
153910.1764154281891-1.17641542818909
1541413.11886890488480.88113109511522
1551412.64699240033381.35300759966616
1561210.10854642069471.89145357930532


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.02712889731447250.05425779462894510.972871102685527
100.02373201601878230.04746403203756460.976267983981218
110.05007464839441330.1001492967888270.949925351605587
120.03368950223637940.06737900447275880.96631049776362
130.437716993543970.875433987087940.56228300645603
140.6316563046021750.736687390795650.368343695397825
150.5644064685689580.8711870628620840.435593531431042
160.4898538966176380.9797077932352770.510146103382362
170.4071749612637090.8143499225274170.592825038736291
180.3752283278886800.7504566557773590.62477167211132
190.3234242980174950.646848596034990.676575701982505
200.4507550203133340.9015100406266680.549244979686666
210.4552502339366950.910500467873390.544749766063305
220.4980670159275540.9961340318551080.501932984072446
230.4363715860395890.8727431720791780.563628413960411
240.4545691245820360.9091382491640710.545430875417964
250.4303559148050240.8607118296100480.569644085194976
260.376137803284550.75227560656910.62386219671545
270.6071415742230360.7857168515539280.392858425776964
280.5582137086585040.8835725826829920.441786291341496
290.5018775261643090.9962449476713820.498122473835691
300.6806149782735160.6387700434529670.319385021726484
310.784874824073710.4302503518525820.215125175926291
320.7475318694581150.5049362610837710.252468130541885
330.6991622362990250.6016755274019510.300837763700975
340.6635366045134890.6729267909730220.336463395486511
350.6696571087682660.6606857824634670.330342891231734
360.6770310108730870.6459379782538270.322968989126913
370.6441962705471460.7116074589057070.355803729452854
380.5944451175840890.8111097648318220.405554882415911
390.5402475193488690.9195049613022630.459752480651131
400.5109253844648880.9781492310702240.489074615535112
410.4702767250187340.9405534500374680.529723274981266
420.7359325275743310.5281349448513380.264067472425669
430.9498969266616530.1002061466766940.0501030733383468
440.9618637636256220.07627247274875540.0381362363743777
450.9504794200293230.0990411599413530.0495205799706765
460.956121562441370.0877568751172590.0438784375586295
470.9780050416388570.04398991672228550.0219949583611428
480.9709778518565930.05804429628681460.0290221481434073
490.979869971208340.04026005758331850.0201300287916592
500.9768820692080470.04623586158390680.0231179307919534
510.9721887475291550.05562250494169060.0278112524708453
520.997313877436860.005372245126281980.00268612256314099
530.9961461927906140.007707614418772320.00385380720938616
540.996909857342270.006180285315461410.00309014265773070
550.9967891747919470.006421650416106370.00321082520805318
560.995474626740240.00905074651952010.00452537325976005
570.9936557628918140.01268847421637140.00634423710818572
580.9929661867861520.01406762642769520.0070338132138476
590.9945914439920650.01081711201586960.0054085560079348
600.9929280109472370.01414397810552680.00707198905276341
610.9937939122155120.01241217556897650.00620608778448825
620.9944798961762630.01104020764747420.00552010382373709
630.9926749290423060.01465014191538760.00732507095769381
640.9931953130628560.01360937387428730.00680468693714367
650.991362425086320.01727514982736100.00863757491368051
660.9906063599090930.01878728018181460.00939364009090729
670.990515114431230.01896977113753760.00948488556876878
680.9920123112137370.01597537757252560.00798768878626282
690.9921592761377870.01568144772442580.0078407238622129
700.9894755957305780.02104880853884440.0105244042694222
710.991146581644350.01770683671129940.0088534183556497
720.9883631806332680.02327363873346360.0116368193667318
730.9853943801996670.02921123960066690.0146056198003334
740.989423409464030.02115318107193910.0105765905359696
750.9857333151283550.02853336974329050.0142666848716452
760.9832710566093790.03345788678124280.0167289433906214
770.9779924896479920.04401502070401590.0220075103520080
780.970991389696050.05801722060790150.0290086103039507
790.9817652488847430.03646950223051450.0182347511152572
800.9808862149799350.03822757004013030.0191137850200652
810.9840648936251040.0318702127497930.0159351063748965
820.9850011894587430.02999762108251480.0149988105412574
830.9799193938455650.0401612123088690.0200806061544345
840.975301719085280.04939656182943950.0246982809147198
850.9935872347096980.01282553058060380.00641276529030189
860.9911351101146010.01772977977079740.00886488988539868
870.988020449050020.02395910189995880.0119795509499794
880.9843528530299840.03129429394003280.0156471469700164
890.9805943928199380.03881121436012480.0194056071800624
900.9745712936747540.05085741265049270.0254287063252463
910.9701027085906160.05979458281876730.0298972914093836
920.9817541493793390.03649170124132250.0182458506206612
930.9764739227590290.04705215448194230.0235260772409712
940.9736869171707830.05262616565843470.0263130828292174
950.967493542405080.06501291518984060.0325064575949203
960.9599840934920070.08003181301598690.0400159065079935
970.9562319242184290.08753615156314230.0437680757815712
980.9446532935513370.1106934128973270.0553467064486635
990.9395514308045070.1208971383909870.0604485691954934
1000.9271862288156380.1456275423687250.0728137711843623
1010.909654431578330.1806911368433400.0903455684216701
1020.8974776614051540.2050446771896920.102522338594846
1030.899061654614460.2018766907710800.100938345385540
1040.9348483751247250.1303032497505490.0651516248752747
1050.9313246359837920.1373507280324160.0686753640162081
1060.9125493563558660.1749012872882680.0874506436441342
1070.8930246516619960.2139506966760090.106975348338004
1080.8843853500420880.2312292999158240.115614649957912
1090.8804341743548570.2391316512902860.119565825645143
1100.9022293013752040.1955413972495930.0977706986247963
1110.8930334521576350.2139330956847300.106966547842365
1120.9279799681029920.1440400637940170.0720200318970083
1130.906831134639830.1863377307203400.0931688653601698
1140.8837075208867270.2325849582265460.116292479113273
1150.856362593656430.2872748126871390.143637406343570
1160.8519843457937220.2960313084125570.148015654206278
1170.8569680719491570.2860638561016850.143031928050843
1180.850915776108260.298168447783480.14908422389174
1190.8165680625414690.3668638749170620.183431937458531
1200.8634311813469330.2731376373061340.136568818653067
1210.8368959783772140.3262080432455730.163104021622786
1220.8152185525962040.3695628948075930.184781447403796
1230.8021976817511860.3956046364976280.197802318248814
1240.7615172467187930.4769655065624140.238482753281207
1250.7639329777113370.4721340445773260.236067022288663
1260.7547771027604870.4904457944790250.245222897239513
1270.7011668072798280.5976663854403450.298833192720172
1280.6643111428464830.6713777143070350.335688857153517
1290.6792176729310710.6415646541378590.320782327068929
1300.6809763611633670.6380472776732670.319023638836633
1310.6294336847444620.7411326305110760.370566315255538
1320.6013179625406320.7973640749187360.398682037459368
1330.5885623634079120.8228752731841760.411437636592088
1340.5139805165097810.9720389669804380.486019483490219
1350.4714562936929490.9429125873858970.528543706307051
1360.4614565555723940.9229131111447880.538543444427606
1370.3862474605728050.772494921145610.613752539427195
1380.4582887563736840.9165775127473680.541711243626316
1390.8190632535879590.3618734928240830.180936746412041
1400.8259053894498170.3481892211003660.174094610550183
1410.7893785805205820.4212428389588360.210621419479418
1420.7197478789426480.5605042421147040.280252121057352
1430.6574406502340450.6851186995319090.342559349765955
1440.5424511513979690.9150976972040620.457548848602031
1450.6207548605704030.7584902788591950.379245139429597
1460.7729885932620240.4540228134759510.227011406737976
1470.6304131595792410.7391736808415180.369586840420759


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0359712230215827NOK
5% type I error level430.309352517985612NOK
10% type I error level570.410071942446043NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286474ib52he2zhoacpt8/10ul881291285607.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286474ib52he2zhoacpt8/10ul881291285607.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286474ib52he2zhoacpt8/15ktw1291285607.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286474ib52he2zhoacpt8/15ktw1291285607.ps (open in new window)


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


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


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


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


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


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


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


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