Question
Hi expert, I asked the same Q 3 times and never got the right answer? This Q requires experience in R programming First, simulate some
Hi expert, I asked the same Q 3 times and never got the right answer?
This Q requires experience in R programming
First, simulate some data. then creat a small dataset of 100-200 datapoints. The dataset should have one categorical predictor variable with two levels (groups) and a numeric outcome variable. Each group's data should be generated randomly from a normal distribution with a different mean and the same standard deviation. Notice that because you're simulating the data, you know that there is a true population difference, and that you can make it and the variance in your population as big or as small as you like. Then, plot your simulated data and run a linear regression. The regression will have one categorical predictor.(I need a line in the plot like the atttached image)
please send me the R script that you used