Hi,

I am trying to do a lasso regression using the lars package with the following data:

FastestTime

WinPercentage

PlacePercentage

ShowPercentage

BreakAverage

FinishAverage

Time7Average

Time3Average

Finish

116.90

0.14

0.14

0.29

4.43

3.29

117.56

117.77

5.00

116.23

0.29

0.43

0.14

6.14

2.14

116.84

116.80

2.00

116.41

0.00

0.14

0.29

5.71

3.71

117.24

117.17

4.00

115.80

0.57

0.00

0.29

2.14

2.57

116.21

116.53

6.00



#load Data
crs<- read.csv("file:///C:/temp/Horse//horseracing.csv<file:///C:\temp\Horse\horseracing.csv>", na.strings=c(",", "NA", "", "?"), encoding="UTF-8")

#    # define x and y
x= x<-crs[,9]    #predictor variables
y= y<-crs[1:8,]  #response variable


library(lars)
cv.lars(x, y, K=10, trace=TRUE, plot.it = TRUE,se = TRUE, type="lasso")

and I get:

LASSO sequence
Error in one %*% x : requires numeric/complex matrix/vector arguments

Any idea on what I am doing wrong?  Thank you!!

Sincerely,

tom



	[[alternative HTML version deleted]]

