Home » date » 2010 » Nov » 23 »

W7 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: Tue, 23 Nov 2010 16:18:28 +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/Nov/23/t1290530927jp0q0qp2plaugfk.htm/, Retrieved Tue, 23 Nov 2010 17:48:51 +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/Nov/23/t1290530927jp0q0qp2plaugfk.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 «
14 26 9 15 6 25 25 11 18 20 9 15 6 25 24 12 11 21 9 14 13 19 21 15 12 31 14 10 8 18 23 10 16 21 8 10 7 18 17 12 18 18 8 12 9 22 19 11 14 26 11 18 5 29 18 5 14 22 10 12 8 26 27 16 15 22 9 14 9 25 23 11 15 29 15 18 11 23 23 15 17 15 14 9 8 23 29 12 19 16 11 11 11 23 21 9 10 24 14 11 12 24 26 11 18 17 6 17 8 30 25 15 14 19 20 8 7 19 25 12 14 22 9 16 9 24 23 16 17 31 10 21 12 32 26 14 14 28 8 24 20 30 20 11 16 38 11 21 7 29 29 10 18 26 14 14 8 17 24 7 14 25 11 7 8 25 23 11 12 25 16 18 16 26 24 10 17 29 14 18 10 26 30 11 9 28 11 13 6 25 22 16 16 15 11 11 8 23 22 14 14 18 12 13 9 21 13 12 11 21 9 13 9 19 24 12 16 25 7 18 11 35 17 11 13 23 13 14 12 19 24 6 17 23 10 12 8 20 21 14 15 19 9 9 7 21 23 9 14 18 9 12 8 21 24 15 16 18 13 8 9 24 24 12 9 26 16 5 4 23 24 12 15 18 12 10 8 19 23 9 17 18 6 11 8 17 26 13 13 28 14 11 8 24 24 15 15 17 14 12 6 15 21 11 16 29 10 12 8 25 23 10 16 12 4 15 4 27 28 13 12 28 12 16 14 27 22 16 11 20 14 14 10 18 24 13 15 17 9 17 9 25 21 14 17 17 9 13 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Happines[t] = + 15.9209864112048 -0.013923866821038Concern_over_Mistakes[t] -0.281152036524041Doubts_about_actions[t] + 0.110618369076942Parental_Expectations[t] -0.109305009852638Parental_Criticism[t] -0.00364126304979581Personal_Standards[t] + 0.0291377852193792Organization[t] + 0.0388082434030575Popularity[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.92098641120481.8843798.448900
Concern_over_Mistakes-0.0139238668210380.042239-0.32960.7421710.371086
Doubts_about_actions-0.2811520365240410.077754-3.61590.000420.00021
Parental_Expectations0.1106183690769420.0687681.60860.1100110.055006
Parental_Criticism-0.1093050098526380.087307-1.2520.2127170.106358
Personal_Standards-0.003641263049795810.056468-0.06450.9486790.47434
Organization0.02913778521937920.055070.52910.5975870.298794
Popularity0.03880824340305750.0637350.60890.5435980.271799


Multiple Linear Regression - Regression Statistics
Multiple R0.386071666193761
R-squared0.149051331437627
Adjusted R-squared0.105572202386995
F-TEST (value)3.42811216995754
F-TEST (DF numerator)7
F-TEST (DF denominator)137
p-value0.00207522201230936
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.24668769712789
Sum Squared Residuals691.521968354336


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11415.0963467538529-1.09634675385292
21815.18956041296292.81043958703713
31114.3507420609462-3.35074206094623
41212.7776703995443-0.777670399544335
51614.61591607224141.38408392775856
61814.66521666598973.33478333401032
71414.5238237887352-0.523823788735159
81414.5691005820812-0.569100582081221
91514.65523325206350.344766747936502
101513.25723292148631.7427670785137
111713.12407078247743.87592921752259
121913.49739772186035.50260227813974
131012.6529098177204-2.65290981772041
141816.20477104162631.79522895837372
151411.27816364814642.72183635185362
161415.0741524702825-1.07415247028246
171714.87352921264952.12647078735047
181414.6510509991446-0.651050999144594
191614.98453932883671.01546067116329
201813.20611752801734.7938824719827
211413.38613400486630.613865995133652
221212.3094240820379-0.309424082037925
231713.6854977016373.31450229836299
24914.3915860703661-5.39158607036607
251614.06241562047391.93758437952612
261413.5188496841070.481150315892965
271114.6483323567288-3.64833235672881
281615.18838983943670.811610160563277
291313.0457303560912-0.0457303560912498
301714.32458109543662.67541890456343
311514.29947159224020.700528407759752
321414.7979328020772-0.797932802077198
331612.99419765046213.00580234953793
34912.2576618114038-3.2576618114038
351513.47853523481311.52146476518694
361715.52599467840421.47400532159579
371313.1313917930203-0.131391793020284
381513.40390775501171.59609224498829
391614.12587417608791.87412582391211
401617.0733984080376-1.07339840803763
411213.5605665361522-1.56056653615216
421113.3002589066068-2.3002589066068
431515.1148568531699-0.114856853169928
441715.06949776600821.93050223399178
451314.2591604366919-1.2591604366919
461613.07965603921482.92034396078516
471414.1924199912982-0.19241999129824
481114.5137086665548-3.51370866655479
491213.1709852079733-1.17098520797325
501214.4920322716881-2.49203227168814
511514.39024865305090.609751346949128
521614.91690038604841.08309961395158
531514.60134052169790.398659478302115
541214.778016135197-2.77801613519699
551214.1948086806033-2.19480868060331
56812.5724144628216-4.57241446282164
571315.4771432367284-2.47714323672837
581114.8735976589011-3.87359765890109
591414.8471572119599-0.84715721195989
601512.40764923542162.59235076457842
611013.8676660065156-3.86766600651559
621114.3593220435923-3.35932204359232
631213.5860647837061-1.58606478370605
641512.96720298782572.03279701217429
651514.64314916830950.356850831690526
661413.79362480683770.206375193162318
671612.91448800527543.08551199472465
681514.70853529257720.291464707422847
691515.1303522006806-0.130352200680612
701314.8321220081259-1.83212200812593
711714.86891567866792.13108432133206
721313.6204306969395-0.620430696939519
731513.67452825378841.32547174621156
741314.1724516845164-1.17245168451637
751513.84079248535431.15920751464569
761614.23172795490761.76827204509238
771514.46571063721580.534289362784213
781613.75590905186282.24409094813721
791514.14451440759950.85548559240053
801414.609371577487-0.609371577487046
811512.63469481764382.36530518235619
82712.7790383078128-5.7790383078128
831714.94376788079552.05623211920455
841314.8216225873461-1.82162258734606
851513.99531062912111.00468937087888
861413.37278147241660.627218527583415
871313.8441634893288-0.844163489328771
881615.18926814671780.810731853282163
891214.4598055165961-2.45980551659606
901415.3222001435219-1.32220014352191
911714.51215723397962.4878427660204
921515.424062935526-0.424062935525951
931712.92813834834164.07186165165838
941214.1517887686352-2.15178876863525
951615.10530253575020.89469746424976
961113.9984294366401-2.9984294366401
971513.16878276727161.83121723272835
98914.4761190005816-5.47611900058161
991614.64793367924151.35206632075855
1001012.6419332020375-2.64193320203755
1011012.6448030323297-2.6448030323297
1021514.81374153447170.186258465528322
1031113.9410765636774-2.94107656367737
1041314.9392636340428-1.93926363404275
1051413.14488414842940.855115851570617
1061815.0952461122852.90475388771503
1071614.88610515670311.11389484329691
1081412.53000062328871.46999937671129
1091413.63014919933080.36985080066918
1101413.5110083570870.488991642913018
1111414.6414485081166-0.64144850811657
1121213.3031354408185-1.30313544081853
1131414.3023032385033-0.302303238503307
1141514.4193711079150.580628892085044
1151514.98370369556960.0162963044303615
1161313.5802741281511-0.580274128151066
1171714.78480485807962.21519514192041
1181715.21677374706211.78322625293795
1191915.07479212026893.92520787973105
1201514.06566724640090.934332753599117
1211314.206155408575-1.20615540857503
122913.0310330165383-4.03103301653828
1231515.3011111008892-0.301111100889229
1241514.57812184852890.42187815147114
1251614.77339975953371.22660024046626
1261113.5454397393461-2.5454397393461
1271414.460077351731-0.460077351730967
1281112.9143119088605-1.9143119088605
1291513.41681888460481.58318111539521
1301313.4748061426351-0.474806142635061
1311613.10384684231322.89615315768678
1321414.5661926367677-0.566192636767732
1331514.71046863437310.289531365626855
1341613.50276375611662.49723624388342
1351614.99494616973151.00505383026852
1361112.43441005922-1.43441005922005
1371313.582844883783-0.582844883783041
1381614.06241562047391.93758437952612
1391214.0598038006965-2.05980380069647
140912.5158535472441-3.51585354724407
1411312.84403105281250.155968947187459
1421314.8216225873461-1.82162258734606
1431413.77368777212660.226312227873369
1441915.07479212026893.92520787973105
1451315.429041240669-2.429041240669


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.6876606047395660.6246787905208670.312339395260434
120.7366705740829930.5266588518340150.263329425917007
130.7155600898112920.5688798203774150.284439910188708
140.6255182945022540.7489634109954910.374481705497746
150.699189421071530.601621157856940.30081057892847
160.6367800865930860.7264398268138280.363219913406914
170.8000138824973850.399972235005230.199986117502615
180.7297677514337270.5404644971325460.270232248566273
190.7303212671332870.5393574657334250.269678732866713
200.731223875517690.5375522489646190.268776124482309
210.709139459920320.581721080159360.29086054007968
220.6770108433739050.645978313252190.322989156626095
230.6548067664745280.6903864670509440.345193233525472
240.7501490727036070.4997018545927850.249850927296393
250.7004356528457170.5991286943085670.299564347154283
260.6430347374092510.7139305251814990.356965262590749
270.8498655198409060.3002689603181890.150134480159094
280.8193243710088480.3613512579823040.180675628991152
290.820079736205470.3598405275890590.17992026379453
300.8584399803180430.2831200393639140.141560019681957
310.8235425993919060.3529148012161880.176457400608094
320.7925731658438010.4148536683123970.207426834156199
330.790014378072730.4199712438545390.209985621927269
340.8251460059805750.3497079880388510.174853994019425
350.7943219446379170.4113561107241650.205678055362082
360.7580787347603690.4838425304792620.241921265239631
370.7223343464743650.555331307051270.277665653525635
380.6873080042027480.6253839915945050.312691995797252
390.6921262354430610.6157475291138790.307873764556939
400.7419030402305790.5161939195388420.258096959769421
410.701856287486050.59628742502790.29814371251395
420.7364019061131060.5271961877737880.263598093886894
430.6937062283381760.6125875433236470.306293771661824
440.6703708021104270.6592583957791470.329629197889573
450.6290160792680520.7419678414638950.370983920731948
460.6543141970554950.691371605889010.345685802944505
470.6209939936151370.7580120127697260.379006006384863
480.7665601692686960.4668796614626080.233439830731304
490.7486147012400240.5027705975199520.251385298759976
500.7606673122143310.4786653755713370.239332687785669
510.7445065619189530.5109868761620930.255493438081047
520.7216508999298240.5566982001403510.278349100070176
530.6778737559089710.6442524881820580.322126244091029
540.699680793265990.600638413468020.30031920673401
550.6868960278578350.626207944284330.313103972142165
560.8348721735389760.3302556529220470.165127826461024
570.853380590624670.293238818750660.14661940937533
580.8989226602918060.2021546794163880.101077339708194
590.877917572974020.2441648540519590.122082427025979
600.8885322160201680.2229355679596650.111467783979832
610.9226759212414450.1546481575171090.0773240787585546
620.9432096538479140.1135806923041710.0567903461520856
630.9345380671805480.1309238656389040.065461932819452
640.9329197527290930.1341604945418140.0670802472709068
650.91593784772290.16812430455420.0840621522770998
660.8954725545069030.2090548909861950.104527445493097
670.9164576019873950.167084796025210.083542398012605
680.9003731104712570.1992537790574860.099626889528743
690.878158205446610.2436835891067790.12184179455339
700.8729665872595130.2540668254809740.127033412740487
710.8697728803179070.2604542393641860.130227119682093
720.8449307960998270.3101384078003460.155069203900173
730.8254241498387670.3491517003224660.174575850161233
740.8014542880762650.397091423847470.198545711923735
750.7775482711329750.444903457734050.222451728867025
760.7663959581435370.4672080837129270.233604041856463
770.7278126139811330.5443747720377330.272187386018867
780.7276186221257180.5447627557485630.272381377874282
790.6911877301726190.6176245396547630.308812269827381
800.649111800405290.701776399189420.35088819959471
810.6650327344491540.6699345311016920.334967265550846
820.8583119724609850.2833760550780310.141688027539015
830.856481350766770.2870372984664610.14351864923323
840.8520955154020770.2958089691958470.147904484597923
850.8260094127169070.3479811745661850.173990587283093
860.800664594733780.3986708105324420.199335405266221
870.7698515415400450.460296916919910.230148458459955
880.7330394227570560.5339211544858890.266960577242944
890.7447188929730810.5105622140538370.255281107026919
900.7291576302347250.541684739530550.270842369765275
910.751095662387110.4978086752257810.248904337612891
920.7103031869207240.5793936261585520.289696813079276
930.8350697710652390.3298604578695220.164930228934761
940.8418694768948110.3162610462103770.158130523105189
950.8092164068560830.3815671862878350.190783593143917
960.8323062937088120.3353874125823770.167693706291188
970.8320679954603590.3358640090792820.167932004539641
980.9462319828680520.1075360342638960.0537680171319481
990.9339225262856350.1321549474287310.0660774737143654
1000.9349540168491650.1300919663016690.0650459831508346
1010.9305494048211580.1389011903576830.0694505951788417
1020.9092772981458560.1814454037082880.090722701854144
1030.9373118776622910.1253762446754180.0626881223377091
1040.9587184407800440.08256311843991270.0412815592199563
1050.9563255984305060.08734880313898760.0436744015694938
1060.9569700672329260.08605986553414740.0430299327670737
1070.9438641057605420.1122717884789150.0561358942394577
1080.9463291506978360.1073416986043280.0536708493021638
1090.9274626898423530.1450746203152940.0725373101576469
1100.9242031279160620.1515937441678760.075796872083938
1110.9050195382727830.1899609234544330.0949804617272166
1120.8784446968474080.2431106063051850.121555303152592
1130.8544394153616610.2911211692766770.145560584638339
1140.8171910272625680.3656179454748640.182808972737432
1150.7802065425180430.4395869149639130.219793457481957
1160.7274470961166770.5451058077666470.272552903883323
1170.7767148397741880.4465703204516250.223285160225812
1180.7824604285725630.4350791428548740.217539571427437
1190.8029172438335330.3941655123329340.197082756166467
1200.8203850507735270.3592298984529470.179614949226473
1210.7708399817992130.4583200364015740.229160018200787
1220.7562498700265050.4875002599469910.243750129973495
1230.702849842218720.5943003155625620.297150157781281
1240.6327064583606210.7345870832787570.367293541639379
1250.6130791007829090.7738417984341810.386920899217091
1260.53388759430130.93222481139740.4661124056987
1270.4416430787196140.8832861574392290.558356921280386
1280.3680691096334910.7361382192669820.631930890366509
1290.3583252246869170.7166504493738340.641674775313083
1300.2770941593876560.5541883187753120.722905840612344
1310.4538947576078140.9077895152156270.546105242392186
1320.3476451731485980.6952903462971960.652354826851402
1330.2499686573973560.4999373147947120.750031342602644
1340.1960675957775320.3921351915550640.803932404222468


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level30.0241935483870968OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/10s6rz1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/10s6rz1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/1m5cn1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/1m5cn1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/2wxbq1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/2wxbq1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/3wxbq1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/3wxbq1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/4wxbq1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/4wxbq1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/5pobt1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/5pobt1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/6pobt1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/6pobt1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/7ifsw1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/7ifsw1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/8ifsw1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/8ifsw1290529095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/9s6rz1290529095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290530927jp0q0qp2plaugfk/9s6rz1290529095.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by