Home » date » 2010 » Nov » 26 »

multiple regression model 1

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 26 Nov 2010 09:50:58 +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/26/t1290764979tgdn3qc5y068d4e.htm/, Retrieved Fri, 26 Nov 2010 10:49:49 +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/26/t1290764979tgdn3qc5y068d4e.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 «
24 14 11 12 24 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 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 time24 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PersonalStandards[t] = + 7.46043060983698 + 0.328154021465218ConcernoverMistakes[t] -0.362736672389799Doubtsaboutactions[t] + 0.186560236681879ParentalExpectations[t] + 0.0233844134026164ParentalCriticism[t] + 0.401270321441297Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.460430609836982.2481093.31850.0011310.000565
ConcernoverMistakes0.3281540214652180.0555445.90800
Doubtsaboutactions-0.3627366723897990.107118-3.38639e-040.00045
ParentalExpectations0.1865602366818790.101141.84460.0670320.033516
ParentalCriticism0.02338441340261640.1286210.18180.8559730.427987
Organization0.4012703214412970.0717735.590800


Multiple Linear Regression - Regression Statistics
Multiple R0.605858798778077
R-squared0.367064884056814
Adjusted R-squared0.346380729941024
F-TEST (value)17.7461878306445
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value7.54951656745106e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.40927289715423
Sum Squared Residuals1778.34067815237


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.02361763335070.976382366649325
22522.39639210732352.60360789267648
33024.25298630725225.74701369274783
41920.2962579947228-1.29625799472284
52220.53862828528321.46137171471677
62223.1227812851809-1.12278128518095
72522.57360260838692.42639739161312
82319.45685945818933.54314054181066
91718.7937770436835-1.79377704368349
102121.6696775851730-0.669677585173036
111922.8153403514384-3.81534035143841
121923.3938848919955-4.39388489199547
131523.2200335336539-8.22003353365394
141617.0860954231925-1.08609542319247
152319.45982251795763.54017748204243
162724.07484238205532.92515761794466
172221.00194328868470.99805671131526
181416.535329320714-2.53532932071399
192224.0873202920243-2.08732029202430
202324.0090508616482-1.00905086164818
212321.56883817794231.43116182205770
222124.4545998179461-3.45459981794611
231922.4295524471459-3.42955244714590
241823.8367869289911-5.83678692899107
252023.1800605324662-3.18006053246622
262322.44835255960490.55164744039509
272523.32807873286811.67192126713187
281923.3532655211774-4.35326552117744
292423.8398299312470.160170068753002
302221.56922587366740.430774126332576
312525.1649483334544-0.164948333454417
322623.22321697753742.77678302246257
332922.70020388487516.29979611512493
343225.19655953738236.8034404626177
352521.58307941772023.41692058227981
362924.40994950651354.59005049348653
372824.94670560416253.05329439583750
381717.1062381095522-0.106238109552165
392826.07516352086011.92483647913991
402922.94307220494056.05692779505949
412627.5286218564100-1.52862185640998
422523.46670945788321.53329054211676
431419.5469105942640-5.54691059426405
442522.10552217031042.89447782968956
452621.67803938243294.32196061756712
462020.3008968098917-0.300896809891661
471821.4213727878477-3.42137278784772
483224.66103622987577.3389637701243
492525.0045460489836-0.00454604898359189
502521.69155135775733.30844864224273
512320.84547496130682.15452503869318
522122.1588588066973-1.15885880669729
532024.0575114630031-4.05751146300312
541516.5269290283781-1.52692902837805
553026.71739020898803.28260979101198
562425.3394958960663-1.33949589606632
572624.31254918449231.68745081550774
582421.71725246129782.28274753870220
592221.49415047143090.505849528569084
601415.6462203516491-1.64622035164913
612422.2553595200761.74464047992401
622422.92037560857981.07962439142021
632423.35362015671940.646379843280558
642419.98505558381324.0149444161868
651918.51290616425470.487093835745273
663126.82086767642944.17913232357061
672226.6010375214530-4.60103752145305
682721.46976210052055.5302378994795
691917.73590694522341.26409305477656
702522.30440358960752.69559641039245
712024.9772106374541-4.97721063745406
722121.5026773832730-0.502677383272962
732727.4823128306108-0.482312830610753
742324.3803773473337-1.38037734733372
752525.6982731831007-0.698273183100734
762022.2330812773097-2.23308127730969
772119.24546706874021.75453293125985
782222.4516157406899-0.451615740689923
792323.0320339448358-0.0320339448358424
802524.05217644356390.947823556436078
812523.42308557988541.57691442011461
821723.8630492300674-6.86304923006741
831921.4391304477228-2.43913044772283
842523.97091329555031.02908670444972
851922.3733623294629-3.37336232946291
862023.1407040596382-3.14070405963825
872622.52387072181343.47612927818658
882320.80738427751352.19261572248651
892724.43619578844072.56380421155931
901720.8970807780462-3.8970807780462
911723.3435280898338-6.3435280898338
921920.191563551002-1.19156355100200
931719.7459731472925-2.74597314729248
942222.0165688176436-0.0165688176435780
952123.5510323826098-2.55103238260976
963228.63724483998533.36275516001471
972124.6834795872242-3.6834795872242
982124.3266944626333-3.32669446263334
991821.259817450436-3.259817450436
1001821.2889468496438-3.28894684964376
1012322.83953081416060.160469185839440
1021920.6492902959521-1.64929029595211
1032020.9576947616757-0.957694761675735
1042122.3255043730554-1.32550437305537
1052023.8525057494042-3.85250574940423
1061718.7741072251434-1.77410722514342
1071820.3006604066273-2.30066040662729
1081920.7496791060040-1.74967910600404
1092222.0682765809344-0.0682765809344147
1101518.7664416321540-3.76644163215395
1111418.8510893511519-4.8510893511519
1121826.6429142940773-8.64291429407725
1132421.41144878787982.58855121212023
1143523.562032711943511.4379672880565
1152919.21632460271889.78367539728123
1162121.9816944326307-0.981694432630686
1172520.49532081432834.50467918567167
1182018.49243029639511.50756970360488
1192223.2253187184531-1.22531871845307
1201316.8359413686559-3.83594136865588
1212623.21420021813262.78579978186736
1221716.88722239112380.112777608876169
1232520.09471363697434.90528636302571
1242020.7722734892362-0.772273489236233
1251918.12855439318590.871445606814115
1262122.6212243668162-1.62122436681623
1272221.07047528771720.929524712282783
1282422.70567391104881.29432608895115
1292122.9951676639565-1.99516766395646
1302625.4821958514860.517804148514019
1312420.59509309602053.40490690397949
1321620.2987397994430-4.29873979944297
1332322.37653195122490.623468048775058
1341820.8107987510593-2.81079875105926
1351622.3793138772619-6.37931387726185
1362624.06985436623751.93014563376249
1371919.0560620045677-0.0560620045676737
1382116.86661990375814.13338009624188
1392122.2168258710245-1.21682587102449
1402218.52601737704043.47398262295962
1412319.73402419127493.26597580872508
1422924.81240594107884.18759405892122
1432119.21565087437541.78434912562462
1442119.96394641313691.03605358686309
1452321.89278796226841.10721203773160
1462722.9960672725994.00393272740102
1472525.3746950753506-0.374695075350646
1482121.0001409137780-0.00014091377804544
1491017.1119616413152-7.1119616413152
1502022.6490195793518-2.64901957935177
1512622.57492372824553.42507627175453
1522423.64748326134840.352516738651611
1532931.6584752151628-2.65847521516282
1541918.98258268182110.0174173181788779
1552422.09401617955111.90598382044895
1561920.7666852307848-1.76668523078483
1572423.44015542271860.559844577281405
1582221.82443709696720.175562903032759
1591723.7736200572454-6.77362005724542


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.3031671748716900.6063343497433800.69683282512831
100.1832719061613780.3665438123227560.816728093838622
110.3389657526651670.6779315053303340.661034247334833
120.2896088181375340.5792176362750670.710391181862466
130.8660476345142660.2679047309714680.133952365485734
140.8049343753023450.3901312493953090.195065624697655
150.7599021021059230.4801957957881550.240097897894077
160.697170058283160.6056598834336810.302829941716841
170.6192827515251920.7614344969496160.380717248474808
180.5910386873954520.8179226252090950.408961312604548
190.5240253891279160.9519492217441680.475974610872084
200.5182040233470290.9635919533059430.481795976652971
210.4978243196694580.9956486393389170.502175680330541
220.4308793698654340.8617587397308680.569120630134566
230.3858946773320650.771789354664130.614105322667935
240.4349945103799110.8699890207598220.565005489620089
250.4477210430820560.8954420861641110.552278956917944
260.3796057155477910.7592114310955820.620394284452209
270.3292817477595960.6585634955191920.670718252240404
280.3452913229534790.6905826459069590.65470867704652
290.2916634513073060.5833269026146130.708336548692694
300.2385028724348370.4770057448696740.761497127565163
310.1919525543454290.3839051086908580.808047445654571
320.2121741136405940.4243482272811880.787825886359406
330.3620847025213490.7241694050426980.637915297478651
340.5966832722808610.8066334554382780.403316727719139
350.5738366538928480.8523266922143050.426163346107152
360.6339974668983360.7320050662033280.366002533101664
370.6250464751355160.7499070497289680.374953524864484
380.5812071018714420.8375857962571150.418792898128558
390.5492650394891880.9014699210216240.450734960510812
400.6340149807260270.7319700385479470.365985019273973
410.60269680699440.7946063860112010.397303193005600
420.5574937840280780.8850124319438440.442506215971922
430.6440455231616680.7119089536766640.355954476838332
440.616000997208380.767998005583240.38399900279162
450.6392042044274120.7215915911451760.360795795572588
460.5897039664504020.8205920670991950.410296033549598
470.5804433493207140.8391133013585720.419556650679286
480.6916894681453150.616621063709370.308310531854685
490.6504936064723940.6990127870552110.349506393527606
500.6396856720783830.7206286558432330.360314327921617
510.6011762085280530.7976475829438930.398823791471947
520.5602233061220160.8795533877559680.439776693877984
530.5965480101363380.8069039797273240.403451989863662
540.5634095600235080.8731808799529840.436590439976492
550.61489342470360.77021315059280.3851065752964
560.5818554444291540.8362891111416910.418144555570846
570.542133076835250.91573384632950.45786692316475
580.5110416534641830.9779166930716350.488958346535817
590.4639671439414380.9279342878828760.536032856058562
600.4227622766070280.8455245532140570.577237723392972
610.3898561495725360.7797122991450730.610143850427464
620.350053587354270.700107174708540.64994641264573
630.3092759614041240.6185519228082470.690724038595876
640.3422148706163030.6844297412326050.657785129383697
650.3007893406111990.6015786812223980.699210659388801
660.3146221898098270.6292443796196540.685377810190173
670.3767222998931590.7534445997863170.623277700106841
680.453735810270280.907471620540560.54626418972972
690.4151735985958460.8303471971916920.584826401404154
700.398962430900140.797924861800280.60103756909986
710.4658051335482980.9316102670965960.534194866451702
720.4205472185147670.8410944370295340.579452781485233
730.379420083615660.758840167231320.62057991638434
740.3439879474214340.6879758948428680.656012052578566
750.3119416427304130.6238832854608260.688058357269587
760.2883223227826750.576644645565350.711677677217325
770.2657600541081590.5315201082163180.734239945891841
780.2299636642113300.4599273284226600.77003633578867
790.1976096247202450.3952192494404910.802390375279755
800.1708897029030080.3417794058060160.829110297096992
810.1499277119968970.2998554239937930.850072288003104
820.24395879877380.48791759754760.7560412012262
830.2257696281323710.4515392562647430.774230371867629
840.1966305245031690.3932610490063380.803369475496831
850.1986355252872070.3972710505744140.801364474712793
860.1941090879224530.3882181758449060.805890912077547
870.2015667567121550.4031335134243090.798433243287845
880.1884416088080550.376883217616110.811558391191945
890.1762940990469140.3525881980938290.823705900953086
900.1813085945202810.3626171890405620.818691405479719
910.2585526515285150.5171053030570290.741447348471485
920.2242277450197670.4484554900395340.775772254980233
930.2074727718990590.4149455437981180.79252722810094
940.1766470053708150.3532940107416290.823352994629185
950.1618605312911050.323721062582210.838139468708895
960.1655959476425460.3311918952850930.834404052357454
970.1673739261214730.3347478522429460.832626073878527
980.1634576383143210.3269152766286420.836542361685679
990.1563495215565740.3126990431131480.843650478443426
1000.151198669338710.302397338677420.84880133066129
1010.1248112791346940.2496225582693880.875188720865306
1020.1046907682744890.2093815365489770.895309231725511
1030.08483471781537450.1696694356307490.915165282184625
1040.06916769519316770.1383353903863350.930832304806832
1050.07399200919051770.1479840183810350.926007990809482
1060.06100521051733430.1220104210346690.938994789482666
1070.05390697383997750.1078139476799550.946093026160022
1080.04722096954841660.09444193909683310.952779030451583
1090.03639850899195810.07279701798391630.963601491008042
1100.0358992577967030.0717985155934060.964100742203297
1110.04521251733502350.0904250346700470.954787482664976
1120.180955683183650.36191136636730.81904431681635
1130.1650544506177980.3301089012355970.834945549382202
1140.5973072309482420.8053855381035160.402692769051758
1150.8745101486783290.2509797026433430.125489851321671
1160.8449794584935530.3100410830128940.155020541506447
1170.8946327136175360.2107345727649290.105367286382464
1180.872794438000040.254411123999920.12720556199996
1190.8476895587960540.3046208824078920.152310441203946
1200.8779717084798710.2440565830402580.122028291520129
1210.8576716573844740.2846566852310530.142328342615526
1220.8219494008906320.3561011982187370.178050599109368
1230.8504007252332230.2991985495335530.149599274766777
1240.8127759558628560.3744480882742870.187224044137144
1250.777274978352170.445450043295660.22272502164783
1260.7328483037800990.5343033924398020.267151696219901
1270.6990319788557960.6019360422884080.300968021144204
1280.6596255452167960.6807489095664080.340374454783204
1290.6039978115214530.7920043769570940.396002188478547
1300.5426180058472160.9147639883055690.457381994152784
1310.5413969713934640.9172060572130710.458603028606536
1320.5415073068328980.9169853863342040.458492693167102
1330.4920184220027190.9840368440054390.507981577997281
1340.4442985071129750.888597014225950.555701492887025
1350.5968431137570330.8063137724859350.403156886242967
1360.5602255371199120.8795489257601770.439774462880088
1370.4880603972503460.9761207945006920.511939602749654
1380.5004657470716310.9990685058567390.499534252928369
1390.4286773557970480.8573547115940960.571322644202952
1400.3923947448995880.7847894897991760.607605255100412
1410.3578991219123240.7157982438246470.642100878087676
1420.4175660577931260.8351321155862520.582433942206874
1430.5709504908183470.8580990183633060.429049509181653
1440.4976619352808620.9953238705617240.502338064719138
1450.416814948413820.833629896827640.58318505158618
1460.4119343683938630.8238687367877270.588065631606137
1470.3604609236692450.720921847338490.639539076330755
1480.2510712087408650.502142417481730.748928791259135
1490.4565674196640460.9131348393280930.543432580335954
1500.3855213410646060.7710426821292120.614478658935394


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 level40.0281690140845070OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/1036ss1290765033.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/1036ss1290765033.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/1fmap1290765032.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/1fmap1290765032.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/2fmap1290765032.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/2fmap1290765032.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/3fmap1290765032.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/3fmap1290765032.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/48wra1290765032.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/48wra1290765032.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/58wra1290765032.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/58wra1290765032.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/68wra1290765032.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/68wra1290765032.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/7bxb71290765033.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/7bxb71290765033.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/836ss1290765033.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/836ss1290765033.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/936ss1290765033.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290764979tgdn3qc5y068d4e/936ss1290765033.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