
Last chance! 50% off unlimited learning
Sale ends in
# NOT RUN {
# Construct a rotating panel design with sample size of 60
R60N <- revisit_dsgn (20, panels=list(R60N=list(n=60, pnl_dsgn = c(1, NA),
pnl_n=NA, start_option="None")), begin=1 )
# Construct a fixed panel design with sample size of 60
F60 <- revisit_dsgn (20, panels=list(F60=list(n=60, pnl_dsgn = c(1, 0),
pnl_n=NA, start_option="None")), begin=1 )
# Power for rotating panel with sample size 60
Power.tst <- power.dsgn("Variable_Name", ind.values = 43, unit.var = 280,
period.var = 4, unitperiod.var = 40, index.var = 90,
unit.rho = 1, period.rho = 0, paneldsgn = list(
R60N=R60N, F60=F60), nrepeats = NULL,
trend.type = "mean", trend= c(1.0, 2.0), alpha=0.05 )
plot_powerpaneldesign(Power.tst)
plot_powerpaneldesign(Power.tst, dsgns = c("F60", "R60N"))
plot_powerpaneldesign(Power.tst, dsgns = c("F60", "R60N"), trend = 1.0)
# }
# NOT RUN {
pdf("Power.tst.pdf")
plot_powerpaneldesign(Power.tst, plot.type = "relative", comp.type = "design",
trend.type = "mean", trend = c(1, 2), dsgns = c("R60N", "F60"),
indicator="Variable_Name")
graphics.off()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab