# NOT RUN {
# Generate fake data
set.seed(123)
x <- runif(40, 0, 1)
y <- runif(40, 0, 1)
# Default
xy.plot(x, y)
# With labels
xy.plot(x, y, case.lab = TRUE, labs = 1:40)
# With labels and bigger measures of fit
xy.plot(x, y, case.lab = TRUE, labs = 1:40, cex.fit = 1)
# With labels and bigger title
xy.plot(x, y, case.lab = TRUE, labs = 1:40, cex.main = 1.5)
# Generate fake data the have perfect sufficiency
set.seed(123)
x <- runif(50, 0, 1)
y <- runif(50, 0, 1)
for(i in 1:length(y)) {
while(x[i] > y[i]) {
y[i] <- runif(1, 0, 1)
x[i] <- runif(1, 0, 1)
}
}
# Default
xy.plot(x, y)
# Load the Schneider data:
data(SCHF)
# Plot of condition EMP as necessary for outcome EXPORT with case labels
# and names for the plot and axes:
xy.plot(SCHF$EMP, SCHF$EXPORT, necessity = TRUE, labs = rownames(SCHF),
main = "EMP as necessary for EXPORT", ylab = "EXPORT", xlab = "EMP")
# }
Run the code above in your browser using DataLab