Home » date » 2010 » Dec » 20 »

Multiple Regressie: Allochtonen

*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: Mon, 20 Dec 2010 13:37:34 +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/20/t1292852167hak0hmq9i61lue9.htm/, Retrieved Mon, 20 Dec 2010 14:36:22 +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/20/t1292852167hak0hmq9i61lue9.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 «
22.037 17.759 14.116 104.708 158.620 21.732 17.530 13.504 101.817 154.583 21.172 17.139 13.168 97.898 149.377 21.388 16.916 13.064 95.559 146.927 22.053 16.543 12.828 92.822 144.246 22.687 16.317 12.541 90.848 142.393 24.793 18.161 13.547 101.141 157.642 26.113 19.144 13.710 105.841 164.808 23.708 16.947 12.535 93.647 146.837 23.554 16.491 12.386 90.923 143.354 23.222 16.428 12.253 89.130 141.033 23.363 16.639 12.484 90.212 142.698 24.023 16.821 12.966 93.196 147.006 23.355 16.765 12.770 91.861 144.751 23.276 16.533 12.660 90.593 143.062 23.085 16.554 12.514 89.895 142.048 23.173 16.494 12.430 88.819 140.916 23.487 16.612 12.372 87.924 140.395 25.576 17.933 13.085 96.906 153.500 26.311 19.070 13.454 101.217 160.052 27.109 18.179 13.361 98.709 157.358 27.060 17.830 13.713 98.139 156.742 26.490 17.349 13.601 95.529 152.969 27.157 17.919 14.090 98.577 157.743 26.973 18.269 14.452 100.772 160.466 27.589 18.385 14.108 100.180 160.262 27.246 18.260 14.036 99.200 158.742 26.845 17.905 13.3 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
Allochtonen[t] = + 5.95971907838046e-14 -1.00000000000000PmAH[t] -1`50+`[t] -1`Kort-geschoolden`[t] + 1Totaal_NWW[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.95971907838046e-1401.840.0681220.034061
PmAH-1.000000000000000-30212687709103700
`50+`-10-84749913659561100
`Kort-geschoolden`-10-99578337870196500
Totaal_NWW10117255418822785600


Multiple Linear Regression - Regression Statistics
Multiple R1
R-squared1
Adjusted R-squared1
F-TEST (value)2.07693327813918e+30
F-TEST (DF numerator)4
F-TEST (DF denominator)126
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.83887387350201e-14
Sum Squared Residuals1.01545981357619e-25


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
122.03722.0370000000001-1.39436549705867e-13
221.73221.73199999999972.64988403957292e-13
321.17221.1720000000000-1.63708577568790e-14
421.38821.3880000000000-2.83244468699482e-14
522.05322.053-2.19086514796257e-14
622.68722.687-4.70488549618069e-15
724.79324.7936.32464805708135e-15
826.11326.113-2.55942390497803e-15
923.70823.7081.25329906294968e-14
1023.55423.554-1.89517626303593e-14
1123.22223.2229.0995267982118e-15
1223.36323.363-7.4410747227253e-15
1324.02324.023-9.27529025607326e-15
1423.35523.355-1.81055653441793e-15
1523.27623.276-6.42702660725644e-15
1623.08523.085-1.34987256723788e-14
1723.17323.1732.67075489194684e-15
1823.48723.487-1.29294747517701e-14
1925.57625.5767.18821858850646e-15
2026.31126.3115.6017887642539e-15
2127.10927.109-4.06738836503146e-15
2227.0627.061.7766533621944e-15
2326.4926.492.18172716581063e-15
2427.15727.1577.19267980525531e-15
2526.97326.973-6.90657330022654e-15
2627.58927.5896.05155331606072e-15
2727.24627.2466.95565589504913e-15
2826.84526.8457.52633754254068e-15
2926.58226.582-1.42612980764935e-14
3026.54426.544-3.58898580658815e-15
3129.10529.105-8.67059108819859e-15
3228.70328.703-1.13440623138335e-15
3327.92127.921-7.194622204126e-15
3428.56628.5662.06907626305457e-14
3529.8629.862.13090130407413e-15
3630.19430.194-5.23099051848936e-15
3731.3331.33-3.54336827745476e-16
3831.01831.018-7.9611202701636e-15
3930.95430.954-6.94664083384472e-15
4031.39831.3983.57478356886525e-15
4131.26731.2675.02829597065022e-15
4232.06932.0696.45437251800447e-15
4334.66534.665-6.78104387705468e-16
4435.83435.8345.10858532776871e-15
4534.03434.034-1.10795700859167e-14
4634.43534.435-4.7747415593056e-15
4734348.50868602597298e-17
4835.21635.216-6.76033964642284e-15
4935.73435.7341.03583681751205e-14
5035.34735.347-1.18265067764993e-14
5135.35735.357-1.14514349403553e-14
5234.80234.802-3.05989596168257e-15
5334.49334.493-8.546966181921e-15
5435.04735.0473.7522330975807e-15
5537.38637.3865.36417841553899e-15
5638.69138.691-7.05591602176881e-15
5737.24937.2497.89923930641528e-15
5837.66837.668-7.26322072956547e-15
5936.76436.7641.93218718708355e-14
6037.92637.9269.9281263597166e-15
6138.14538.145-4.35340287074763e-15
6237.66437.664-6.52408093035672e-15
6337.44937.449-4.29705502239248e-15
6437.38937.389-2.56569290670593e-15
6537.12137.121-4.10681666736668e-15
6637.44737.447-5.80212980716945e-16
6739.75139.751-1.24773250931881e-14
6840.15440.1541.22061902207135e-14
6938.81438.814-1.22927270461425e-15
7038.67338.6738.05726738434459e-15
7137.94837.948-3.9577393911937e-15
7239.16139.1613.19349094593801e-15
7337.40837.408-5.01459276703801e-15
7437.35637.3561.79278681176569e-14
7536.60636.6061.80854066088765e-14
7637.0437.04-3.88140633968540e-15
7736.34936.349-1.21460367165643e-14
7836.15836.158-4.97433209911962e-15
7937.34237.342-1.20990581254355e-14
8036.836.8-2.28719225939759e-14
8137.13537.1353.03512539732841e-15
8234.26534.265-1.45030778748095e-14
8333.22633.226-4.15571263003123e-15
8432.35732.357-1.02603896327229e-15
8536.8736.87-1.41072870192564e-14
8635.8835.88-8.74313967220859e-16
8734.80834.808-8.8964321286908e-16
8834.02534.025-2.12612364044014e-15
8933.90133.9011.55408387289965e-14
9037.45937.459-2.08024899231367e-14
9137.15237.1526.1560876688198e-16
9234.92934.9291.86505646291389e-14
9334.11634.116-4.52501573838639e-15
9433.7133.71-2.42001630012801e-15
9534.26434.2646.95437905820048e-15
9634.82634.8269.64635865360283e-15
9734.09634.096-5.10283280681074e-15
9833.95533.955-1.0963472083258e-14
9934.11134.111-1.12909829064628e-15
10032.34432.3445.8772776920021e-15
10132.87132.8717.56375695590457e-15
10236.24436.244-4.8498490713393e-15
10335.98835.9884.07385931710708e-15
10435.43935.439-2.26071291692842e-16
10535.69235.692-4.61896243239328e-16
10635.80435.8041.27203387734614e-14
10737.74737.747-4.14407304817765e-15
10840.67340.673-1.00875468710497e-14
10941.60141.6014.45754323316784e-15
11042.27342.2735.48898593899409e-15
11141.95241.952-5.54595616720295e-15
11241.46341.463-1.13464192298241e-14
11342.75942.759-3.41321875646778e-15
11445.43445.4341.34586081960627e-14
11545.77645.7761.25601586156790e-14
11644.6344.63-1.19609632033471e-14
11744.79344.7939.90873329165066e-15
11844.75744.757-1.45312139867557e-14
11949.09949.0999.33557350758775e-15
12047.97447.9743.54983116452130e-15
12147.91947.9191.01674814794200e-14
12247.51947.519-9.60876029656346e-15
12347.13647.1361.23573860063422e-15
12445.9145.91-1.78353101437798e-14
12546.43646.4369.64810281214765e-15
12650.33450.3344.88187491482466e-15
12750.29450.2947.60689157353962e-15
12847.22447.224-4.36687414070035e-15
12947.0347.031.60700817220776e-15
13045.7945.791.61975627163457e-14
13138.25238.2521.04944286653876e-14


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.0279768816288820.0559537632577640.972023118371118
90.0005319684630029660.001063936926005930.999468031536997
100.0001380683855482530.0002761367710965060.999861931614452
110.003306893809123240.006613787618246470.996693106190877
120.9203765067076880.1592469865846250.0796234932923125
130.01890940887519390.03781881775038790.981090591124806
140.7217024928134460.5565950143731070.278297507186554
150.02070596098147790.04141192196295580.979294039018522
161.20904919381343e-082.41809838762686e-080.999999987909508
174.60128861656144e-089.20257723312289e-080.999999953987114
180.001020699595454450.002041399190908910.998979300404546
190.1792386785982250.3584773571964490.820761321401775
200.9976992450514460.004601509897108830.00230075494855442
211.03887465157732e-112.07774930315464e-110.999999999989611
220.0003534834638174360.0007069669276348730.999646516536183
237.0172294904418e-061.40344589808836e-050.99999298277051
243.12219380973743e-166.24438761947486e-161
250.9999658390562586.83218874838026e-053.41609437419013e-05
265.4002030424953e-201.08004060849906e-191
271.52845707203577e-123.05691414407155e-120.999999999998472
280.5422749702373230.9154500595253540.457725029762677
292.0012914112302e-074.0025828224604e-070.99999979987086
303.07314842685570e-166.14629685371139e-161
310.9999999999797674.0466935571821e-112.02334677859105e-11
320.01179165891100540.02358331782201090.988208341088995
334.61356224759908e-119.22712449519816e-110.999999999953864
346.07328668138620e-081.21465733627724e-070.999999939267133
351.57921930731923e-253.15843861463845e-251
363.66102752688546e-127.32205505377092e-120.99999999999634
371.91751650693865e-063.83503301387729e-060.999998082483493
389.7703249138767e-050.0001954064982775340.999902296750861
396.39446454256804e-071.27889290851361e-060.999999360553546
401.85116022335405e-453.70232044670809e-451
417.22580195938298e-050.0001445160391876600.999927741980406
422.69944630911712e-225.39889261823424e-221
430.1915420006826570.3830840013653140.808457999317343
445.66396905209328e-121.13279381041866e-110.999999999994336
453.56308295974313e-147.12616591948626e-140.999999999999964
468.57333592588901e-081.71466718517780e-070.99999991426664
470.9999998406350383.18729923309085e-071.59364961654542e-07
480.9993989954965380.001202009006924000.000601004503461998
490.003947416004424050.00789483200884810.996052583995576
504.03405950669529e-228.06811901339058e-221
510.7899682044181780.4200635911636440.210031795581822
520.01228797968668630.02457595937337250.987712020313314
531.37258618850530e-142.74517237701059e-140.999999999999986
540.001309245557735810.002618491115471610.998690754442264
554.80805033002905e-429.6161006600581e-421
560.4641674328603480.9283348657206960.535832567139652
570.9972685155503780.005462968899244560.00273148444962228
583.57031536401388e-157.14063072802777e-150.999999999999996
594.76548349423128e-279.53096698846255e-271
602.80340330323686e-095.60680660647373e-090.999999997196597
610.9999999613056057.73887895038263e-083.86943947519131e-08
620.4909295971778020.9818591943556030.509070402822198
630.999999366763561.26647287753143e-066.33236438765713e-07
640.9998540883534310.0002918232931380830.000145911646569041
650.741019580199860.5179608396002790.258980419800139
660.8205304425285440.3589391149429120.179469557471456
6714.52278779009158e-272.26139389504579e-27
680.07835783348163320.1567156669632660.921642166518367
693.2748725809629e-206.5497451619258e-201
700.9897717688047480.02045646239050430.0102282311952521
711.17851875153289e-242.35703750306577e-241
725.79165372512274e-091.15833074502455e-080.999999994208346
730.0001407353471978390.0002814706943956780.999859264652802
740.00309021570022040.00618043140044080.99690978429978
750.9763306849863610.04733863002727740.0236693150136387
760.0414115297448680.0828230594897360.958588470255132
770.9956956372664470.008608725467106220.00430436273355311
780.9055757662180310.1888484675639380.0944242337819689
791.24302848065296e-062.48605696130592e-060.99999875697152
800.04947007657512060.09894015315024120.95052992342488
813.00435794432421e-366.00871588864842e-361
826.73836151010632e-071.34767230202126e-060.99999932616385
830.9999464630549380.0001070738901241165.35369450620582e-05
848.71392515186244e-211.74278503037249e-201
850.06727691059630.13455382119260.9327230894037
864.47992219842564e-218.95984439685128e-211
871.95373742389373e-213.90747484778745e-211
880.9978972247250840.004205550549832050.00210277527491603
890.9999687530732576.24938534862937e-053.12469267431468e-05
900.9999999999999991.99469534001525e-159.97347670007623e-16
9113.69652991042511e-211.84826495521255e-21
921.08178177068417e-062.16356354136834e-060.99999891821823
930.9995448121673050.0009103756653903030.000455187832695152
940.991239356966190.01752128606761990.00876064303380995
957.35040528323005e-061.47008105664601e-050.999992649594717
964.37121078528351e-058.74242157056703e-050.999956287892147
970.999999999999941.20408929999822e-136.02044649999108e-14
980.0003688520540700150.000737704108140030.99963114794593
990.0003103594186312030.0006207188372624060.99968964058137
1006.41450429834065e-081.28290085966813e-070.999999935854957
1010.9993003848160670.001399230367865420.000699615183932712
1020.6044055415466620.7911889169066760.395594458453338
1030.9963589148990060.007282170201987820.00364108510099391
1040.9480924829506870.1038150340986260.0519075170493129
1050.999996066837317.86632538046704e-063.93316269023352e-06
1061.34989815188627e-132.69979630377255e-130.999999999999865
1070.999999918010571.63978859638475e-078.19894298192377e-08
1080.9978719498777980.004256100244403920.00212805012220196
1090.9999999999226561.54687538033950e-107.73437690169749e-11
1100.999999943007811.13984381358541e-075.69921906792706e-08
1110.9993923047416280.001215390516743520.000607695258371761
1120.8857046386553880.2285907226892230.114295361344612
1130.999412117994540.001175764010917750.000587882005458874
1140.9999571054278488.578914430385e-054.2894572151925e-05
1150.9999990717830161.85643396810402e-069.28216984052011e-07
1160.7307882143695670.5384235712608660.269211785630433
1170.9973425109062040.005314978187592530.00265748909379627
1180.9999142758972670.0001714482054653918.57241027326954e-05
1190.580407127056740.839185745886520.41959287294326
1200.998804866882530.00239026623494140.0011951331174707
1210.9996371157104530.00072576857909440.0003628842895472
1220.9743489610117440.05130207797651180.0256510389882559
1230.968026853949040.06394629210192210.0319731460509610


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level860.741379310344828NOK
5% type I error level930.801724137931034NOK
10% type I error level980.844827586206897NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/10gn0u1292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/10gn0u1292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/19m301292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/19m301292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/2kvk31292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/2kvk31292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/3kvk31292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/3kvk31292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/4u4j61292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/4u4j61292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/5u4j61292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/5u4j61292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/6u4j61292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/6u4j61292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/7nv091292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/7nv091292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/8nv091292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/8nv091292852241.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/9gn0u1292852241.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292852167hak0hmq9i61lue9/9gn0u1292852241.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by