Title: | Tests of Homogeneity of Variances |
---|---|
Description: | Most common exact, asymptotic and resample based tests are provided for testing the homogeneity of variances of k normal distributions under normality. These tests are Barlett, Bhandary & Dai, Brown & Forsythe, Chang et al., Gokpinar & Gokpinar, Levene, Liu and Xu, Gokpinar. Also, a data generation function from multiple normal distribution is provided using any multiple normal parameters. Bartlett, M. S. (1937) <doi:10.1098/rspa.1937.0109> Bhandary, M., & Dai, H. (2008) <doi:10.1080/03610910802431011> Brown, M. B., & Forsythe, A. B. (1974).<doi:10.1080/01621459.1974.10482955> Chang, C. H., Pal, N., & Lin, J. J. (2017) <doi:10.1080/03610918.2016.1202277> Gokpinar E. & Gokpinar F. (2017) <doi:10.1080/03610918.2014.955110> Liu, X., & Xu, X. (2010) <doi:10.1016/j.spl.2010.05.017> Levene, H. (1960) <https://cir.nii.ac.jp/crid/1573950400526848896> Gökpınar, E. (2020) <doi:10.1080/03610918.2020.1800037>. |
Authors: | Fikri Gökpınar [aut, cre]
|
Maintainer: | Fikri Gökpınar <[email protected]> |
License: | GPL-2 |
Version: | 0.1 |
Built: | 2025-03-12 03:13:51 UTC |
Source: | https://github.com/cran/homnormal |
Tests the homogeniety of variances for more than two normal groups.
bart(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
bart(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
x1 |
a numeric matrix containing the values of groups. |
x2 |
numeric matrix containing the values of group numbers. |
alfa |
significance level of the test. Default number is 0.05. |
table |
a logical variable that indicates table will appear or not. Default is TRUE. |
graph |
box plot of groups of raw or centered data. |
if table is TRUE, then it gives a detailed table, else it gives a vector of r value(r=1 when null hypothesis was rejected and r=0 when null hypothesis was accepted) p-value and test statistic value.
Bartlett, M. S. (1937). "Properties of sufficiency and statistical tests". Proceedings of the Royal Statistical Society, Series A 160, 268–282 JSTOR.
levene
Brown_Forsythe
, Cat_GG
, Cat_LR
, genp
, slrt
, bdai
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo bart(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") bart(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") bart(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") bart(x1,x2,alfa=0.10,table=FALSE,graph="centerized") readline(prompt = "Pause. Press <Enter> to continue...") bart(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo bart(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") bart(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") bart(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") bart(x1,x2,alfa=0.10,table=FALSE,graph="centerized") readline(prompt = "Pause. Press <Enter> to continue...") bart(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
Tests the homogeniety of variances for more than two normal groups using Bahandary-Dai test.
bdai(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
bdai(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
x1 |
a numeric matrix containing the values of groups. |
x2 |
numeric matrix containing the values of group numbers. |
alfa |
significance level of the test. Default number is 0.05. |
table |
a logical variable that indicates table will appear or not. Default is TRUE. |
graph |
box plot of groups of raw or centered data. |
if table is TRUE, then it gives a detailed table, else it gives a vector of r value(r=1 when null hypothesis was rejected and r=0 when null hypothesis was accepted) p-value and test statistic value.
Bhandary, M., & Dai, H. (2008). An alternative test for the equality of variances for several populations when the underlying distributions are normal. Communications in Statistics-Simulation and Computation, 38(1), 109-117.
Brown_Forsythe
, Cat_GG
, Cat_LR
, genp
, slrt
, levene
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo bdai(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") bdai(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") bdai(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") bdai(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") bdai(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo bdai(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") bdai(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") bdai(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") bdai(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") bdai(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
Tests the homogeniety of variances for more than two normal groups.
Brown_Forsythe(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
Brown_Forsythe(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
x1 |
a numeric matrix containing the values of groups. |
x2 |
numeric matrix containing the values of group numbers. |
alfa |
significance level of the test. Default number is 0.05. |
table |
a logical variable that indicates table will appear or not. Default is TRUE. |
graph |
box plot of groups of raw or centered data. |
if table is TRUE, then it gives a detailed table, else it gives a vector of r value(r=1 when null hypothesis was rejected and r=0 when null hypothesis was accepted) p-value and test statistic value.
Brown, M. B., & Forsythe, A. B. (1974). Robust tests for the equality of variances. Journal of the American Statistical Association, 69(346), 364-367.
bdai
, Cat_GG
, Cat_LR
, genp
, slrt
, levene
,
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo Brown_Forsythe(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") Brown_Forsythe(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") Brown_Forsythe(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") Brown_Forsythe(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") Brown_Forsythe(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo Brown_Forsythe(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") Brown_Forsythe(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") Brown_Forsythe(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") Brown_Forsythe(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") Brown_Forsythe(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
Tests the homogeniety of variances for more than two normal groups using standartized likelihood ratio test.
Cat_GG(x1, x2, alfa = 0.05, m = 2000, table = TRUE, graph = "none")
Cat_GG(x1, x2, alfa = 0.05, m = 2000, table = TRUE, graph = "none")
x1 |
a numeric matrix containing the values of groups. |
x2 |
numeric matrix containing the values of group numbers. |
alfa |
significance level of the test. Default number is 0.05. |
m |
number of resampling. |
table |
a logical variable that indicates table will appear or not. Default is TRUE. |
graph |
box plot of groups of raw or centered data. |
if table is TRUE, then it gives a detailed table, else it gives a vector of r value(r=1 when null hypothesis was rejected and r=0 when null hypothesis was accepted) p-value and test statistic value.
Gokpinar, E., & Gokpinar, F. (2017). Testing equality of variances for several normal populations. Communications in Statistics-Simulation and Computation, 46(1), 38-52.
Brown_Forsythe
, bdai
, Cat_LR
, genp
, slrt
, levene
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo Cat_GG(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") Cat_GG(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") Cat_GG(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") Cat_GG(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") Cat_GG(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo Cat_GG(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") Cat_GG(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") Cat_GG(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") Cat_GG(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") Cat_GG(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
Tests the homogeniety of variances for more than two normal groups using standartized likelihood ratio test.
Cat_LR(x1, x2, alfa = 0.05, m = 2000, table = TRUE, graph = "none")
Cat_LR(x1, x2, alfa = 0.05, m = 2000, table = TRUE, graph = "none")
x1 |
a numeric matrix containing the values of groups. |
x2 |
numeric matrix containing the values of group numbers. |
alfa |
significance level of the test. Default number is 0.05. |
m |
number of resampling. |
table |
a logical variable that indicates table will appear or not. Default is TRUE. |
graph |
box plot of groups of raw or centered data. |
if table is TRUE, then it gives a detailed table, else it gives a vector of r value(r=1 when null hypothesis was rejected and r=0 when null hypothesis was accepted) p-value and test statistic value.
Chang, C. H., Pal, N., & Lin, J. J. (2017). A revisit to test the equality of variances of several populations. Communications in Statistics-Simulation and Computation, 46(8), 6360-6384.
Brown_Forsythe
, Cat_GG
, bdai
, genp
, slrt
, levene
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo Cat_LR(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") Cat_LR(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") Cat_LR(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") Cat_LR(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") Cat_LR(x1,x2,alfa=0.10,m=5000,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo Cat_LR(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") Cat_LR(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") Cat_LR(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") Cat_LR(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") Cat_LR(x1,x2,alfa=0.10,m=5000,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
This function generates data from multiple normal distribution.
datagen(n, mu, sigma, tn = 1)
datagen(n, mu, sigma, tn = 1)
n |
Sample sizes of each group. n=c(n1,n2,...nk); for example: n=c(3, 4, 5). |
mu |
Mean of each group.mu=c(mu1,mu2,...muk); for example: mu=c(3, 4, 5). |
sigma |
Standard deviation of each group.sigma=c(sigma1,sigma2,...sigmak); for example: sigma=c(1, 2, 3). |
tn |
Trial number for all groups. Default of the parameter is 1. This parameter for use more than 1, is especially useful for resampling such as Monte Carlo, Parametric Bootstrap. |
a data matrix with size (n1,n2,...nk) with group number 1,2,...k at first row and random number with mnean mu=(mu1,mu2,...muk) and standard deviation sigma=(sigma1,sigma2,...sigmak)
n=c(3, 4, 5) mu=c(3, 4, 5) sigma=c(3, 4, 5) F=datagen(n,mu,sigma);muh=F[1];S2h=F[2];x=F[3] muh S2h x # Following example especially useful for simulation based tecnhiques # such as Monte Carlo, Parametric Bootstrap and comparison studies # by using simulation. Fm=datagen(c(3, 4, 5),c(3, 4, 5),c(3, 4, 5),10);muhm=Fm[1];S2hm=Fm[2];xm=Fm[3] muhm S2hm xm
n=c(3, 4, 5) mu=c(3, 4, 5) sigma=c(3, 4, 5) F=datagen(n,mu,sigma);muh=F[1];S2h=F[2];x=F[3] muh S2h x # Following example especially useful for simulation based tecnhiques # such as Monte Carlo, Parametric Bootstrap and comparison studies # by using simulation. Fm=datagen(c(3, 4, 5),c(3, 4, 5),c(3, 4, 5),10);muhm=Fm[1];S2hm=Fm[2];xm=Fm[3] muhm S2hm xm
The data related to survival times of patients was collected from 4 hospitals, which was a part of the data by given Fleming and Harrington(1991). The data contain failure time of the patients.
data(FH_data)
data(FH_data)
A dataframe with 21 rows 2 variables
Hospital No
Survival Time of Patients
T.R. Fleming and D.P. Harrington, Counting processes and survival analysis. Wiley Online Library, Vol. 8., 1991.
data("FH_data") x1=FH_data$SurvivalTime x2=FH_data$HospitalNo
data("FH_data") x1=FH_data$SurvivalTime x2=FH_data$HospitalNo
Tests the homogeniety of variances for more than two normal groups using generalized p value test.
genp(x1, x2, alfa = 0.05, m = 2000, table = TRUE, graph = "none")
genp(x1, x2, alfa = 0.05, m = 2000, table = TRUE, graph = "none")
x1 |
a numeric matrix containing the values of groups. |
x2 |
numeric matrix containing the values of group numbers. |
alfa |
significance level of the test. Default number is 0.05. |
m |
number of resampling. |
table |
a logical variable that indicates table will appear or not. Default is TRUE. |
graph |
box plot of groups of raw or centered data. |
if table is TRUE, then it gives a detailed table, else it gives a vector of r value(r=1 when null hypothesis was rejected and r=0 when null hypothesis was accepted) p-value and test statistic value.
Liu, X., & Xu, X. (2010). A new generalized p-value approach for testing the homogeneity of variances. Statistics & probability letters, 80(19-20), 1486-1491.
Brown_Forsythe
, Cat_GG
, Cat_LR
, bdai
, slrt
, levene
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo genp(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10,m=5000) readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo genp(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10,m=5000) readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") genp(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
Tests the homogeniety of variances for more than two normal groups.
levene(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
levene(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
x1 |
a numeric matrix containing the values of groups. |
x2 |
numeric matrix containing the values of group numbers. |
alfa |
significance level of the test. Default number is 0.05. |
table |
a logical variable that indicates table will appear or not. Default is TRUE. |
graph |
box plot of groups of raw or centered data. |
if table is TRUE, then it gives a detailed table, else it gives a vector of r value(r=1 when null hypothesis was rejected and r=0 when null hypothesis was accepted) p-value and test statistic value.
Levene, H. (1960). Robust tests for equality of variances, p 278–292. Contributions to probability and statistics: essays in honor of Harold Hotelling. Stanford University Press, Palo Alto, CA.
Brown_Forsythe
, Cat_GG
, Cat_LR
, genp
, slrt
, bdai
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo levene(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") levene(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") levene(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") levene(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo levene(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") levene(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") levene(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") levene(x1,x2,alfa=0.10,table=FALSE,graph="raw") readline(prompt = "Pause. Press <Enter> to continue...") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
Tests the homogeniety of variances for more than two normal groups using standartized likelihood ratio test.
slrt(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
slrt(x1, x2, alfa = 0.05, table = TRUE, graph = "none")
x1 |
a numeric matrix containing the values of groups. |
x2 |
numeric matrix containing the values of group numbers. |
alfa |
significance level of the test. Default number is 0.05. |
table |
a logical variable that indicates table will appear or not. Default is TRUE. |
graph |
box plot of groups of raw or centered data. |
if table is TRUE, then it gives a detailed table, else it gives a vector of r value(r=1 when null hypothesis was rejected and r=0 when null hypothesis was accepted) p-value and test statistic value.
Gökpınar, E. (2020). Standardized likelihood ratio test for homogeneity of variance of several normal populations. Communications in Statistics-Simulation and Computation, 1-11.
Brown_Forsythe
, datagen
,levene
,
Cat_LR
, genp
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo slrt(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") slrt(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") slrt(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") slrt(x1,x2,alfa=0.10,table=FALSE,graph=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") slrt(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value
data(FH_data) x1=FH_data$SurvivalTime x2=FH_data$HospitalNo slrt(x1,x2) readline(prompt = "Pause. Press <Enter> to continue...") slrt(x1,x2,alfa=0.10) readline(prompt = "Pause. Press <Enter> to continue...") slrt(x1,x2,alfa=0.10,table=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") slrt(x1,x2,alfa=0.10,table=FALSE,graph=FALSE) readline(prompt = "Pause. Press <Enter> to continue...") slrt(x1,x2,alfa=0.10,table=FALSE,graph="none") # ---THIS VERSION IS ESPECIALLY USEFUL FOR COMPARISON STUDIES BY SIMULATION--- # #first value of the vector is r value(r=1 when rejected and r=0 when accepted null hypothesis) # second value of the vector is the p-value and third value is the tests statistic value