betapower.plot: Plots of Beta power

Description Usage Arguments Details Examples

Description

Generate several comparison plots of power.

Usage

1
betapower.plot(betapower.matrix,link.type,by)

Arguments

link.type

the type of link used in the beta regression. You can choose one or more of the following: "logit", "probit", "cloglog", "cauchit", "log", "loglog", "all"

by

the type of plot. see details.

betapower.matrix

a matrix obtained by the function betapower.(the formula was described as the output formula in the function betapower)

Details

betapower.plot() returns different plots depends on by
by = "linktype": betapower.plot() returns graphs that plot power against mu1, where mu1 is the mean for the treatment group under the alternative. The number of plots will vary depending on the number of link types selected with the last plot showing power based on Wilcoxon Rank Sum Test. The first one or several plots show comparisons of power with different sample size, using GLM method with one or several link types. The last plot shows a comparison of the power with different sample size using Wilcoxon Rank Sum Test. Y-axis denotes power and X-axis denotes mu1, the mean for the treatment group under the alternative.
by = "samplesize": betapower.plot() returns a number of plots equal to the number of sample sizes tested. Each plot compares power calculated with different link types and the Wilcoxon Rank Sum Test. Y-axis denotes power and X-axis denotes mu1, the mean for the treatment group under the alternative.
by = "mu1": betapower.plot() returns a number of plots equal to the number of mu1 used in the procedure. Each plot compares power calculated with different link types and the Wilcoxon Rank Sum Test. Y-axis denotes power and X-axis denotes sample size.

Examples

1
2
3
4
5
6
7
8
BPmat <- betapower(0.56,0.255,.70,.75,.05,30,50, 20,40,610201501,"all")
betapower.plot(BPmat,link.type = "all",by="linktype")
betapower.plot(BPmat,link.type = "all",by="samplesize")
betapower.plot(BPmat,link.type = "all",by="mu1")
BPmat2 <- betapower(0.56,0.255,.560,.76,.05,30,45, 5,200,610201511,c("logit","loglog","log"))
betapower.plot(BPmat2,link.type = c("logit","loglog","log"),by="linktype")
betapower.plot(BPmat2,link.type = c("logit","loglog","log"),by="samplesize")
betapower.plot(BPmat2,link.type = c("logit","loglog","log"),by="mu1")

CastleLi/BetaPSS documentation built on May 15, 2019, 10:34 p.m.