add R code for model v3