Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_multipleregression.wasp
Title produced by softwareMultiple Regression
Date of computationSun, 23 Nov 2008 10:24:16 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Nov/23/t122746107937qy6tx5tiyspr8.htm/, Retrieved Sun, 19 May 2024 11:10:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=25302, Retrieved Sun, 19 May 2024 11:10:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact146
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Multiple Regression] [] [2008-11-23 17:24:16] [cae3b9b084628ae4df84563390017721] [Current]
Feedback Forum

Post a new message
Dataseries X:
	
	
	
	
	
	
	
1,0487	1
1,0422	1
1,0376	1
-	1
-	1
1,0296	1
1,0282	1
1,0255	1
1,0273	1
1,024	1
1,0307	1
1,0212	1
1,0221	1
1,0156	1
1,0067	1
1,0111	1
1,0093	1
1,0006	1
0,9991	1
1,0018	1
0,9967	1
0,9871	1
0,9927	1
0,9934	1
0,9927	1
0,991	1
0,9905	1
1,0024	1
1,0034	1
1,0019	1
1,0125	1
1,0065	1
1,0029	1
1,0095	1
1,0068	1
1,0081	1
1,0126	1
1,0107	1
1,0013	1
0,9955	1
1,0024	1
0,9944	1
0,9974	1
0,9864	1
0,9825	1
0,982	1
0,9745	1
0,9763	1
0,9738	1
0,9775	1
0,9768	1
0,9748	1
0,9735	1
0,9763	1
0,9823	1
0,981	1
0,9873	1
0,9857	1
0,9875	1
0,9814	1
0,98	1
0,9808	1
0,9865	1
0,989	1
0,9835	1
0,9861	1
0,986	1
0,9779	1
0,9796	1
0,9771	1
0,9828	1
0,9831	1
0,979	1
0,9814	1
0,9725	1
0,9649	1
0,9683	1
0,981	1
0,9757	1
0,9749	1
0,976	1
0,9794	1
0,9918	1
0,9975	1
0,9947	1
0,991	1
0,9821	1
0,9833	1
0,9843	1
0,9826	1
0,9774	1
0,9701	1
0,9697	1
0,977	1
0,9762	1
0,9792	1
0,9799	1
0,9825	1
0,9777	1
0,9857	1
0,9799	1
0,978	1
0,9729	1
0,9687	1
0,9698	1
0,9689	1
0,9836	1
0,9873	1
0,976	1
0,9783	1
0,9835	1
0,9821	1
1,0008	1
1,0014	1
0,9915	1
0,991	1
1,0086	1
1,0146	1
1,0058	1
1,0064	1
1,0127	1
1,0024	1
0,9873	1
0,9836	1
0,9898	1
0,993	1
0,9828	1
0,9725	1
0,979	1
0,978	1
0,9838	1
0,9913	1
0,9975	1
0,9824	1
0,9917	1
0,9712	1
0,9781	1
0,9636	1
0,9592	1
0,9561	1
0,9484	1
0,9426	1
0,9478	1
0,9417	1
0,9452	1
0,9417	1
0,9459	1
0,9452	1
0,9386	1
0,9371	1
0,9435	1
0,9313	1
0,9387	1
0,9375	1
0,932	1
0,9255	1
0,919	1
0,9188	1
0,9213	1
0,926	1
0,9213	1
0,9202	1
0,9152	1
0,9124	1
0,903	1
0,9062	1
0,9118	1
0,9118	1
0,9061	1
0,9088	1
0,9125	1
0,9144	1
0,9083	1
0,9032	1
-	1
0,9008	1
0,9038	1
0,8971	1
0,8969	1
0,8892	1
0,8872	1
0,8882	1
0,8886	1
0,8895	1
0,888	1
0,8803	1
0,8802	1
0,8803	1
0,8794	1
0,8798	1
0,8763	1
0,8778	1
0,8786	1
0,8818	1
0,8803	1
0,8786	1
-	1
-	1
0,8724	1
0,8746	1
0,8737	1
0,8759	1
0,8795	1
0,8817	1
0,8814	1
0,8829	1
0,8792	1
0,8853	1
0,8803	1
0,8734	1
0,8733	1
0,8741	1
0,8797	1
0,8764	1
0,8712	1
0,8682	1
0,8649	1
0,8679	1
0,8651	1
0,8649	1
0,8682	1
0,8724	1
0,8747	1
0,8701	1
0,8743	1
0,8692	1
0,8715	1
0,8705	1
0,8693	1
0,8731	1
0,8753	1
0,8794	1
0,874	1
0,8664	1
0,8664	1
0,8683	1
0,8644	1
0,8632	1
0,8637	1
0,8642	1
0,8624	1
0,8578	1
0,8663	1
0,8767	1
0,8856	1
0,883	1
0,884	1
0,881	1
0,8819	1
0,8817	1
0,8922	1
0,8927	1
0,8919	1
0,8909	1
0,8921	1
0,8909	1
0,8905	1
0,8954	1
0,9036	1
0,9038	1
-	1
-	1
0,8813	1
0,8823	1
-	1
-	1
0,8798	1
0,8943	1
0,8973	1
0,8983	1
0,9012	1
0,9049	1
0,9016	1
0,8975	1
0,8938	1
0,8908	1
0,885	1
0,8911	1
0,8889	1
0,8919	1
0,8902	1
0,8925	1
0,8898	1
0,8887	1
0,8831	1
0,8788	1
0,8818	1
0,8795	1
0,8778	1
0,8791	1
0,8824	1
0,8793	1
0,8845	1
0,8825	1
0,8803	1
0,8842	1
0,8919	1
0,893	1
0,8972	1
0,9014	1
0,8961	1
0,8961	1
0,9056	1
0,9097	1
0,9042	1
0,9064	1
0,9005	1
0,8911	1
0,8889	1
0,8917	1
0,8887	1
0,8969	1
0,9009	1
0,9026	1
0,9022	1
0,9052	1
0,9097	1
0,904	1
0,9062	1
0,9136	1
0,9193	1
0,9214	1
0,9174	1
0,9117	1
0,9209	1
0,9189	1
0,9125	1
0,9131	1
0,9205	1
0,9219	1
0,9176	1
0,9164	1
0,92	1
0,9259	1
0,9258	1
0,9256	1
0,9269	1
0,9219	1
0,906	1
0,9052	1
0,8964	1
0,9047	1
0,8952	1
0,8855	1
0,8891	1
0,897	1
0,9072	1
0,9158	1
0,9095	1
0,9122	1
0,9042	1
0,909	1
0,9108	1
0,9112	1
0,9216	1
0,9128	1
0,9149	1
0,9138	1
0,9144	1
0,9114	1
0,8968	1
0,8991	1
0,8936	1
0,8853	1
0,8763	1
0,8768	1
0,8805	1
0,8806	1
0,8788	1
0,8817	1
0,8755	1
0,8751	1
0,8768	1
0,8764	1
0,8793	1
0,8708	1
0,8676	1
0,8776	1
0,8723	1
0,863	1
0,8516	1
0,8583	1
0,8539	1
0,8538	1
0,8611	1
0,8545	1
0,8459	1
0,8384	1
0,8422	1
0,8453	1
0,8497	1
0,8455	1
0,848	1
0,8511	1
0,8622	1
0,8611	1
0,8607	1
0,8528	1
0,8552	1
0,8513	1
0,8563	1
0,8581	1
0,8662	1
0,8492	1
0,8542	1
0,8474	1
0,8494	1
0,8468	1
0,8466	1
0,8543	1
0,8465	1
0,8513	1
0,8478	1
0,848	1
0,8558	1
0,8552	1
0,8584	1
0,8591	1
0,8604	1
0,8585	1
0,8685	1
0,8754	1
0,8777	1
0,8815	1
0,8834	1
0,8768	1
0,8745	1
0,8773	1
0,885	1
0,8827	1
0,8866	1
0,8919	1
0,8939	1
0,8903	1
0,8907	1
-	1
0,8876	1
0,9023	1
0,9013	1
0,8947	1
0,8973	1
0,9002	1
0,8989	1
0,8827	1
0,8778	1
0,8791	1
-	1
-	1
0,8849	1
0,884	1
0,8945	1
0,9018	1
0,894	1
0,902	1
0,9032	1
0,8845	1
0,8772	1
0,8832	1
0,884	1
0,886	1
0,8952	1
0,8935	1
0,8922	1
0,8889	1
0,899	1
0,902	1
0,8996	1
0,8947	1
0,9064	1
0,9182	1
0,9202	1
0,9272	1
0,9357	1
0,9312	1
0,9307	1
0,9279	1
0,9305	1
0,9363	1
0,9269	1
0,9248	1
0,9163	1
0,9105	1
0,9064	1
0,9056	1
0,9146	1
0,907	1
0,9213	1
0,9113	1
0,909	1
0,9178	1
0,9275	1
0,9288	1
0,9227	1
0,922	1
0,9325	1
0,9322	1
0,9425	1
0,9407	1
0,9406	1
0,9293	1
0,9197	1
0,9193	1
0,9228	1
0,9146	1
0,9294	1
0,9407	1
0,929	1
0,94	1
0,9404	1
0,9396	1
0,9412	1
0,9428	1
0,9545	1
0,9523	1
0,9412	1
0,9401	1
0,9497	1
0,9545	1
0,9458	1
0,953	1
0,9423	1
-	1
0,9305	1
0,9285	1
0,931	1
-	1
-	1
0,924	1
0,9146	1
0,9059	1
0,8903	1
0,8966	1
0,8984	1
0,8839	1
0,8748	1
0,8782	1
0,8804	1
0,8895	1
0,8943	1
0,8828	1
0,881	1
0,8908	1
0,8735	1
0,8684	1
0,865	1
0,8561	1
0,8406	1
0,8436	1
0,8427	1
0,8429	1
0,8474	1
0,8488	1
0,8535	1
0,8569	1
0,8596	1
0,8583	1
0,862	1
0,8673	1
0,8531	1
0,8559	1
0,8587	1
0,8667	1
0,873	1
0,8646	1
0,8554	1
0,8417	1
0,8482	1
0,8324	1
0,8252	1
0,8307	1
0,8386	1
0,8377	1
0,8452	1
0,8411	1
0,8525	1
0,8496	1
0,8511	1
0,8627	1
0,8648	1
0,872	1
0,8721	1
0,8695	1
0,8703	1
0,8786	1
0,873	1
0,8763	1
0,8802	1
0,8765	1
0,8832	1
0,8861	1
0,8757	1
0,877	1
0,889	1
0,8524	1
0,8476	1
0,8541	1
0,8526	1
0,8615	1
0,8693	1
0,8654	1
0,8614	1
0,8609	0
0,8735	0
0,8676	0
0,8818	0
0,8886	0
0,9	0
0,8902	0
0,8906	0
0,8909	0
0,8965	0
0,9007	0
0,9021	0
0,9012	0
0,8918	0
0,8972	0
0,9023	0
0,9127	0
0,914	0
0,9072	0
0,9118	0
0,9011	0
0,9132	0
0,9031	0
0,8973	0
0,9047	0
0,9084	0
0,9031	0
0,9028	0
0,9142	0
0,9264	0
0,9243	0
0,9276	0
0,9389	0
0,939	0
0,941	0
0,9332	0
0,9363	0
0,922	0
0,9216	0
0,9353	0
0,9352	0
0,9344	0
0,9349	0
0,9499	0
0,9527	0
0,9523	0
0,9483	0
0,9542	0
0,9537	0
0,9487	0
0,9493	0
0,9556	0
0,9504	0
0,9415	0
0,9401	0
0,9327	0
0,9413	0
0,9405	0
0,947	0
0,9538	0
0,964	0
0,9565	0
0,9524	0
0,9636	0
0,9583	0
0,9527	0
0,949	0
0,9668	0
0,9554	0
0,9485	0
0,9433	0
0,9355	0
0,933	0
0,9303	0
0,9359	0
0,9262	0
0,9143	0
0,8981	0
0,9098	0
0,9111	0
0,9	0
0,8875	0
0,8942	0
0,8922	0
0,9065	0
0,9147	0
0,9029	0
0,9079	0
0,9107	0
0,8978	0
0,8952	0
0,8984	0
0,8947	0
0,8913	0
0,9116	0
-	0
0,9085	0
0,9163	0
0,9193	0
0,9302	0
-	0
-	0
0,9376	0
0,9461	0
0,9497	0
0,9573	0
0,954	0
0,9537	0
0,9576	0
0,9594	0
0,959	0
0,9564	0
0,9625	0
0,9673	0
0,9538	0
0,9564	0
0,9553	0
0,9555	0
0,9568	0
0,9647	0
0,9712	0
0,9715	0
0,9656	0
0,9603	0
0,9701	0
0,9715	0
0,9672	0
0,9663	0
0,9647	0
0,962	0
0,9716	0
0,9613	0
0,9616	0
0,9543	0
0,9593	0
0,964	0
0,9659	0
0,9725	0
0,9667	0
0,9714	0
0,9639	0
0,9813	0
0,9898	0
1,0068	0
1,0022	0
0,9857	0
0,9857	0
0,9919	0
0,9804	0
0,9778	0
0,9867	0
0,9801	0
0,9868	0
0,9934	0
0,9903	0
0,9767	0
0,9835	0
0,9748	0
0,9717	0
0,971	0
0,9791	0
0,9848	0
0,9976	0
1,0019	0
1,0008	0
1,0027	0
1,0097	0
1,0089	0
1,0105	0
1,0093	0
1,0094	0
1,0225	0
1,0276	0
1,0308	0
1,0256	0
1,0229	0
1,0284	0
1,0388	0
1,0368	0
1,0305	0
1,009	0
-	0
1,0046	0
1,0072	0
1,0089	0
1,0134	0
1,0142	0
1,0089	0
1,0074	0
1,0084	0
1,0096	0
1,0128	0
1,0146	0
1,0021	0
1,0038	0
1,0128	0
1,0141	0
1,0175	0
1,0236	0
1,0239	0
1,0182	0
1,0015	0
1,0057	0
1,0091	0
1,0097	0
1,0077	0
1,0101	0
1,0194	0
1,0215	0
1,0315	0
1,0311	0
1,0279	0
1,038	0
1,0408	0
1,0336	0
1,0301	0
1,0308	0
1,0406	0
1,0402	0
1,0424	0
1,0405	0
1,0408	0
1,0504	0
1,0491	0
1,0507	0
1,0572	0
1,0453	0
1,0534	0
1,0552	0
1,0633	0
1,0683	0
1,0758	0
1,0797	0
1,0777	0
1,0818	0
1,0868	0
1,0869	0
1,0758	0
1,0778	0
1,0668	0
1,0631	0
1,0657	0
1,0729	0
1,0737	0
1,0686	0
1,0719	0
1,0728	0
1,0665	0
1,0563	0
1,0483	0
1,0414	0
1,0476	0
1,043	0
1,0509	0
1,0388	0
1,0406	0
1,0397	0
1,0372	0
1,0369	0
1,0362	0
1,0342	0
1,052	0
1,0592	0
1,0613	0
1,0565	0
1,0594	0
1,0682	0
1,0662	0
1,0613	0
1,0573	0
1,0454	0
1,045	0
1,0452	0
1,0433	0
1,0512	0
1,0606	0
1,0667	0
1,0517	0
1,0517	0
1,0527	0
1,0553	0
1,0667	0
1,0638	0
1,0668	0
1,0737	0
1,0705	0
1,074	0
1,0791	0
1,0761	0
1,0645	0
1,0665	0
1,0694	0
1,068	0
1,0603	0
1,0627	0
1,0698	0
1,0496	0
1,0499	0
1,0462	0
1,041	0
1,0146	0
1,0202	0
1,0201	0
1,0168	0
1,0183	0
1,0124	0
1,0204	0
1,0182	0
1,0222	0
1,0221	0
1,0232	0
1,0241	0
1,0264	0
1,0328	0
1,0364	0
1,0388	0
1,0443	0
1,0321	0
1,028	0
1,0313	0
1,0339	0
1,0388	0
1,034	0
1,0345	0
1,0392	0
1,0437	0
1,0474	0
1,0474	0
1,0466	0
1,0385	0
1,0316	0
1,0315	0
1,0382	0
1,0382	0
1,0434	0
1,0456	0
1,0479	0
1,0473	0
1,0535	0
1,0627	0
1,0585	0
1,0572	0
1,0639	0
1,0634	0
1,069	0
1,0685	0
1,0676	0
1,0622	0
1,0645	0
1,0732	0
1,0735	0
1,0786	0
1,0799	0
1,0667	0
1,0564	0
1,0589	0
1,0597	0
1,0604	0
1,0666	0
1,063	0
1,0614	0
1,0634	0
1,0581	0
1,0586	0
1,0646	0
1,0636	0
1,0668	0
1,0786	0
1,0787	0
1,0765	0
1,0867	0
1,0778	0
1,0818	0
1,0812	0
1,0726	0
1,0752	0
1,0772	0
1,0772	0
1,0742	0
1,0711	0
1,0692	0
1,0815	0
1,0898	0
1,0928	0
1,0896	0
1,0864	0
1,0915	0
1,1012	0
1,0966	0
1,0901	0
1,0949	0
1,0932	0
1,0891	0
1,0953	0
1,0863	0
1,0908	0
1,0834	0
1,0866	0
1,0899	0
1,0887	0
1,0986	0
1,1018	0
1,1031	0
1,1037	0
1,0969	0
1,0992	0
1,1163	0
1,1232	0
1,1253	0
1,1176	0
1,1238	0
1,1244	0
1,1312	0
1,1342	0
1,1333	0
1,1246	0
1,1292	0
1,1263	0
1,1337	0
1,1337	0
1,1338	0
1,1384	0
1,141	0
1,1529	0
1,1582	0
1,1584	0
1,1567	0
1,1572	0
1,1575	0
1,1616	0
1,1612	0
1,1626	0
1,1653	0
1,1744	0
1,152	0
1,1569	0
1,1659	0
1,1632	0
1,1743	0
1,179	0
1,1789	0
	
	
	
	




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

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=25302&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=25302&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=25302&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

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



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('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
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
Forecast', 1, TRUE)
a<-table.element(a, 'Residuals
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')
}