Home » date » 2010 » Dec » 22 »

Multiple regression

*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: Wed, 22 Dec 2010 17:19:07 +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/22/t12930382988wb82in3b78d6iu.htm/, Retrieved Wed, 22 Dec 2010 18:18:18 +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/22/t12930382988wb82in3b78d6iu.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 «
41 38 13 12 14 12 39 32 16 11 18 11 30 35 19 15 11 14 31 33 15 6 12 12 34 37 14 13 16 21 35 29 13 10 18 12 39 31 19 12 14 22 34 36 15 14 14 11 36 35 14 12 15 10 37 38 15 6 15 13 38 31 16 10 17 10 36 34 16 12 19 8 38 35 16 12 10 15 39 38 16 11 16 14 33 37 17 15 18 10 32 33 15 12 14 14 36 32 15 10 14 14 38 38 20 12 17 11 39 38 18 11 14 10 32 32 16 12 16 13 32 33 16 11 18 7 31 31 16 12 11 14 39 38 19 13 14 12 37 39 16 11 12 14 39 32 17 9 17 11 41 32 17 13 9 9 36 35 16 10 16 11 33 37 15 14 14 15 33 33 16 12 15 14 34 33 14 10 11 13 31 28 15 12 16 9 27 32 12 8 13 15 37 31 14 10 17 10 34 37 16 12 15 11 34 30 14 12 14 13 32 33 7 7 16 8 29 31 10 6 9 20 36 33 14 12 15 12 29 31 16 10 17 10 35 33 16 10 13 10 37 32 16 10 15 9 34 33 14 12 16 14 38 32 20 15 16 8 35 33 14 10 12 14 38 28 14 10 12 11 37 35 11 12 11 13 38 39 14 13 15 9 33 34 15 11 15 11 36 38 16 11 17 15 38 32 14 12 13 11 32 38 16 14 16 10 32 30 14 10 14 14 32 33 12 12 11 18 34 38 16 13 12 14 32 32 9 5 12 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Happiness[t] = + 15.4893520503043 + 0.0216155702168623Connected[t] + 0.0649005494285598Separate[t] + 0.0731669569957836Learning[t] -0.0475755057203567Software[t] -0.385554294834322Depression[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)15.48935205030432.2778046.800100
Connected0.02161557021686230.0506780.42650.6703120.335156
Separate0.06490054942855980.047061.37910.169840.08492
Learning0.07316695699578360.0853030.85770.3923580.196179
Software-0.04757550572035670.086735-0.54850.5841210.29206
Depression-0.3855542948343220.050539-7.628800


