set.seed(11335577)
pos <- sample(x = 1:150, size = 60, replace = FALSE)
ir.A <- iris[pos, c(1:3, 5)]
ir.B <- iris[-pos, c(1:2, 4:5)]
intersect(colnames(ir.A), colnames(ir.B)) # shared Xs
op1 <- rho.bounds.pred(data.rec=ir.A, data.don=ir.B,
match.vars=c("Sepal.Length", "Sepal.Width", "Species"),
y.rec="Petal.Length", z.don="Petal.Width",
pred = "lm")
op1
op2 <- rho.bounds.pred(data.rec=ir.A, data.don=ir.B,
match.vars=c("Sepal.Length", "Sepal.Width", "Species"),
y.rec="Petal.Length", z.don="Petal.Width",
pred = "roblm")
op2
Run the code above in your browser using DataLab