Home » date » 2010 » Dec » 28 »

*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, 28 Dec 2010 16:51: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/Dec/28/t129355507709nkjb3upuzr0m2.htm/, Retrieved Tue, 28 Dec 2010 17:51:17 +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/28/t129355507709nkjb3upuzr0m2.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 11 12 24 26 11 7 8 25 23 6 17 8 30 25 12 10 8 19 23 8 12 9 22 19 10 12 7 22 29 10 11 4 25 25 11 11 11 23 21 16 12 7 17 22 11 13 7 21 25 13 14 12 19 24 12 16 10 19 18 8 11 10 15 22 12 10 8 16 15 11 11 8 23 22 4 15 4 27 28 9 9 9 22 20 8 11 8 14 12 8 17 7 22 24 14 17 11 23 20 15 11 9 23 21 16 18 11 21 20 9 14 13 19 21 14 10 8 18 23 11 11 8 20 28 8 15 9 23 24 9 15 6 25 24 9 13 9 19 24 9 16 9 24 23 9 13 6 22 23 10 9 6 25 29 16 18 16 26 24 11 18 5 29 18 8 12 7 32 25 9 17 9 25 21 16 9 6 29 26 11 9 6 28 22 16 12 5 17 22 12 18 12 28 22 12 12 7 29 23 14 18 10 26 30 9 14 9 25 23 10 15 8 14 17 9 16 5 25 23 10 10 8 26 23 12 11 8 20 25 14 14 10 18 24 14 9 6 32 24 10 12 8 25 23 14 17 7 25 21 16 5 4 23 24 9 12 8 21 24 10 12 8 20 28 6 6 4 15 16 8 24 20 30 20 13 12 8 24 29 10 12 8 26 27 8 14 6 24 22 7 7 4 22 28 15 13 8 14 16 9 12 9 24 25 10 13 6 24 24 12 14 7 24 28 13 8 9 24 24 10 11 5 19 23 11 9 5 31 30 8 11 8 22 24 9 13 8 27 21 13 10 6 19 25 11 11 8 25 2 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
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
PersonalStandards[t] = + 8.36783562150565 -0.118995175185963DoubtsAboutActions[t] + 0.330380406024557ParentalExpectations[t] + 0.104695476872945ParentalCriticism[t] + 0.446177005333338`Organization `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.367835621505652.4774773.37760.0009260.000463
DoubtsAboutActions-0.1189951751859630.109196-1.08970.277530.138765
ParentalExpectations0.3303804060245570.1084353.04680.0027220.001361
ParentalCriticism0.1046954768729450.141260.74120.4597270.229864
`Organization `0.4461770053333380.0788355.659600


