Hi, we are conducting a Monte Carlo simulation study, but our team doesn't know how to select the p-value of the regression weight (in our case X1) from the regression test. After that, we will succeed in saving it in a dataframe.
This is a part of our draft-code: simresults$preg[sim] <- summary(lm(data$X2~data$X1))$p.value.
We suppose that the $p.value has to be changed, but we don't know how.
Thank you very much!