Home » date » 2010 » Dec » 19 »

Paper Multiple regression dummy

*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: Sun, 19 Dec 2010 14:13:46 +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/19/t1292767978vxsl29kqenlz9ig.htm/, Retrieved Sun, 19 Dec 2010 15:12:58 +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/19/t1292767978vxsl29kqenlz9ig.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 «
1 41 25 25 15 15 9 9 3 3 1 38 25 25 15 15 9 9 4 4 1 37 19 19 14 14 9 9 4 4 1 42 18 18 10 10 8 8 4 4 1 40 23 23 18 18 15 15 3 3 1 43 25 25 14 14 9 9 4 4 1 40 23 23 11 11 11 11 4 4 1 45 30 30 17 17 6 6 5 5 1 45 32 32 21 21 10 10 4 4 1 44 25 25 7 7 11 11 4 4 1 42 26 26 18 18 16 16 4 4 1 41 35 35 18 18 7 7 4 4 1 38 20 20 12 12 10 10 4 4 1 38 21 21 9 9 9 9 4 4 1 46 17 17 11 11 6 6 5 5 1 42 27 27 16 16 12 12 4 4 1 46 25 25 12 12 10 10 4 4 1 43 18 18 14 14 14 14 5 5 1 38 22 22 13 13 9 9 4 4 1 39 23 23 17 17 14 14 4 4 1 40 25 25 13 13 14 14 3 3 1 37 19 19 13 13 9 9 2 2 1 41 20 20 12 12 8 8 4 4 1 46 26 26 12 12 10 10 4 4 1 37 22 22 9 9 9 9 3 3 1 39 25 25 17 17 9 9 4 4 1 44 29 29 18 18 11 11 5 5 1 38 22 22 12 12 10 10 2 2 1 38 32 32 12 12 8 8 0 0 1 38 23 23 9 9 14 14 4 4 1 33 18 18 13 13 10 10 3 3 1 43 26 26 11 11 14 14 4 4 1 41 14 14 13 13 15 15 2 2 1 45 25 25 11 11 10 10 5 5 1 38 23 23 15 15 10 10 4 4 1 39 24 24 11 11 11 11 4 4 1 40 21 21 14 14 10 10 4 4 1 36 17 17 12 12 16 16 2 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
StudyForCareer[t] = + 32.7635896103937 + 0.167898304496122Gender[t] + 0.0764876579446363PersonalStandards[t] + 0.108955962720113PeGe[t] + 0.39341770621105ParentalExpectations[t] -0.368692551592275PaGe[t] + 0.112165660694827Doubts[t] -0.196556140775314DoGe[t] -0.173496812145797LeaderPreference[t] + 1.26512557081632LeGe[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.76358961039373.5296199.282500
Gender0.1678983044961224.5148090.03720.9703990.485199
PersonalStandards0.07648765794463630.2211330.34590.7300520.365026
PeGe0.1089559627201130.1540730.70720.4808790.240439
ParentalExpectations0.393417706211050.3046031.29160.1990720.099536
PaGe-0.3686925515922750.197408-1.86770.0643330.032166
Doubts0.1121656606948270.3277310.34220.7327830.366391
DoGe-0.1965561407753140.215415-0.91250.3634220.181711
LeaderPreference-0.1734968121457970.972996-0.17830.8587890.429395
LeGe1.265125570816320.7067611.790.0760570.038029


Multiple Linear Regression - Regression Statistics
Multiple R0.586854040562002
R-squared0.344397664923948
Adjusted R-squared0.293531966512875
F-TEST (value)6.77072517791234
F-TEST (DF numerator)9
F-TEST (DF denominator)116
p-value9.09873218990498e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.11721877493672
Sum Squared Residuals1127.17813533488


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14140.45382770607740.54617229392257
23841.5454564647479-3.54545646474793
33740.4080695861407-3.40806958614066
44240.20811582708131.7918841729187
54039.65077304812130.349226951878687
64341.52073131012921.47926868987084
74040.9068876447824-0.906887644782357
84543.86692507622121.13307492377879
94542.90752225703332.09247774296666
104441.17887426763682.82112573236325
114241.21434218870560.785657811294402
124143.6428490954127-2.64284909541272
133840.4596724174874-2.45967241748737
143840.6553310543763-2.65533105437628
154641.30780707986684.69219292013318
164241.68789742045470.312102579545257
174641.38689052081114.61310947918888
184340.8923023237442.10769767625600
193840.9396752935161-2.93967529351613
203940.8020671322535-1.80206713225355
214039.98242499643740.0175750035625806
223738.2000869141808-1.20008691418083
234140.62845337764830.371546622351653
244641.57233414147594.42766585852413
253739.7491459163705-2.74914591637051
263941.5949067739855-2.59490677398548
274443.28425420977280.715745790227196
283838.6473021414758-0.647302141475819
293838.4872617909432-0.487261790943231
303840.6042658953033-2.60426589530335
313339.0218815721061-6.02188157210613
324341.21004706653511.78995293346486
334136.76652593037424.23347406962583
344542.45379412486292.54620587513713
353841.0901787433379-3.09017874333795
363941.0923312654471-2.09233126544711
374040.6945663473897-0.694566347389673
383637.2137411576692-1.21374115766915
394943.45895506398755.54104493601252
404141.2777748861119-0.277774886111855
414240.08132561491251.91867438508748
424142.6618103780372-1.66181037803723
434340.58545071269042.41454928730959
444640.16733094482845.83266905517161
454142.7462008581177-1.74620085811772
463941.1788742676368-2.17887426763675
474240.79400463813851.20599536186145
483541.5926889912804-6.59268899128045
493639.4755444436807-3.47554444368072
504140.45967241748740.540327582512627
514139.81310636400271.18689363599733
523641.9227913503570-5.92279135035704
534641.59490677398554.40509322601452
544440.88807246216943.11192753783058
554339.04345220969793.95654779030213
564041.1126861152517-1.11268611525169
574039.58627492821540.413725071784629
583940.9498903097403-1.94989030974029
594441.80078042709862.19921957290145
603837.63569355807160.364306441928412
613939.7216653067729-0.721665306772924
624143.0079724647480-2.00797246474795
633940.0071501510562-1.00715015105620
644040.2043484551368-0.204348455136752
654440.35646675479393.64353324520605
664239.67651011970582.32348988029417
674643.1256882658362.87431173416401
684440.94827545990493.05172454009509
693741.1417815746847-4.14178157468466
703938.52797149055240.472028509447604
714039.48575945990490.514240540095116
724240.08132561491251.91867438508748
733739.6131526049433-2.61315260494331
743338.6553646355908-5.65536463559082
753540.1833906724625-5.18339067246252
764236.50636917357935.49363082642068
773635.40336410857870.596635891421267
784441.93283808145022.06716191854976
794541.53930287088813.4606971291119
804744.5824343319142.41756566808601
814041.2241989902996-1.22419899029961
824842.87655826516345.12344173483657
834544.44449747955750.55550252044251
844141.716869828039-0.71686982803902
853438.1386430236907-4.1386430236907
863838.0333057686589-0.0333057686589387
873738.6164112631620-1.61641126316204
884846.21285257119351.78714742880646
893943.5958559180545-4.59585591805453
903439.7203302588433-5.72033025884333
913535.2504166312852-0.250416631285214
924140.78254560188780.217454398112158
934340.28098676217432.71901323782571
944138.47691674839762.52308325160241
953937.0375184287981.96248157120198
963640.5723790474122-4.57237904741219
974642.15076392618833.84923607381166
984242.6000685781936-0.600068578193605
994235.97871031281946.0212896871806
1004541.93624530851613.06375469148387
1013941.9751545603643-2.97515456036430
1024544.24767586094190.752324139058051
1034846.26967171945681.73032828054325
1043537.3473285660388-2.34732856603882
1053839.0623086881014-1.06230868810141
1064240.17564950714251.82435049285748
1073638.5668434495734-2.56684344957341
1083742.6361834292532-5.63618342925318
1093839.3332095734941-1.33320957349405
1104339.31334208575213.68665791424787
1113534.70001876077580.299981239224212
1123641.2045443999161-5.20454439991606
1133333.629715273595-0.629715273594992
1143938.5726451485090.427354851491033
1154539.6410621194085.35893788059203
1163541.191091437387-6.191091437387
1173838.6525261142216-0.652526114221623
1183638.7424528153974-2.74245281539744
1194237.90157054415694.09842945584308
1204139.94126340172841.05873659827160
1213537.1279530855617-2.12795308556171
1224338.00495020786184.99504979213819
1234043.1373423400478-3.13734234004781
1244642.64963639178223.35036360821776
1254444.4444974795575-0.44449747955749
1263538.4273489348089-3.42734893480895


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.8019749413694910.3960501172610180.198025058630509
140.7348701948709210.5302596102581580.265129805129079
150.8142034789535620.3715930420928750.185796521046438
160.7201799016037760.5596401967924490.279820098396224
170.7648225734682110.4703548530635780.235177426531789
180.679492628792620.641014742414760.32050737120738
190.6557966175563970.6884067648872060.344203382443603
200.5986710871345430.8026578257309130.401328912865457
210.5082972616903780.9834054766192440.491702738309622
220.43783949352390.87567898704780.5621605064761
230.3537432341636910.7074864683273820.646256765836309
240.3892760882914710.7785521765829420.610723911708529
250.3582412068934620.7164824137869240.641758793106538
260.3215992963582320.6431985927164640.678400703641768
270.2561167431427000.5122334862854010.7438832568573
280.2071095288051290.4142190576102590.79289047119487
290.1746770803097070.3493541606194150.825322919690293
300.1929198742639890.3858397485279790.80708012573601
310.2808966593669530.5617933187339070.719103340633047
320.2316138928597090.4632277857194180.768386107140291
330.3616721784397850.723344356879570.638327821560215
340.3253893437424860.6507786874849720.674610656257514
350.3175960210656310.6351920421312620.682403978934369
360.2940907849978490.5881815699956970.705909215002151
370.2415408799730050.4830817599460110.758459120026995
380.1971786424260510.3943572848521030.802821357573949
390.2634443262990000.5268886525979990.736555673701
400.2200453750847770.4400907501695540.779954624915223
410.1986616059723550.397323211944710.801338394027645
420.1695581833388550.3391163666777110.830441816661145
430.156755853733460.313511707466920.84324414626654
440.2950496061409810.5900992122819620.704950393859019
450.2596896429674220.5193792859348450.740310357032578
460.2483392808785890.4966785617571780.751660719121411
470.2087996546493730.4175993092987470.791200345350627
480.3703811928072720.7407623856145430.629618807192728
490.3846914748661550.769382949732310.615308525133845
500.3333503434669700.6667006869339390.66664965653303
510.2924593448938230.5849186897876460.707540655106177
520.433877706678410.867755413356820.56612229332159
530.4781851039400820.9563702078801640.521814896059918
540.4743895177960230.9487790355920460.525610482203977
550.5133364963899940.9733270072200120.486663503610006
560.4806200777081990.9612401554163970.519379922291801
570.4274303269119560.8548606538239110.572569673088044
580.3888798748116310.7777597496232620.611120125188369
590.4410954002795510.8821908005591020.558904599720449
600.3882044291592430.7764088583184870.611795570840757
610.3487908414123230.6975816828246460.651209158587677
620.3105013991494660.6210027982989320.689498600850534
630.2709848129287280.5419696258574560.729015187071272
640.3156658768729720.6313317537459450.684334123127028
650.3086175585368390.6172351170736780.691382441463161
660.2752614963715470.5505229927430940.724738503628453
670.3069131275070060.6138262550140120.693086872492994
680.3070371655722240.6140743311444490.692962834427776
690.3027864908932350.605572981786470.697213509106765
700.2566773535782370.5133547071564730.743322646421763
710.2246664575077410.4493329150154810.77533354249226
720.1928614407952140.3857228815904280.807138559204786
730.1697818930545490.3395637861090990.83021810694545
740.1836673544593770.3673347089187540.816332645540623
750.1869198014765450.3738396029530910.813080198523455
760.2056067614203970.4112135228407930.794393238579603
770.1683092179858800.3366184359717600.83169078201412
780.1424273666475450.2848547332950900.857572633352455
790.13349339740330.26698679480660.8665066025967
800.1197076271707700.2394152543415410.88029237282923
810.09505228738796920.1901045747759380.90494771261203
820.1290091292525270.2580182585050550.870990870747473
830.1035787236502050.2071574473004090.896421276349795
840.0825450481829280.1650900963658560.917454951817072
850.08606278665152740.1721255733030550.913937213348473
860.06618165545603020.1323633109120600.93381834454397
870.05255995640803080.1051199128160620.94744004359197
880.05777873328145320.1155574665629060.942221266718547
890.06829044565919950.1365808913183990.9317095543408
900.1208441133846000.2416882267692000.8791558866154
910.09677951239868660.1935590247973730.903220487601313
920.07275251438532680.1455050287706540.927247485614673
930.06686346822096980.1337269364419400.93313653177903
940.05814553411634390.1162910682326880.941854465883656
950.04483030721041510.08966061442083020.955169692789585
960.05146832068063050.1029366413612610.94853167931937
970.05617402512664580.1123480502532920.943825974873354
980.03951403032671840.07902806065343680.960485969673282
990.07405815981555550.1481163196311110.925941840184444
1000.07704244497264860.1540848899452970.922957555027351
1010.06788217491702130.1357643498340430.932117825082979
1020.05056761406478850.1011352281295770.949432385935212
1030.04697750511487220.09395501022974450.953022494885128
1040.03386954798233630.06773909596467260.966130452017664
1050.0228587300037910.0457174600075820.977141269996209
1060.02214027088929940.04428054177859870.9778597291107
1070.01598530983762430.03197061967524860.984014690162376
1080.02207710517174420.04415421034348840.977922894828256
1090.01319687027320820.02639374054641640.986803129726792
1100.008784367046056410.01756873409211280.991215632953944
1110.004110159318402220.008220318636804450.995889840681598
1120.005063368447334080.01012673689466820.994936631552666
1130.002268202071070390.004536404142140770.99773179792893


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level20.0198019801980198NOK
5% type I error level90.0891089108910891NOK
10% type I error level130.128712871287129NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/100j691292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/100j691292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/1tz8x1292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/1tz8x1292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/2tz8x1292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/2tz8x1292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/3m9801292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/3m9801292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/4m9801292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/4m9801292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/5m9801292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/5m9801292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/623wr1292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/623wr1292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/7p9661292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/7p9661292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/8p9661292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/8p9661292768016.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/90j691292768016.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767978vxsl29kqenlz9ig/90j691292768016.ps (open in new window)


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