Multiple Linear Regression - Regression Statistics
Multiple R0.471880297692617
R-squared0.222671015350473
Adjusted R-squared0.202480652112823
F-TEST (value)11.0285789675763
F-TEST (DF numerator)4
F-TEST (DF denominator)154
p-value6.84458814070865e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.76591016754695
Sum Squared Residuals2184.04022606516


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.19303549631440.806964503685558
22520.47118647428234.52881352571771
33025.26232042112434.73767957887565
41921.34333251717-2.34333251717000
52220.80006148550261.19993851449744
62224.8144502347181-2.81445023471812
72522.38527537674142.61472462325862
82321.21444051833271.78555948166732
91720.9772401462690-3.97724014626897
102123.2411274442234-2.24112744422336
111923.4108178789074-4.41081787890738
121921.3041208803965-2.30412088039654
131521.9129075723510-6.91290757235096
141617.7739164745033-1.77391647450329
152321.34653109304721.65346890695282
162725.75929906795541.24070093204460
172220.13610209757631.86389790242374
181417.2417465652717-3.24174656527169
192224.4734575885461-2.47345758854614
202322.39356042358880.60643957641121
212320.52906886384292.47093113615707
222122.4859504792414-1.48595047924142
231922.6529630405242-3.65296304052417
241821.1053421667981-3.10534216679807
252024.0235931250472-4.02359312504721
262324.0220877302429-1.02208773024292
272523.58900612443811.41099387556188
281923.2423317430078-4.24233174300784
292423.78729595574820.212704044251827
302222.4820683070557-0.482068307055667
312523.71861353977151.28138646022850
322624.79413588493951.20586411506050
332921.56039948326697.43960051673311
343223.26773256375678.7322674362433
352523.22532235110611.77467764889395
362921.66611147265577.33388852734429
372820.47637932725227.52362067274783
381720.7678491925231-3.76784919252308
392823.95898066752494.04101933247510
402921.89939785234627.10060214765384
412627.0810154060738-1.08101540607378
422523.12653514369911.87346485630094
431420.5561628656647-6.55616286566468
442523.36851404825641.63148595174361
452621.58132286754194.41867713245808
462022.5660669338612-2.56606693386123
471823.0824317499755-5.08243174997552
483221.011747812361010.9882521876390
492522.24208367959102.75791632040896
502522.42095552143032.57904447856965
512319.24284488414493.75715511585509
522122.8072558601103-1.80725586011034
532024.4729687062577-4.47296870625773
541517.1937609993624-2.1937609993624
553026.3624536087333.63754639126702
562424.5621601860332-0.562160186033174
572624.02679170092441.97320829907561
582422.48526688293281.51473311706715
592222.7592702942011-0.75927029420105
601418.8542491723524-4.85424917235241
612423.35812834231660.641871657683379
622422.80925013720301.19074986279696
632424.7910436910620-0.791043691061967
642421.11444901214122.8855509878588
651921.5976168429476-2.59761684294764
663123.94109989304597.05890010695407
672222.5958706292717-0.595870629271745
682721.79910525013495.20089474986512
691921.9073003989048-2.90730039890482
702522.68506210904722.31493789095281
712021.9292015477567-1.92920154775668
722121.2652421598304-0.265242159830384
732724.79544656572362.20455343427637
742323.9434766704274-0.943476670427397
752524.03518312977150.964816870228544
762021.3497296689244-1.34972966892436
772122.7794464417925-1.77944644179252
782223.2157266234745-1.21572662347451
792324.02039454917-1.02039454917002
802521.79790095135043.2020990486496
812524.0905823599510.909417640049018
821723.7262149903103-6.72621499031035
831921.8882967299103-2.88829672991033
842524.45716361314040.54283638685958
851921.9152029454635-2.91520294546347
862023.7860916569637-3.78609165696369
872622.0437938482813.95620615171902
882323.4520237927735-0.452023792773539
892723.50761080922173.49238919077833
901721.2450341920514-4.24503419205141
911722.8730407962296-5.87304079622963
921921.7523239830101-2.75232398301007
931720.8178608557126-3.81786085571257
942221.68530292791880.314697072081197
952124.0247974238317-3.02479742383169
963226.97282025730385.02717974269615
972123.185922928064-2.18592292806399
982123.3938084870056-2.39380848700559
991821.3640293672374-3.36402936723738
1001820.7877560642822-2.78775606428224
1012322.55026184074390.449738159256078
1021921.4973242407364-2.49732424073636
1032021.7598936133614-1.75989361336142
1042123.2344291964492-2.23442919644919
1052024.3221755585685-4.32217555856854
1061717.5522200995371-0.552220099537086
1071819.0375557090409-1.03755570904088
1081919.3314341718807-0.331434171880745
1092222.178976616873-0.178976616873014
1101520.6643580144346-5.66435801443462
1111420.5906705317567-6.59067053175667
1121824.6665545668863-6.66655456688631
1132420.46448822650813.53551177349188
1143522.218376039915112.7816239600849
1152921.71062918685557.2893708131445
1162122.9425450107020-1.94254501070202
1172520.35437336245764.64562663754237
1182019.13784831125220.86215168874784
1192223.3081166791271-1.30811667912714
1201315.9210149194817-2.92101491948168
1212619.60622756145726.39377243854283
1221718.8951539901988-1.89515399019876
1232520.95624220018184.04375779981822
1242021.1807546507364-1.18075465073641
1251920.5182688374269-1.51826883742691
1262123.7749905345279-2.77499053452786
1272221.84670831575540.153291684244594
1282423.13123911438050.86876088561947
1292124.3460709845131-3.34607098451311
1302622.32807658348933.6719234165107
1312420.53667031438183.46332968561822
1321621.4687248441103-5.46872484411032
1332323.0551430341336-0.0551430341336209
1341821.0701509043975-3.07015090439751
1351622.2420836795910-6.24208367959104
1362624.29135535064221.70864464935785
1371920.3371761842872-1.33717618428724
1382117.97739915878323.02260084121677
1392123.0309465121692-2.03094651216925
1402218.83915949573123.16084050426883
1412316.86406418964646.13593581035358
1422922.75844849570536.24155150429467
1432121.1867125042838-0.186712504283819
1442120.12729634825290.872703651747063
1452323.4049096094414-0.404909609441429
1462721.43451827403815.56548172596185
1472522.33296834043942.66703165956062
1482120.58747195587950.412528044120516
1491018.0040042783166-8.00400427831657
1502022.0116947797580-2.01169477975795
1512621.92720727066404.07279272933602
1522423.29581125790680.704188742093178
1532927.66887871375321.33112128624683
1541917.90450165441351.09549834558649
1552423.95107812096620.0489218790337582
1561921.589714296389-2.58971429638899
1572421.88189957815602.11810042184404
1582222.6394533205194-0.63945332051937
1591723.3398082696307-6.3398082696307


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.5774583686076190.8450832627847610.422541631392381
90.4113982853181620.8227965706363240.588601714681838
100.3041584107038530.6083168214077050.695841589296147
110.2489941803935470.4979883607870950.751005819606453
120.1591833135468830.3183666270937660.840816686453117
130.6581643102418840.6836713795162320.341835689758116
140.5662091564464790.8675816871070420.433790843553521
150.4964106844482590.9928213688965170.503589315551741
160.4147904146320670.8295808292641330.585209585367933
170.3349791281647110.6699582563294210.66502087183529
180.3115154596306040.6230309192612070.688484540369396
190.2519324719906050.5038649439812110.748067528009395
200.2617790237655030.5235580475310070.738220976234497
210.2627925434717930.5255850869435860.737207456528207
220.2075787899413510.4151575798827020.792421210058649
230.1802417138450240.3604834276900480.819758286154976
240.1631112956205530.3262225912411050.836888704379448
250.1705747350513060.3411494701026120.829425264948694
260.1295291707418520.2590583414837040.870470829258148
270.1024503504989400.2049007009978790.89754964950106
280.1033791990197920.2067583980395840.896620800980208
290.0787279152650820.1574558305301640.921272084734918
300.05716917866190760.1143383573238150.942830821338092
310.04224019621009900.08448039242019790.957759803789901
320.04267218902563780.08534437805127560.957327810974362
330.1015307116189160.2030614232378310.898469288381085
340.2981448158949050.596289631789810.701855184105095
350.2569801890624740.5139603781249480.743019810937526
360.368695041998830.737390083997660.63130495800117
370.4885264820806910.9770529641613830.511473517919309
380.5534740817715140.8930518364569720.446525918228486
390.5818544734037040.8362910531925910.418145526596296
400.679083785593230.6418324288135390.320916214406770
410.6355896080687240.7288207838625510.364410391931276
420.5952778062317860.8094443875364280.404722193768214
430.6964648621991420.6070702756017160.303535137800858
440.654582298392630.690835403214740.34541770160737
450.6618502024378880.6762995951242250.338149797562112
460.6441370060446080.7117259879107840.355862993955392
470.675983125497230.6480337490055390.324016874502770
480.8846757126159630.2306485747680740.115324287384037
490.8696803874299580.2606392251400840.130319612570042
500.8522237456070890.2955525087858220.147776254392911
510.8384430535060260.3231138929879480.161556946493974
520.8166795642274010.3666408715451970.183320435772599
530.8364536539732330.3270926920535340.163546346026767
540.8262684103920880.3474631792158230.173731589607912
550.867380914187940.2652381716241210.132619085812061
560.8421032284560810.3157935430878370.157896771543919
570.8181256070655360.3637487858689290.181874392934464
580.7893474709690250.421305058061950.210652529030975
590.7579805308335970.4840389383328060.242019469166403
600.7827724061413160.4344551877173680.217227593858684
610.7468988800895470.5062022398209070.253101119910453
620.7115988354983760.5768023290032470.288401164501624
630.6761547315504850.6476905368990310.323845268449515
640.6561731809920180.6876536380159650.343826819007982
650.6379607488039610.7240785023920770.362039251196038
660.7314798798710350.5370402402579310.268520120128965
670.692942919314450.6141141613710990.307057080685549
680.7303400481955140.5393199036089720.269659951804486
690.7193849414647050.561230117070590.280615058535295
700.6948875021686040.6102249956627930.305112497831397
710.6644819585921220.6710360828157570.335518041407878
720.6219729075269490.7560541849461020.378027092473051
730.5945942580120040.8108114839759920.405405741987996
740.5515198197912320.8969603604175370.448480180208768
750.5128430298017740.9743139403964510.487156970198226
760.4717891987368190.9435783974736380.528210801263181
770.4394652507473760.8789305014947530.560534749252624
780.3986887581761670.7973775163523330.601311241823833
790.3606976257749330.7213952515498660.639302374225067
800.3523806262674510.7047612525349020.647619373732549
810.314128046508630.628256093017260.68587195349137
820.4022441186657810.8044882373315610.59775588133422
830.3820379820139450.7640759640278910.617962017986055
840.3402282178740810.6804564357481610.65977178212592
850.3245206771937690.6490413543875370.675479322806231
860.3217122000402750.6434244000805510.678287799959725
870.3326596487977010.6653192975954030.667340351202299
880.2928272331374780.5856544662749560.707172766862522
890.2888557807577670.5777115615155350.711144219242233
900.2945976712222080.5891953424444160.705402328777792
910.3450428477091570.6900856954183130.654957152290843
920.3214123996487200.6428247992974410.67858760035128
930.3169264363990760.6338528727981530.683073563600924
940.2771984104900160.5543968209800320.722801589509984
950.2610150387939460.5220300775878930.738984961206054
960.2983464904760310.5966929809520610.70165350952397
970.2692373555498520.5384747110997040.730762644450148
980.2438506715098850.4877013430197710.756149328490115
990.2319892870370050.463978574074010.768010712962995
1000.2132668913127240.4265337826254480.786733108687276
1010.1807054061376980.3614108122753970.819294593862302
1020.1607625414600450.321525082920090.839237458539955
1030.1373750744439370.2747501488878730.862624925556063
1040.1196554977595470.2393109955190930.880344502240453
1050.1264351162612700.2528702325225390.87356488373873
1060.1030654109006950.2061308218013910.896934589099305
1070.08467617162386430.1693523432477290.915323828376136
1080.06836157758190340.1367231551638070.931638422418097
1090.05367179966571810.1073435993314360.946328200334282
1100.06981061260060720.1396212252012140.930189387399393
1110.1093200217317610.2186400434635220.890679978268239
1120.1728751432447490.3457502864894970.827124856755251
1130.1608636637001220.3217273274002430.839136336299878
1140.6181455848733620.7637088302532770.381854415126638
1150.7518475017454180.4963049965091640.248152498254582
1160.7164229438645430.5671541122709150.283577056135457
1170.764754045726060.4704919085478790.235245954273939
1180.721733987371550.5565320252568990.278266012628450
1190.68469450220320.6306109955936010.315305497796801
1200.6874335694126760.6251328611746470.312566430587324
1210.7587987943491610.4824024113016770.241201205650839
1220.7312424621749790.5375150756500420.268757537825021
1230.7278364337384820.5443271325230360.272163566261518
1240.6781703345446950.643659330910610.321829665455305
1250.7050896736405870.5898206527188250.294910326359413
1260.6775099515985620.6449800968028750.322490048401438
1270.6229428510262560.7541142979474880.377057148973744
1280.5678882665428790.8642234669142420.432111733457121
1290.5357924042596960.9284151914806070.464207595740304
1300.504801347311990.990397305376020.49519865268801
1310.504134783897920.991730432204160.49586521610208
1320.5444457235774940.9111085528450110.455554276422506
1330.477874165436420.955748330872840.52212583456358
1340.4531710012478390.9063420024956770.546828998752161
1350.5853304520022160.8293390959955690.414669547997784
1360.5252433129194680.9495133741610640.474756687080532
1370.4998977659024430.9997955318048870.500102234097557
1380.4493984594198150.898796918839630.550601540580185
1390.4013021812945090.8026043625890180.598697818705491
1400.367840349597460.735680699194920.63215965040254
1410.4900071439018710.9800142878037420.509992856098129
1420.619821294324430.7603574113511390.380178705675570
1430.7482128119620310.5035743760759380.251787188037969
1440.6946479178211170.6107041643577660.305352082178883
1450.603040622605340.793918754789320.39695937739466
1460.6162542076099850.767491584780030.383745792390015
1470.6081787349942460.7836425300115080.391821265005754
1480.4882391621923350.976478324384670.511760837807665
1490.7008164030434740.5983671939130520.299183596956526
1500.6334879224747550.733024155050490.366512077525245
1510.5792083405852760.8415833188294480.420791659414724


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 level20.0138888888888889OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/1014m51293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/1014m51293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/1dl7t1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/1dl7t1293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/2dl7t1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/2dl7t1293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/35upe1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/35upe1293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/45upe1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/45upe1293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/55upe1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/55upe1293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/6ym6h1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/6ym6h1293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/7rvnk1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/7rvnk1293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/8rvnk1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/8rvnk1293555107.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/9rvnk1293555107.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t129355507709nkjb3upuzr0m2/9rvnk1293555107.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 4 ; 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