I am new to R and would like to follow the answer to this: Simulation of logistic regression power analysis - designed experiments
I would like specifically to know if I have power to detect a contribution to the model in an interacting co-variate term (Combined represents gene*prs_standardised). My data is case/control group with polygenic risk score and a mix of other continuous and binary covariates.
Whilst the P-value for combined implied there is no contribution to the model I am doubtful I am powered to detect this signal and would like to check.
In order to simulate a dataset like this do I need to randomly generate tables/models by setting the parameters for the random numbers based of the min/max/sd of each coefficient? I am not too sure how to do that and any help would be greatly appreciated.
Ideally there would be some kind of code that will look at the distribution of each column making up a coefficient of the table and then simulate data based of it's distribution?