Multiple Linear Regression - Regression Statistics
Multiple R0.559914901167637
R-squared0.313504696549565
Adjusted R-squared0.291501641951794
F-TEST (value)14.2482351782799
F-TEST (DF numerator)5
F-TEST (DF denominator)156
p-value1.75743863906064e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.96762793629027
Sum Squared Residuals603.963312524505


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11414.5954241417700-0.595424141769973
21814.81542037630693.18457962369312
31113.6881178562438-2.68811785624375
41214.4865526407722-2.48655264077222
51610.93481739858995.06518260141014
61813.97677678705244.02322321294757
71410.68134794896783.31865205103223
81414.7510512487800-0.751051248779952
91515.1369201890644-0.136920189064369
101514.55519451438190.444805485618133
111715.16203405721611.83796594278386
121915.98946214329603.01053785670398
131013.3987137693181-3.39871376931805
141614.04816078837531.95183921162473
151815.27864893109722.72135106890282
161413.45160658699830.548393413001706
171413.56831932987790.431680670122103
181715.42830042492421.57169957507585
191415.7367118817041-1.73671188170413
201613.84542728939982.15457271060016
211816.27122911355471.72877088644531
221113.3733568749201-2.37335687492010
231414.9436192375906-0.943619237590552
241214.0698301973701-2.06983019737010
251714.98373834474342.01626165525662
26915.6077760519643-6.60777605196432
271614.99285081966231.00714918033767
281413.25211904865440.74788095134564
291513.54638911421091.45361088578906
301113.9023760767113-2.90237607671127
311615.03325974381020.966740256189755
321312.86387504354520.136124956454824
331714.99408457300772.00591542699229
341514.9842697666450.015730233354991
351413.61252341698490.387476583015122
361615.41747422863970.582525771360257
37910.8632512578279-1.86325125782788
381514.23601050053860.763989499461395
391714.96749392526442.03250607473563
401315.2269884454227-2.22698844542267
411515.5908733312622-0.590873331262156
421613.42167077043622.57832922956377
431616.0528334956947-0.0528334956946907
441213.5384373520938-1.53843735209381
451214.4354442001046-2.43544420010457
461113.7823720037909-2.78237200379091
471515.7777323163263-0.777732316326299
481514.74236109686700.257638903132960
491713.59775978289043.40224021710964
501314.5998953863781-1.59989538637809
511615.29634245903350.703657540966547
521413.27888899315750.721111006842455
531111.6898885366737-0.689888536673653
541213.8449319258502-1.84493192585024
551214.4373957201405-2.43739572014050
561514.47817855564900.521821444350952
571614.1265373797751.87346262022500
581515.4525988569437-0.452598856943663
591215.3441787714259-3.34417877142593
601213.3641175206796-1.36411752067962
61810.7889235880303-2.78892358803027
621314.4904761043925-1.49047610439246
631114.3737633615129-3.37376336151285
641413.53420066436310.465799335636875
651513.8237578804051.17624211959499
661015.0314767881373-5.0314767881373
671112.6355569417665-1.63555694176653
681214.0571571163696-2.05715711636956
691514.22327284836320.77672715163678
701513.84922245235891.15077754764110
711413.98602318932200.0139768106780217
721613.34334801781452.65665198218552
731514.39414517838430.605854821615662
741515.7670714426119-0.767071442611874
751314.3352642723594-1.33526427235941
761211.76950288721170.230497112788324
771714.23043238190662.76956761809341
781312.32911620678810.670883793211928
791513.47456358811651.52543641188352
801315.1712195726786-2.17121957267864
811514.89775364699960.102246353000413
821615.79223914954160.207760850458387
831515.7769939265305-0.776993926530516
841614.33079302775131.66920697224875
851514.33519123181590.664808768184144
861413.89729332162890.102706678371143
871514.42581715987040.574182840129564
881414.3823982533081-0.382398253308145
891313.0094719890806-0.00947198908060875
90710.3887877985406-3.38878779854058
911713.93347260607523.06652739392485
921313.0912214204334-0.0912214204333582
931514.49437894490750.505621055092534
941412.74154954502121.25845045497883
951314.5879414934078-1.58794149340775
961615.12259807974150.877401920258526
971212.9439683985465-0.943968398546507
981414.7592085574516-0.759208557451583
991714.85441482900992.14558517099008
1001515.2105094690662-0.210509469066193
1011715.29623478147751.70376521852249
1021213.0391194099872-1.03911940998722
1031614.79188792306651.20811207693352
1041114.3313422300788-3.33134223007882
1051513.2122593268341.78774067316599
106911.4855252111415-2.48552521114145
1071615.01409790565110.985902094348878
1081513.33760838284861.66239161715145
1091013.4030581346047-3.40305813460468
1101010.4363165135120-0.436316513512027
1111513.54644295298891.45355704701109
1121113.0224526675022-2.02245266750218
1131315.3213832866417-2.32138328664166
1141412.96729388389281.03270611610724
1151814.27134371763323.72865628236683
1161615.20892643325830.79107356674167
1171413.80678354049890.193216459501065
1181414.4518309341519-0.451830934151903
1191415.4320363219727-1.43203632197268
1201413.46361431874660.536385681253391
1211213.2485116518239-1.24851165182386
1221413.06617917148550.9338208285145
1231514.98103227538220.0189677246177731
1241516.1755288997864-1.17552889978641
1251514.45250843714060.547491562859352
1261314.5170943411191-1.51709434111911
1271715.94649180953441.05350819046558
1281715.83652332522121.16347667477879
1291914.96731320716494.03268679283513
1301513.73008222721621.26991777278379
1311314.7765874399378-1.77658743993776
132910.6686587084378-1.66865870843779
1331515.6898195056619-0.689819505661932
1341512.59134742752702.40865257247301
1351514.58212881789830.417871182101734
1361613.19200438928412.80799561071594
137119.177642212077291.82235778792271
1381413.67221433200950.327785667990505
1391112.5695511392106-1.56955113921062
1401514.70881788347450.291182116525516
1411313.9614585234978-0.96145852349778
1421515.3221932956414-0.322193295641354
1431613.61600251315422.3839974868458
1441414.3128925319208-0.312892531920831
1451513.67283657488061.32716342511938
1461614.47586017228151.52413982771845
1471614.00523724536261.99476275463743
1481113.9719908969942-2.97199089699418
1491214.5516353296399-2.55163532963993
150911.5201738772182-2.52017387721821
1511614.61385463816231.38614536183766
1521312.72312609665780.276873903342167
1531615.96300542290330.0369945770967159
1541215.0355851752068-3.03558517520681
155911.7707174387915-2.77071743879147
1561311.62567111692331.37432888307674
1571313.0912214204334-0.0912214204333582
1581413.85032790504310.149672094956893
1591914.96731320716494.03268679283513
1601315.4784511148912-2.47845111489121
1611212.0099916584122-0.0099916584121995
1621312.96239889493890.0376011050610872


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.6103845363248880.7792309273502240.389615463675112
100.6976947530059090.6046104939881820.302305246994091
110.601337361065530.7973252778689410.398662638934470
120.8375101184354550.3249797631290890.162489881564545
130.9711782856582120.05764342868357570.0288217143417878
140.9690039833386670.06199203332266570.0309960166613329
150.9864617025077440.0270765949845120.013538297492256
160.977965894665620.04406821066876140.0220341053343807
170.9687899729291660.0624200541416680.031210027070834
180.9648634915888690.0702730168222630.0351365084111315
190.958996473316510.08200705336697870.0410035266834893
200.9482935021065520.1034129957868960.0517064978934478
210.940227199590510.1195456008189810.0597728004094907
220.964303971693940.07139205661211960.0356960283060598
230.9537125246351040.09257495072979230.0462874753648962
240.9500672735826670.0998654528346670.0499327264173335
250.9369948857265810.1260102285468370.0630051142734187
260.9993042023582730.001391595283453850.000695797641726925
270.998924920816250.002150158367499260.00107507918374963
280.9982708737084410.003458252583117530.00172912629155877
290.9974765534974880.005046893005023350.00252344650251167
300.9988586715576680.002282656884663370.00114132844233168
310.9982392728137280.003521454372543620.00176072718627181
320.9974309003168270.005138199366346630.00256909968317332
330.996885435692270.006229128615459850.00311456430772993
340.9952863373756970.009427325248606320.00471366262430316
350.993312036045720.01337592790855930.00668796395427964
360.9903361649972950.01932767000541010.00966383500270503
370.9924218228218260.01515635435634880.00757817717817441
380.9893380647580380.02132387048392410.0106619352419621
390.9887725326237970.02245493475240590.0112274673762030
400.9895472219681810.02090555606363780.0104527780318189
410.985828095506720.02834380898656120.0141719044932806
420.986303297122920.02739340575416030.0136967028770801
430.9812549673273160.0374900653453670.0187450326726835
440.9799555544015840.04008889119683120.0200444455984156
450.9841915912917250.03161681741655100.0158084087082755
460.9884281393447990.02314372131040270.0115718606552013
470.9844540415149290.03109191697014250.0155459584850712
480.9788973907785680.04220521844286370.0211026092214319
490.9870543193107230.02589136137855440.0129456806892772
500.9853413940417540.02931721191649260.0146586059582463
510.9806140056297160.03877198874056730.0193859943702837
520.9745818927203780.05083621455924310.0254181072796216
530.9687947383799960.06241052324000880.0312052616200044
540.968365212207020.06326957558596080.0316347877929804
550.9708415794645370.05831684107092640.0291584205354632
560.962727464570920.07454507085816050.0372725354290802
570.960766846377250.07846630724549910.0392331536227495
580.9503200460622050.09935990787558930.0496799539377946
590.9669423573168180.06611528536636350.0330576426831817
600.9628833254956610.07423334900867790.0371166745043390
610.9729973055822110.05400538883557730.0270026944177886
620.9696178055973080.06076438880538350.0303821944026918
630.981939547745560.03612090450887970.0180604522544398
640.9764022689433610.04719546211327770.0235977310566388
650.9713709290024280.05725814199514310.0286290709975716
660.9940034626383680.01199307472326370.00599653736163187
670.9933981609443230.01320367811135400.00660183905567702
680.9938436918064390.01231261638712290.00615630819356147
690.9919863617430550.01602727651389100.00801363825694548
700.9901665925376280.01966681492474440.00983340746237221
710.9867701920197290.02645961596054210.0132298079802710
720.989744056333960.02051188733208130.0102559436660407
730.9866278349963080.02674433000738360.0133721650036918
740.9827508263003670.03449834739926650.0172491736996333
750.980313428322970.0393731433540580.019686571677029
760.974149369728990.05170126054202040.0258506302710102
770.9802953615608430.03940927687831340.0197046384391567
780.9749101546253750.05017969074925090.0250898453746255
790.9719045864792460.0561908270415070.0280954135207535
800.9760448978349060.04791020433018870.0239551021650943
810.968703505398820.06259298920235980.0312964946011799
820.9597144678024540.08057106439509190.0402855321975460
830.9507625339416350.09847493211673070.0492374660583653
840.9462698230934540.1074603538130910.0537301769065455
850.9338782688174730.1322434623650530.0661217311825267
860.9175720791561320.1648558416877360.0824279208438682
870.899748079995740.2005038400085200.100251920004260
880.8785038550460420.2429922899079160.121496144953958
890.85365289995440.29269420009120.1463471000456
900.8951665175773660.2096669648452680.104833482422634
910.9230181110354490.1539637779291030.0769818889645513
920.9045262800049470.1909474399901070.0954737199950534
930.886388239952360.2272235200952810.113611760047641
940.8712942344443820.2574115311112350.128705765555618
950.8647647938025350.2704704123949300.135235206197465
960.8413243632159820.3173512735680370.158675636784018
970.8171745966030260.3656508067939490.182825403396974
980.7937333463640880.4125333072718240.206266653635912
990.7956677934839210.4086644130321580.204332206516079
1000.760314451430320.479371097139360.23968554856968
1010.7501390081275130.4997219837449740.249860991872487
1020.7208492101856430.5583015796287150.279150789814357
1030.7026445689397770.5947108621204460.297355431060223
1040.801761522134140.396476955731720.19823847786586
1050.818609730895840.3627805382083210.181390269104161
1060.8481273872336130.3037452255327750.151872612766387
1070.8238400168531260.3523199662937490.176159983146874
1080.8297468012804260.3405063974391480.170253198719574
1090.884273387446420.2314532251071610.115726612553580
1100.8601015520259110.2797968959481780.139898447974089
1110.8574856635587650.2850286728824700.142514336441235
1120.8506532185824090.2986935628351820.149346781417591
1130.8448104597929050.310379080414190.155189540207095
1140.8209381696316350.3581236607367290.179061830368365
1150.8868806055502860.2262387888994270.113119394449714
1160.8615960804806040.2768078390387920.138403919519396
1170.8423517119706070.3152965760587860.157648288029393
1180.8088264383879240.3823471232241510.191173561612076
1190.7953905778317380.4092188443365240.204609422168262
1200.7644766588204380.4710466823591240.235523341179562
1210.7278867117584260.5442265764831480.272113288241574
1220.684500828628250.63099834274350.31549917137175
1230.6356511775984620.7286976448030760.364348822401538
1240.5930581677040780.8138836645918440.406941832295922
1250.5380031628643350.923993674271330.461996837135665
1260.5153760744840440.9692478510319110.484623925515956
1270.4612490306407610.9224980612815230.538750969359239
1280.4373039749972410.8746079499944820.562696025002759
1290.6349632874825150.7300734250349710.365036712517486
1300.5934604856616810.8130790286766370.406539514338319
1310.5914386945137710.8171226109724590.408561305486229
1320.580292714188350.83941457162330.41970728581165
1330.5184405100651160.9631189798697690.481559489934884
1340.5078383178852370.9843233642295260.492161682114763
1350.4590782763272370.9181565526544740.540921723672763
1360.4959887237106520.9919774474213030.504011276289348
1370.4541800686332830.9083601372665650.545819931366717
1380.395372665744390.790745331488780.60462733425561
1390.3530365923147130.7060731846294260.646963407685287
1400.2873698368633650.5747396737267290.712630163136635
1410.2838933704268120.5677867408536230.716106629573188
1420.2236700796697770.4473401593395540.776329920330223
1430.2527240794767390.5054481589534780.747275920523261
1440.1920409936441470.3840819872882940.807959006355853
1450.1478488009935970.2956976019871930.852151199006403
1460.1084841522672550.2169683045345090.891515847732745
1470.1978109559697290.3956219119394590.80218904403027
1480.6319139124585670.7361721750828660.368086087541433
1490.6762650624951840.6474698750096320.323734937504816
1500.5708998135538490.8582003728923010.429100186446151
1510.5047228317494530.9905543365010950.495277168250547
1520.3630772990538510.7261545981077020.636922700946149
1530.2661378213806960.5322756427613920.733862178619304


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level90.0620689655172414NOK
5% type I error level420.289655172413793NOK
10% type I error level680.468965517241379NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/10gwvf1293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/10gwvf1293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/19dy31293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/19dy31293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/29dy31293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/29dy31293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/3k4go1293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/3k4go1293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/4k4go1293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/4k4go1293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/5k4go1293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/5k4go1293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/6cwfr1293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/6cwfr1293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/755wu1293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/755wu1293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/855wu1293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/855wu1293038336.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/955wu1293038336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12930382988wb82in3b78d6iu/955wu1293038336.ps (open in new window)


 
Parameters (Session):
par1 = 5 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 5 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by