# NOT RUN {
# }
# NOT RUN {
library(mlbench)
data(BostonHousing2)
BostonHousing2$log_crim = log2(BostonHousing2$crim)
BostonHousing2$nox = BostonHousing2$nox*100
m2 = umxRAM(data = BostonHousing2, "#crime_model
cmedv ~ log_crim + b1*nox;
nox ~ a1*rad + a2*log_crim
i_1 := a1*b1
i_2 := a2*b1"
)
m3 = mxRun(mxModel(m1, mxAlgebra(name= "rtwo", rbind(i_1, i_2))))
m3 = mxRun(mxModel(m3, mxAlgebra(name= "ctwo", cbind(i_1, i_2))))
xmu_print_algebras(m3)
# }
Run the code above in your browser using DataLab