This function extract plots from a pamlj object and return them as a list

This function extract plots from a pamlj object.

This function generate a sample for a mixed model.

plots(x, ...)

# S3 method for class 'pamlj'
plot(x, ...)

make_mixed_model(syntax, clusterpars, categorical = list(), ...)

Arguments

x

a pamlj results object of the class `pamlj`

...

currently not used

syntax

a pamlj model syntax

clusterpars

a pamlj syntax model

categorical

named list of categorical variables with number of levels in the form `list(varname=x)` where x is the number of levels

Value

an object of class ggplot or a list of ggplot objects

an object of class ggplot or a list of ggplot objects

an dataframe

Author

Marcello Gallucci

Examples

obj<-pamlj::pamlcorr(es=.1,.interface="R",plot_contour=T,plot_x="n",plot_y="es",plot_x_from=10,plot_x_to=100)
results<-plots(obj)
#> Loading required namespace: ggplot2
#> Warning: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0.
#>  Please use the `linewidth` argument instead.
#>  The deprecated feature was likely used in the jmvcore package.
#>   Please report the issue at <https://github.com/jamovi/jmvcore/issues>.
lapply(results,class)
#> $powerContour
#> [1] "PlotObject" "R6"        
#> 
#> $powerEscurve
#> [1] "PlotObject" "R6"        
#> 
#> $powerNcurve
#> [1] "PlotObject" "R6"        
#> 
#> $powerCustom
#> [1] "ggplot2::ggplot" "ggplot"          "ggplot2::gg"     "S7_object"      
#> [5] "gg"             
#> 
if (FALSE) { # \dontrun{
obj<-pamlj::pamlcorr(es=.1,.interface="R",plot_contour=T,plot_x="n",plot_y="es",plot_x_from=10,plot_x_to=100)
plot(obj)
} # }
if (FALSE) { # \dontrun{
 df<-pamlj::make_mixed_model("y~1*1+1*x+(1*1|clusters)",clusterpars=list(clusters0(n=4,k=10)))
 df
} # }