Learn R Programming

UncDecomp (version 1.0.1)

plotUDlist: Plot UD_list

Description

This function plots how ppud's result changes as lambda increases.

Arguments

x

output of ppud(UD_list class)

lwd

line width in plot

...

further arguments passed to or from other methods.

Value

ggplot showing how the result of ppud changes as lambda increases

Examples

Run this code
# NOT RUN {
set.seed(0)
stage1 <- LETTERS[1:3]
stage2 <- LETTERS[1:2]
stage3 <- LETTERS[1:4]
y <- rnorm(3*2*4)
data <- expand.grid(stage1=stage1,
                    stage2=stage2,
                    stage3=stage3)
stages <- names(data)
data <- cbind(data, y)

UD_bal_model_range <- UD_bal_model(data, "y", stages, u_range, flist_range)
UD_bal_model_range 

UD_bal_stage_range <- UD_model2stage(UD_bal_model_range)
UD_bal_stage_range 

UD_model_list = ppud(UD_bal_model_range)
plot(UD_model_list)

UD_stage_list = ppud(UD_bal_stage_range)
plot(UD_stage_list)

# }

Run the code above in your browser using DataLab