Skip to content

[R ] help in if else in connect the simulation in normal and gamma distribution.

1 message · tan sj

#
I am new in R. I have to conduct simulation study on the robustness of 2 sample tests on several combination of factors (sample sizes ,variance and distribution).


I have been completed write a code in normal distribution, and now i wish to add if -else in the code so that the code can simulated result for gamma distribution also.

But i am stucking again as how can i connect both of them by using if -else?

Can anyone just give me a brief idea on it ?


(i am sorry if this is no related )This is additional question,for gamma, since the mean and variance are dependent on each other, so as i assume the null hypothesis is TRUE, then do I need to minus the sample mean and add the overall mean as well ?in order to make sure that the null hypothesis is TRUE...


Thanks in advance and i am sorry if this is a silly question ....