Home » date » 2010 » Dec » 01 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 01 Dec 2010 15:05:12 +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/01/t1291215806v5qz9c6ybn1nsly.htm/, Retrieved Wed, 01 Dec 2010 16:03:37 +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/01/t1291215806v5qz9c6ybn1nsly.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 «
2 24 48 14 28 11 22 12 24 24 48 26 52 1 25 25 11 11 7 7 8 8 25 25 23 23 1 17 17 6 6 17 17 8 8 30 30 25 25 1 18 18 12 12 10 10 8 8 19 19 23 23 1 18 18 8 8 12 12 9 9 22 22 19 19 1 16 16 10 10 12 12 7 7 22 22 29 29 2 20 40 10 20 11 22 4 8 25 50 25 50 2 16 32 11 22 11 22 11 22 23 46 21 42 1 18 18 16 16 12 12 7 7 17 17 22 22 1 17 17 11 11 13 13 7 7 21 21 25 25 1 23 23 13 13 14 14 12 12 19 19 24 24 2 30 60 12 24 16 32 10 20 19 38 18 36 2 23 46 8 16 11 22 10 20 15 30 22 44 2 18 36 12 24 10 20 8 16 16 32 15 30 1 15 15 11 11 11 11 8 8 23 23 22 22 2 12 24 4 8 15 30 4 8 27 54 28 56 1 21 21 9 9 9 9 9 9 22 22 20 20 1 15 15 8 8 11 11 8 8 14 14 12 12 2 20 40 8 16 17 34 7 14 22 44 24 48 2 31 62 14 28 17 34 11 22 23 46 20 40 1 27 27 15 15 11 11 9 9 23 23 21 21 2 34 68 16 32 18 36 11 22 21 42 20 40 2 21 42 9 18 14 28 13 26 19 38 21 42 1 31 31 14 14 10 10 8 8 18 18 23 23 2 19 38 11 22 11 22 8 16 20 40 28 56 2 16 32 8 16 15 30 9 18 23 46 24 48 2 20 40 9 18 15 30 6 12 25 50 24 48 2 21 42 9 18 13 26 9 18 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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
ParentalExpectations[t] = + 7.56408311336285 -4.02282154930859Gender[t] -0.0497128514879975ConcernoverMistakes[t] + 0.0139238377293544`C*G`[t] -0.0584300461850058Doubtsaboutactions[t] + 0.0411688955628657`D*G`[t] + 0.554368493058405`PE*G`[t] + 0.762594333796532ParentalCriticism[t] -0.413361375350402`PC*G`[t] + 0.229602388869078PersonalStandards[t] -0.11794509827969`PS*G`[t] -0.205802809085591Organization[t] + 0.101854058940112`O*G`[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.564083113362851.5634694.8383e-062e-06
Gender-4.022821549308590.950195-4.23374e-052e-05
ConcernoverMistakes-0.04971285148799750.04408-1.12780.2612550.130628
`C*G`0.01392383772935440.0270930.51390.6080830.304042
Doubtsaboutactions-0.05843004618500580.075433-0.77460.4398330.219917
`D*G`0.04116889556286570.0473290.86990.3858080.192904
`PE*G`0.5543684930584050.01288243.034200
ParentalCriticism0.7625943337965320.0785689.706100
`PC*G`-0.4133613753504020.047198-8.757900
PersonalStandards0.2296023888690780.0578573.96840.0001135.7e-05
`PS*G`-0.117945098279690.034576-3.41110.0008370.000418
Organization-0.2058028090855910.054165-3.79950.0002120.000106
`O*G`0.1018540589401120.0332743.06110.0026260.001313


Multiple Linear Regression - Regression Statistics
Multiple R0.979951191393236
R-squared0.960304337513023
Adjusted R-squared0.957041680322313
F-TEST (value)294.331975865330
F-TEST (DF numerator)12
F-TEST (DF denominator)146
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.714124047186037
Sum Squared Residuals74.4560805963274


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11110.54958070773970.450419292260260
279.5317176936113-2.5317176936113
31715.79840944003111.20159055996895
41010.7581413749384-0.758141374938443
51213.0359227943400-1.03592279434002
61211.33502510226600.664974897734024
71111.0502446508432-0.0502446508432135
81110.73366856177330.266331438226719
91211.32923496908730.67076503091273
101312.14048114093610.859518859063858
111414.0723922113957-0.0723922113957462
121616.0907124941696-0.0907124941696067
131110.62122528196740.378774718032598
14109.854077020315750.145922979684245
151111.9877159723979-0.987715972397948
161515.4978078449037-0.49780784490372
17911.1442403731213-2.14424037312126
181112.0740713104147-1.07407131041468
191717.4834239412261-0.483423941226097
201717.1319307640624-0.131930764062352
211111.9423849133973-0.942384913397281
221818.2354633273534-0.235463327353353
231413.79963254704850.200367452951524
241010.1467046042424-0.146704604242418
251110.86465886903160.135341130968438
261515.2188660316108-0.218866031610784
271515.3351227077666-0.335122707766567
281312.94112515493270.0588748450673461
291614.90049914151381.09950085848621
301313.2042023778971-0.204202377897087
3198.608674375862440.391325624137565
321818.0717900238226-0.0717900238226058
331815.51265614124162.48734385875843
341211.76544036238720.23455963761279
351715.95336749424581.04663250575424
3699.73994282533566-0.739942825335656
37910.0945972746802-1.09459727468024
381210.80971412098821.19028587901178
391817.19783932601920.80216067398083
401211.88412414763180.115875852368246
411818.3087161840174-0.308716184017430
421413.90341944598640.096580554013632
431515.3583326939882-0.358332693988225
441616.5756783300809-0.575678330080885
451011.5026866827912-1.50268668279115
461111.3236366995712-0.323636699571206
471414.1334254325684-0.133425432568411
48910.2815454848804-1.28154548488042
491212.1776652544908-0.177665254490788
501714.95386174169092.04613825830906
5154.424748454196960.575251545803043
521211.94953649842740.0504635015726222
531211.92762293417840.0723770658216422
5465.689445622511210.310554377488794
552424.1940683193530-0.194068319352962
561211.49789905243800.502100947561969
571212.1240506408088-0.124050640808757
581414.2785506948979-0.278550694897936
5976.731074229242930.268925770757075
601313.3499528417808-0.349952841780756
611212.6540727377824-0.654072737782425
621313.1259791121347-0.125979112134686
631412.62913607718681.37086392281317
6487.527227693747860.472772306252141
651110.58564540397190.414354596028115
6699.39190224187301-0.391902241873014
671111.1473204132457-0.147320413245734
681313.5383971172275-0.538397117227497
691010.1566179309609-0.156617930960873
701110.81763872816690.182361271833136
711211.78158260019910.218417399800924
7298.66768347215730.332316527842702
731514.90732069896950.0926793010304781
741818.3020217735624-0.302021773562364
751515.2018369603855-0.201836960385467
761212.0420103843867-0.0420103843866668
771313.4133002319974-0.413300231997438
781413.44850438596490.551495614035051
79109.75887151357920.241128486420798
801312.99473219959080.00526780040917663
811312.90879419091550.0912058090844854
821110.88091594011450.119084059885525
831313.0811661890698-0.081166189069839
841615.34627981854330.653720181456747
8587.723478190994640.276521809005361
861616.4371206292828-0.43712062928278
871110.96005794142470.0399420585752663
88910.0995542833964-1.09955428339636
891616.8190670212398-0.819067021239801
901212.0471427886204-0.0471427886204004
911414.1367790178915-0.136779017891527
9287.734711431620690.265288568379308
9399.0215986035023-0.0215986035023019
941515.3425422885411-0.342542288541094
951110.68439342885660.315606571143370
962121.3379608954175-0.337960895417492
971413.98389428875570.0161057112443153
981816.61029293269271.38970706730728
991211.62988005041850.370119949581526
1001312.61675081031590.383249189684101
1011515.0557809459990-0.0557809459990443
1021211.56998273884060.430017261159416
1031919.5617535527112-0.56175355271117
1041515.1277722604393-0.127772260439273
1051111.2854732045681-0.285473204568122
1061110.58804101508870.411958984911257
107109.740213931577920.259786068422081
1081312.83025343078880.169746569211176
1091514.83550669007320.164493309926800
1101212.2632081527268-0.263208152726758
1111212.1535711603963-0.153571160396323
1121615.90427469311480.0957253068851773
11398.33095235808610.669047641913901
1141818.1353349731023-0.135334973102288
11587.399058882371690.600941117628312
1161311.63353643981441.36646356018559
1171717.3954286994524-0.395428699452431
11898.838024303513370.161975696486628
1191515.1718137246818-0.171813724681842
12087.848531424181560.151468575818437
12176.442414132978910.557585867021086
1221212.1823892781054-0.182389278105418
1231414.9313746103498-0.931374610349844
12467.92237291987548-1.92237291987548
12588.91839571134878-0.918395711348782
1261717.4994012580397-0.499401258039671
1271010.0239761692677-0.0239761692676851
1281111.5046331936122-0.504633193612202
1291414.1226004162867-0.122600416286716
1301110.59882686691800.401173133082016
1311312.81994774375700.180052256243035
1321211.86316546896180.136834531038244
1331110.48716637020460.512833629795364
13498.835806387511980.16419361248802
1351211.94138244493710.0586175550628829
1362017.58226874599472.41773125400534
1371211.46299754397730.537002456022705
1381314.0332818951934-1.03328189519336
1391211.88336551261170.116634487388332
1401211.64962910270980.350370897290232
14198.424725032197910.575274967802092
1421515.0195032480584-0.0195032480583685
1432424.0354877283835-0.0354877283835392
14478.00755235831579-1.00755235831579
1451716.11236942229060.887630577709371
1461110.85816677824020.141833221759800
1471717.1301679489920-0.130167948992033
1481111.4786431655151-0.478643165515068
1491212.3740446850354-0.374044685035397
1501414.0234733525441-0.0234733525441383
1511110.65787559742550.342124402574511
1521616.3143234741159-0.314323474115905
1532121.5420338421294-0.542033842129365
1541413.32921307871190.67078692128807
1552020.4923907824139-0.492390782413934
1561313.2272551833787-0.22725518337873
1571110.72282305365040.277176946349599
1581515.1535624733354-0.153562473335444
1591918.09555136793990.90444863206013


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.7899628453100630.4200743093798750.210037154689937
170.7087775791094770.5824448417810450.291222420890523
180.6181369523007010.7637260953985980.381863047699299
190.9247172436571550.1505655126856900.0752827563428449
200.8792575959519040.2414848080961930.120742404048096
210.890213577334210.2195728453315800.109786422665790
220.9041426752556250.191714649488750.095857324744375
230.8596296797959540.2807406404080930.140370320204046
240.8894692663229350.221061467354130.110530733677065
250.888297739688360.2234045206232810.111702260311641
260.866669190769680.2666616184606400.133330809230320
270.8208806304502030.3582387390995950.179119369549797
280.7660818031673150.4678363936653690.233918196832685
290.8716475785843880.2567048428312240.128352421415612
300.8333240087447150.333351982510570.166675991255285
310.8885977515739130.2228044968521740.111402248426087
320.8706720438203130.2586559123593740.129327956179687
330.9936267797588230.01274644048235480.0063732202411774
340.9962973727920850.00740525441583080.0037026272079154
350.9980370102571050.003925979485789510.00196298974289476
360.9989773846692560.002045230661488970.00102261533074448
370.999225365576490.001549268847020890.000774634423510447
380.9992644958578070.001471008284385590.000735504142192795
390.9996759156571680.0006481686856637580.000324084342831879
400.9995348674551170.0009302650897668780.000465132544883439
410.999462582779840.001074834440319030.000537417220159516
420.9991468690312770.001706261937445680.00085313096872284
430.9988853848776450.002229230244709300.00111461512235465
440.9986899272577590.002620145484483090.00131007274224155
450.9997050814996050.0005898370007904240.000294918500395212
460.9995701910633370.0008596178733256620.000429808936662831
470.9993246140419030.001350771916193310.000675385958096657
480.9998023267318750.0003953465362509290.000197673268125465
490.9997518022793120.0004963954413759930.000248197720687996
500.9999875893661972.4821267605259e-051.24106338026295e-05
510.999990801267171.83974656618052e-059.19873283090262e-06
520.9999840744700753.18510598492757e-051.59255299246378e-05
530.999972345235585.53095288409733e-052.76547644204867e-05
540.9999646837233437.0632553314277e-053.53162766571385e-05
550.9999405669304820.0001188661390370815.94330695185407e-05
560.9999220494548150.0001559010903704847.79505451852422e-05
570.9998741989800850.0002516020398302350.000125801019915117
580.9998069354319010.0003861291361977520.000193064568098876
590.9997221550829530.0005556898340940680.000277844917047034
600.99962557155090.0007488568981979790.000374428449098989
610.999587481647390.0008250367052205290.000412518352610264
620.9993642540454530.001271491909093150.000635745954546577
630.999815054204490.0003698915910185480.000184945795509274
640.9997713768598540.0004572462802911660.000228623140145583
650.9997624191173520.000475161765296940.00023758088264847
660.9997285336635330.0005429326729345040.000271466336467252
670.999870235051290.0002595298974180450.000129764948709022
680.9998417333572760.0003165332854472560.000158266642723628
690.9998849570733820.0002300858532366310.000115042926618315
700.9998205899887330.0003588200225335930.000179410011266797
710.9997289630125940.0005420739748118230.000271036987405911
720.9996163461068140.0007673077863717210.000383653893185860
730.9994062349152860.001187530169427840.000593765084713918
740.9991728640466380.001654271906723360.00082713595336168
750.9987850065943130.002429986811374250.00121499340568713
760.9985270942339880.002945811532023590.00147290576601179
770.9980744488066110.003851102386777730.00192555119338886
780.9979014380308190.004197123938362440.00209856196918122
790.9969950052840420.006009989431915950.00300499471595797
800.9956409080857970.008718183828406390.00435909191420319
810.9937806702191020.01243865956179580.00621932978089792
820.9920070884440880.01598582311182380.00799291155591189
830.9888757772253080.02224844554938500.0111242227746925
840.9887446834923780.02251063301524350.0112553165076217
850.9848352160180260.03032956796394780.0151647839819739
860.9814339401875610.03713211962487760.0185660598124388
870.9749862494898130.05002750102037480.0250137505101874
880.978588998488310.04282200302338120.0214110015116906
890.9885135136205030.02297297275899400.0114864863794970
900.9840990886853080.03180182262938310.0159009113146916
910.978660077284350.04267984543129930.0213399227156497
920.9721576114129780.05568477717404440.0278423885870222
930.9639193064635070.07216138707298620.0360806935364931
940.9541914714937660.09161705701246880.0458085285062344
950.9423135918176230.1153728163647550.0576864081823774
960.928154027998230.1436919440035390.0718459720017693
970.9086516811692880.1826966376614240.091348318830712
980.936380272954890.1272394540902200.0636197270451098
990.9216145698430080.1567708603139850.0783854301569925
1000.9034383832435670.1931232335128650.0965616167564326
1010.8787995120410830.2424009759178350.121200487958917
1020.8654604820018060.2690790359963880.134539517998194
1030.8462128127458940.3075743745082110.153787187254106
1040.8127071853433390.3745856293133230.187292814656661
1050.7860633299136470.4278733401727070.213936670086353
1060.7465907528148140.5068184943703730.253409247185186
1070.7074576384322180.5850847231355640.292542361567782
1080.6622635397469540.6754729205060930.337736460253046
1090.6134203929030740.7731592141938520.386579607096926
1100.5644486830284460.8711026339431080.435551316971554
1110.5107945763827370.9784108472345250.489205423617263
1120.4568452608431230.9136905216862450.543154739156877
1130.440743114243530.881486228487060.55925688575647
1140.3915859260709250.783171852141850.608414073929075
1150.3679316320662020.7358632641324040.632068367933798
1160.5604105801212110.8791788397575780.439589419878789
1170.533362251403750.93327549719250.46663774859625
1180.4747681101537090.9495362203074190.525231889846291
1190.4153185301403550.8306370602807110.584681469859645
1200.3659621976185860.7319243952371720.634037802381414
1210.3258788284924060.6517576569848120.674121171507594
1220.2981127250729290.5962254501458590.701887274927071
1230.3050381353234410.6100762706468820.69496186467656
1240.6100258340400730.7799483319198530.389974165959927
1250.5841931299750030.8316137400499930.415806870024997
1260.5387894557996550.922421088400690.461210544200345
1270.4698291469661260.9396582939322530.530170853033874
1280.4935460108850450.987092021770090.506453989114955
1290.4217281711577860.8434563423155710.578271828842214
1300.3836725779686080.7673451559372150.616327422031392
1310.3140078404963550.628015680992710.685992159503645
1320.2490583913491760.4981167826983520.750941608650824
1330.1978786618145290.3957573236290580.802121338185471
1340.1500273175322340.3000546350644680.849972682467766
1350.1125492836864490.2250985673728980.88745071631355
1360.6352727336115460.7294545327769090.364727266388454
1370.7484534021088470.5030931957823060.251546597891153
1380.7235065790942210.5529868418115580.276493420905779
1390.6289477224504980.7421045550990030.371052277549501
1400.5147411623557790.9705176752884430.485258837644221
1410.39388252694710.78776505389420.6061174730529
1420.3401855165921250.680371033184250.659814483407875
1430.9950880593138450.00982388137231070.00491194068615535


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level480.375NOK
5% type I error level590.4609375NOK
10% type I error level630.4921875NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/10h6fy1291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/10h6fy1291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/152bg1291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/152bg1291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/252bg1291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/252bg1291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/3yba01291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/3yba01291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/4yba01291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/4yba01291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/5yba01291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/5yba01291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/6929l1291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/6929l1291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/71c8o1291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/71c8o1291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/81c8o1291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/81c8o1291215898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/91c8o1291215898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291215806v5qz9c6ybn1nsly/91c8o1291215898.ps (open in new window)


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