# NOT RUN {
x1 <- rnorm(20, 1, 3)
x2 <- rnorm(21, 2, 3)
tt(x1, x2, alternative = 'two.sided', type = 1)
#Negative lognormal versus normal data
n1=50; n2=33
x1 = -rlnorm(n1, meanlog = 0, sdlog = sqrt(1)) -0.3*sqrt((exp(1)-1)*exp(1))
x2 = rnorm(n2, -exp(1/2), 0.5)
tt(x1, x2, alternative = 'less', type = 1)
tt(x1, x2, alternative = 'less', type = 2)
tt(x1, x2, alternative = 'less', type = 3)
tt(x1, x2, alternative = 'less', type = 4)
#Lognormal versus normal data
n1=50; n2=33
x1 = rlnorm(n1, meanlog = 0, sdlog = sqrt(1)) + 0.3*sqrt((exp(1)-1)*exp(1))
x2 = rnorm(n2, exp(1/2), 0.5)
tt(x1, x2, alternative = 'greater', type = 1)
tt(x1, x2, alternative = 'greater', type = 2)
tt(x1, x2, alternative = 'greater', type = 3)
tt(x1, x2, alternative = 'greater', type = 4)
# }
Run the code above in your browser using DataLab