Re: [R] Error in linear regression

2015-12-17 Thread David Winsemius
> On Dec 17, 2015, at 7:58 PM, Saba Sehrish wrote: > > Hi > > Please find the attachment with (.txt) extension and I hope the command is > visible now. > > library(lmtest) Why is this library loaded? I see no calls to functions from that package. >

Re: [R] Error in linear regression

2015-12-17 Thread Saba Sehrish via R-help
Hi Please find the attachment with (.txt) extension and I hope the command is visible now. library(lmtest)data<-read.csv(file="---",header=T,sep=",")A<-as.matrix(data$DODGX)B<-as.matrix(data$TRMCX) nrow<-nrow(A)A1<-matrix(NA,nrow,1)A2<-matrix(NA,nrow,1) A3<-matrix(NA,nrow,1) A4<-matrix(NA,nrow,1)

Re: [R] Error in linear regression

2015-12-17 Thread David Winsemius
> On Dec 17, 2015, at 1:13 PM, Saba Sehrish via R-help > wrote: > > Hi I am trying to apply linear regression on the attached data The is no attached data; please read the posting guide. Do not post with .csv or .doc files. You can have commas as separators but an

[R] Error in linear regression

2015-12-17 Thread Saba Sehrish via R-help
Hi I am trying to apply linear regression on the attached data of two variables (DODGX, TRMCX) in R by taking into account time lag=5 for both of them. Each time I run this command, it gives me following error: Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :