knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(cpp) XY=data_xy(Dep.var ~ . -1, mydataset_noconst) Y = as.matrix(XY$Y) X = as.matrix(XY$X) set.seed(1) beta0 = rnorm(ncol(X)) tolerance=1e-3 # tolerance maxit=1000 # max iteration, not to run forever SD_Cpp = betahat_SD_Cpp(beta0, X, Y, tolerance, maxit) SD_Cpp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.