search for: adf_results_b_1

Displaying 1 result from an estimated 1 matches for "adf_results_b_1".

2011 Oct 11
5
Help to write to a file
...ything written on the text file where my results are supposed to be saved. The code is below setwd("C:\\Users\\Sergio René\\Dropbox\\R") library("urca") P1<-read.csv("2R_EQ_P_R1_500.csv") P2<-read.csv("2R_EQ_P_R2_500.csv") d<-(1:1000) sink ("ADF_results_b_1.txt") for (i in seq(d)) { z.1<-P1[i]*-1-P2[i]*-1 if (all(z.1<=0)) {r=1} else {if (all(z.1>=0)) {r=1} else {r=2}} if (r==1) {ADF<-ur.df(ts(z.1), lags=1, type='drift')} if (r==1) {summary(ADF)} } sink() Any suggestion of what I might be doing wroong? best regards, Sergio...