Home » date » 2008 » Dec » 17 »

paper

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 17 Dec 2008 08:17:46 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn.htm/, Retrieved Wed, 17 Dec 2008 16:20:47 +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/2008/Dec/17/t1229527236ruka05kygbl5awn.htm/},
    year = {2008},
}
@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 = {2008},
    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 «
6392.3 0 8686.4 0 9244.7 0 8182.7 0 7451.4 0 7988.8 0 8243.5 0 8843 0 9092.7 0 8246.7 0 9311.7 0 8341.2 0 7116.7 0 9635.7 0 9815.4 0 8611.3 0 8297.8 0 8715.1 0 8919.9 0 10085.8 0 9511.7 0 8991.3 0 10311.2 0 8895.4 0 7449.8 0 10084 0 9859.4 0 9100.1 0 8920.8 0 8502.7 0 8599.6 0 10394.4 0 9290.4 0 8742.2 0 10217.3 0 8639 0 8139.6 0 10779.1 0 10427.7 0 10349.1 0 10036.4 0 9492.1 0 10638.8 0 12054.5 0 10324.7 0 11817.3 0 11008.9 0 9996.6 0 9419.5 0 11958.8 0 12594.6 0 11890.6 0 10871.7 0 11835.7 0 11542.2 0 13093.7 0 11180.2 0 12035.7 0 12112 0 10875.2 0 9897.3 0 11672.1 1 12385.7 1 11405.6 1 9830.9 1 11025.1 1 10853.8 1 12252.6 1 11839.4 1 11669.1 1 11601.4 1 11178.4 1 9516.4 1 12102.8 1 12989 1 11610.2 1 10205.5 1 11356.2 1 11307.1 1 12648.6 1 11947.2 1 11714.1 1 12192.5 1 11268.8 1 9097.4 1 12639.8 1 13040.1 1 11687.3 1 11191.7 1 11391.9 1 11793.1 1 13933.2 1 12778.1 1 11810.3 1 13698.4 1 11956.6 1 10723.8 1 13938.9 1 13979.8 1 13807.4 1 12973.9 1 12509.8 1 12934.1 1 14908.3 1 13772.1 1 13012.6 1 14049.9 1 11816.5 1 11593.2 1 14466.2 1 13615.9 1 14733.9 1 13880.7 1 13527.5 1 13584 1 16170.2 1 13260.6 1 14741.9 1 15486.5 1 13154.5 1 12621.2 1
 
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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 9723.01803278689 + 2757.87863387978x[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9723.01803278689185.12503352.521400
x2757.87863387978262.89492910.490400


Multiple Linear Regression - Regression Statistics
Multiple R0.69315249945439
R-squared0.480460387499869
Adjusted R-squared0.476094508403229
F-TEST (value)110.048944751965
F-TEST (DF numerator)1
F-TEST (DF denominator)119
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1445.87272923845
Sum Squared Residuals248775205.949497


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16392.39723.01803278682-3330.71803278682
28686.49723.01803278689-1036.61803278689
39244.79723.01803278689-478.318032786886
48182.79723.01803278689-1540.31803278689
57451.49723.01803278689-2271.61803278689
67988.89723.01803278689-1734.21803278689
78243.59723.01803278689-1479.51803278689
888439723.01803278689-880.018032786887
99092.79723.01803278689-630.318032786886
108246.79723.01803278689-1476.31803278689
119311.79723.01803278689-411.318032786886
128341.29723.01803278689-1381.81803278689
137116.79723.01803278689-2606.31803278689
149635.79723.01803278689-87.3180327868858
159815.49723.0180327868992.3819672131131
168611.39723.01803278689-1111.71803278689
178297.89723.01803278689-1425.21803278689
188715.19723.01803278689-1007.91803278689
198919.99723.01803278689-803.118032786887
2010085.89723.01803278689362.781967213113
219511.79723.01803278689-211.318032786886
228991.39723.01803278689-731.718032786887
2310311.29723.01803278689588.181967213114
248895.49723.01803278689-827.618032786887
257449.89723.01803278689-2273.21803278689
26100849723.01803278689360.981967213113
279859.49723.01803278689136.381967213113
289100.19723.01803278689-622.918032786886
298920.89723.01803278689-802.218032786887
308502.79723.01803278689-1220.31803278689
318599.69723.01803278689-1123.41803278689
3210394.49723.01803278689671.381967213113
339290.49723.01803278689-432.618032786887
348742.29723.01803278689-980.818032786886
3510217.39723.01803278689494.281967213113
3686399723.01803278689-1084.01803278689
378139.69723.01803278689-1583.41803278689
3810779.19723.018032786891056.08196721311
3910427.79723.01803278689704.681967213114
4010349.19723.01803278689626.081967213114
4110036.49723.01803278689313.381967213113
429492.19723.01803278689-230.918032786886
4310638.89723.01803278689915.781967213113
4412054.59723.018032786892331.48196721311
4510324.79723.01803278689601.681967213114
4611817.39723.018032786892094.28196721311
4711008.99723.018032786891285.88196721311
489996.69723.01803278689273.581967213114
499419.59723.01803278689-303.518032786887
5011958.89723.018032786892235.78196721311
5112594.69723.018032786892871.58196721311
5211890.69723.018032786892167.58196721311
5310871.79723.018032786891148.68196721311
5411835.79723.018032786892112.68196721311
5511542.29723.018032786891819.18196721311
5613093.79723.018032786893370.68196721311
5711180.29723.018032786891457.18196721311
5812035.79723.018032786892312.68196721311
59121129723.018032786892388.98196721311
6010875.29723.018032786891152.18196721311
619897.39723.01803278689174.281967213113
6211672.112480.8966666667-808.796666666666
6312385.712480.8966666667-95.1966666666661
6411405.612480.8966666667-1075.29666666667
659830.912480.8966666667-2649.99666666667
6611025.112480.8966666667-1455.79666666667
6710853.812480.8966666667-1627.09666666667
6812252.612480.8966666667-228.296666666666
6911839.412480.8966666667-641.496666666667
7011669.112480.8966666667-811.796666666666
7111601.412480.8966666667-879.496666666667
7211178.412480.8966666667-1302.49666666667
739516.412480.8966666667-2964.49666666667
7412102.812480.8966666667-378.096666666668
751298912480.8966666667508.103333333333
7611610.212480.8966666667-870.696666666666
7710205.512480.8966666667-2275.39666666667
7811356.212480.8966666667-1124.69666666667
7911307.112480.8966666667-1173.79666666667
8012648.612480.8966666667167.703333333334
8111947.212480.8966666667-533.696666666666
8211714.112480.8966666667-766.796666666666
8312192.512480.8966666667-288.396666666667
8411268.812480.8966666667-1212.09666666667
859097.412480.8966666667-3383.49666666667
8612639.812480.8966666667158.903333333332
8713040.112480.8966666667559.203333333334
8811687.312480.8966666667-793.596666666667
8911191.712480.8966666667-1289.19666666667
9011391.912480.8966666667-1088.99666666667
9111793.112480.8966666667-687.796666666666
9213933.212480.89666666671452.30333333333
9312778.112480.8966666667297.203333333334
9411810.312480.8966666667-670.596666666667
9513698.412480.89666666671217.50333333333
9611956.612480.8966666667-524.296666666666
9710723.812480.8966666667-1757.09666666667
9813938.912480.89666666671458.00333333333
9913979.812480.89666666671498.90333333333
10013807.412480.89666666671326.50333333333
10112973.912480.8966666667493.003333333333
10212509.812480.896666666728.9033333333325
10312934.112480.8966666667453.203333333334
10414908.312480.89666666672427.40333333333
10513772.112480.89666666671291.20333333333
10613012.612480.8966666667531.703333333334
10714049.912480.89666666671569.00333333333
10811816.512480.8966666667-664.396666666667
10911593.212480.8966666667-887.696666666666
11014466.212480.89666666671985.30333333333
11113615.912480.89666666671135.00333333333
11214733.912480.89666666672253.00333333333
11313880.712480.89666666671399.80333333333
11413527.512480.89666666671046.60333333333
1151358412480.89666666671103.10333333333
11616170.212480.89666666673689.30333333333
11713260.612480.8966666667779.703333333334
11814741.912480.89666666672261.00333333333
11915486.512480.89666666673005.60333333333
12013154.512480.8966666667673.603333333333
12112621.212480.8966666667140.303333333334


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.5172724323526640.9654551352946720.482727567647336
60.3531399820387070.7062799640774140.646860017961293
70.2288501927145830.4577003854291650.771149807285417
80.1701994920030750.340398984006150.829800507996925
90.1380696447281620.2761392894563240.861930355271838
100.0837630854960490.1675261709920980.916236914503951
110.07528075597700030.1505615119540010.924719244023
120.04501236388979190.09002472777958370.954987636110208
130.05443642963970250.1088728592794050.945563570360297
140.06496360732983820.1299272146596760.935036392670162
150.07866919938834940.1573383987766990.92133080061165
160.05312297020469430.1062459404093890.946877029795306
170.03607089637184640.07214179274369270.963929103628154
180.02384007076241130.04768014152482250.976159929237589
190.01617899396258800.03235798792517590.983821006037412
200.0246003170408410.0492006340816820.97539968295916
210.02087844649967950.0417568929993590.97912155350032
220.01424963931849090.02849927863698180.98575036068151
230.02198755053262290.04397510106524580.978012449467377
240.01507034814104270.03014069628208550.984929651858957
250.02075105189793980.04150210379587970.97924894810206
260.02391457755701370.04782915511402730.976085422442986
270.02261936315004730.04523872630009460.977380636849953
280.01653743809444750.03307487618889490.983462561905553
290.01200952955673470.02401905911346940.987990470443265
300.009513610153480440.01902722030696090.99048638984652
310.007438768540272440.01487753708054490.992561231459728
320.01056159970104460.02112319940208910.989438400298955
330.008102113341493230.01620422668298650.991897886658507
340.006491693408912690.01298338681782540.993508306591087
350.007515436954915860.01503087390983170.992484563045084
360.006558299169280680.01311659833856140.99344170083072
370.007970568128762290.01594113625752460.992029431871238
380.01424181310127220.02848362620254440.985758186898728
390.01729774041187520.03459548082375030.982702259588125
400.01922941960051440.03845883920102890.980770580399486
410.01842680829676880.03685361659353770.98157319170323
420.0163311112872490.0326622225744980.98366888871275
430.02023266644742450.0404653328948490.979767333552576
440.06521763638743890.1304352727748780.934782363612561
450.06343019503935030.1268603900787010.93656980496065
460.1132590549074480.2265181098148960.886740945092552
470.1246108918635470.2492217837270930.875389108136453
480.1147851438266730.2295702876533460.885214856173327
490.1131599633573200.2263199267146410.88684003664268
500.1721411652397640.3442823304795270.827858834760236
510.2988935355426850.597787071085370.701106464457315
520.352606510045520.705213020091040.64739348995448
530.3408575307228130.6817150614456250.659142469277187
540.3782803638340770.7565607276681530.621719636165923
550.3895567769524870.7791135539049740.610443223047513
560.5507152819725710.8985694360548580.449284718027429
570.531774385502470.936451228995060.46822561449753
580.5643926266326030.8712147467347940.435607373367397
590.6086446709878360.7827106580243270.391355329012164
600.5792656572606820.8414686854786360.420734342739318
610.5276085160040120.9447829679919750.472391483995988
620.4833862520223670.9667725040447340.516613747977633
630.4343257213324720.8686514426649440.565674278667528
640.4007924050935840.8015848101871690.599207594906416
650.4776034765592890.9552069531185780.522396523440711
660.4584387334978740.9168774669957480.541561266502126
670.4500062251060180.9000124502120350.549993774893982
680.4107925885183520.8215851770367040.589207411481648
690.3708596529335060.7417193058670130.629140347066494
700.3349764222630340.6699528445260690.665023577736966
710.3024555184345750.6049110368691510.697544481565425
720.2862392305176240.5724784610352490.713760769482376
730.4208238444515940.8416476889031880.579176155548406
740.3829868406783550.765973681356710.617013159321645
750.3585932713005150.717186542601030.641406728699485
760.3304598562934180.6609197125868370.669540143706582
770.4063746900316320.8127493800632650.593625309968368
780.3945026735774970.7890053471549930.605497326422503
790.3883940647123040.7767881294246070.611605935287696
800.3526167246088910.7052334492177810.64738327539111
810.3219722326728880.6439444653457770.678027767327112
820.3008103731026880.6016207462053770.699189626897312
830.2685552708227120.5371105416454240.731444729177288
840.2744610938389370.5489221876778730.725538906161064
850.6185787204527230.7628425590945540.381421279547277
860.5826139527495780.8347720945008450.417386047250423
870.5465845550091120.9068308899817760.453415444990888
880.5481669133656810.9036661732686380.451833086634319
890.605347354496480.789305291007040.39465264550352
900.6519040573069590.6961918853860820.348095942693041
910.6685686408493260.6628627183013480.331431359150674
920.6597643045822880.6804713908354250.340235695417712
930.6227097313651380.7545805372697240.377290268634862
940.64509718969920.7098056206016010.354902810300800
950.6132671348302520.7734657303394970.386732865169748
960.6283734350581490.7432531298837020.371626564941851
970.8311335445704880.3377329108590230.168866455429512
980.8077362169463930.3845275661072140.192263783053607
990.7809926181229590.4380147637540820.219007381877041
1000.7432284618903530.5135430762192940.256771538109647
1010.7031531501855250.5936936996289510.296846849814475
1020.6908952335547980.6182095328904040.309104766445202
1030.6523728647274120.6952542705451760.347627135272588
1040.6718026364116640.6563947271766710.328197363588336
1050.6090757312086750.781848537582650.390924268791325
1060.5535867040758730.8928265918482530.446413295924127
1070.4883162678061160.9766325356122320.511683732193884
1080.5797881042861550.840423791427690.420211895713845
1090.7762532154132430.4474935691735130.223746784586757
1100.716661946485970.5666761070280610.283338053514030
1110.6386485454621750.722702909075650.361351454537825
1120.5743360406791680.8513279186416630.425663959320832
1130.4640692155533790.9281384311067590.53593078444662
1140.362166971651520.724333943303040.63783302834848
1150.2616348593332020.5232697186664040.738365140666798
1160.4192457466237180.8384914932474370.580754253376282


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level260.232142857142857NOK
10% type I error level280.25NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/1027841229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/1027841229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/1ika81229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/1ika81229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/2duo01229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/2duo01229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/3pw471229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/3pw471229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/4fyaw1229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/4fyaw1229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/5dkaz1229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/5dkaz1229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/6ekjx1229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/6ekjx1229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/7jqnj1229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/7jqnj1229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/8pj531229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/8pj531229527061.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/93ap51229527061.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/17/t1229527236ruka05kygbl5awn/93ap51229527061.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