tune.cosso | R Documentation |

Compute K-fold cross-validated score and plot cross-validated score against a grid values of smooth parameter M.

```
tune.cosso(object,folds=5,plot.it=TRUE)
```

`object` |
a cosso object. |

`folds` |
number of folds for corss-validation. Default is |

`plot.it` |
if |

`OptM` |
the optimal smoothing parameter for M. |

`M` |
used tuning grid points. |

`cvm` |
the mean cross-validated error/minus log-likelihood. |

`cvsd` |
estimate of standard error of |

Hao Helen Zhang and Chen-Yen Lin

`cosso`

, `predict.cosso`

```
## Binomial
set.seed(20130310)
x=cbind(rbinom(150,1,.7),matrix(runif(150*5,0,1),nc=5))
trueProb=1/(1+exp(-x[,1]-sin(2*pi*x[,2])-5*(x[,4]-0.4)^2))
y=rbinom(150,1,trueProb)
B.Obj=cosso(x,y,family="Bin",nbasis=30)
tune.cosso(B.Obj,4,TRUE)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.