I get an error when I try to use glmnet to fit a lasso model on some data.

My code:
> lasso <- glmnet(predictorPartitionTrainingM, targetPartitionTraining,
alpha=1)

The error that is returned:
Error in elnet(x, is.sparse, ix, jx, y, weights, offset, type.gaussian,  :
 NA/NaN/Inf in foreign function call (arg 5)

Some potentially important details:
- 50 predictor variables
- 300 observations
- everthing is numeric
- predictorPartitionTrainingM is a matrix
- targetPartitionTraining is a vector

Thanks in advance,
Ryan Zotti

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to