Hello:
I have some trouble making a prediction from an AR(p) model. After I have the AR(p) model fitted , I want to use a new data set to make predictions.
But I get the error:  Error in newdata - object$x.mean :   non-numeric argument to binary operator.

A small  version of my  original data looks like:
X1

X2

X3

X4

40813.65

1

10

41.86755

40813.65

1

8

41.86755

40813.66

1

8

41.86755

40813.66

1

8

41.86755

40813.66

1

8

41.86755

40813.67

1

8

41.86755

40813.67

1

6

41.86755

40813.67

1

6

41.86755

40813.68

1

6

41.86755

40813.68

1

6

41.86755

40813.73

1

4

41.86755


Sh<-read.table("C:\\ Desktop\\Sh.txt",sep=",",header=TRUE)
model <- ar.yw(Sh[,3])

My new data looks like:
X3
10
8
8
8
8
8
6
6
6
6
4
4
4
4
4
4
4
4
4
4
5
5


me<-read.table("C:\\Users\\351240\\Desktop\\me.txt",sep=",",header=TRUE)

predict(model,me,n.ahead = 1)

Then I get the error: Error in newdata - object$x.mean :   non-numeric argument to binary operator.
Can someone help me please.
Thanks,
Ana Lucia

	[[alternative HTML version deleted]]

