[R] help to create a simulated dataset

2020-09-29 Thread Peter Wagey
Hi R User, I was trying to create a data matrix with four columns: height, locations (three locations), temperature (three levels) and slope (three classes) and used the following code, but it did not work. I basically wanted to have 20 rows for each class (I have a total of 9 classes). Can you he

[R] How can we get a predicted value that are used to plot the figure using a plot_model function of sjPlot?

2020-09-19 Thread Peter Wagey
Hi R users, I was trying to create a figure of three-way-interactions. There is a function "plot-model" but I was wondering whether we can extract the predicted value before we run the "plot-model" function. For example: in this example, plot_model(fit, type = "pred", terms = c("c12hour", "barthtot

[R] bootstrapping results in table format

2017-10-06 Thread Peter Wagey
Hi R users, I was struggling to put the results into table format. Would you mind to show using following data and code how we can put the results into table? I further would like to have a confidence interval for each group. set.seed(1000) data <- as.data.table(list(x1 = runif(200), x2 = runif(