% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sg-gof-par-cov.R
\name{sg_gof_par_cov}
\alias{sg_gof_par_cov}
\title{Plot random effects or individual parameters vs covariates}
\usage{
sg_gof_par_cov(fpath_i, ptype = "REvsCov", cat_cov = NULL, cont_cov = NULL)
}
\arguments{
\item{fpath_i}{String or sg-fit object. If the string is given, the path to
\code{.Rdata} or \code{.json} file with sg-fit object is expected.}

\item{ptype}{Character. Type of plot: \code{"REvsCov"} for random effects or \code{"IndParvsCov"} for individual parameters.}

\item{cat_cov}{Optional tibble with categorical covariates. Must have columns \code{COV} and optionally \code{COVNAME} for labels.}

\item{cont_cov}{Optional tibble with continuous covariates. Must have columns \code{COV} and optionally \code{COVNAME} for labels.}
}
\value{
A list of ggplot objects. Returns versus continious covariates
\code{vs_contcov} and versus categorical covariates \code{vs_catcov} plots.
}
\description{
Generates ggplot2 visualizations for either random effects (RE) or individual parameters (IndPar)
versus continuous or categorical covariates from a Simurg object.
}
\examples{
library(tibble)
cont_cov <- tibble(
  COV = c("AGE", "WEIGHT"),
  COVNAME = c("Age, years", "Body weight, kg")
)
cat_cov <- tibble(
  COV = c("SEX", "VKORC1_gentyp"),
  COVNAME = c("Sex, M/F", "VKORC1 genotype")
)
fpath_i <- system.file("extdata", "simurg_object", "Warfarin_PK.RData", package = "SimuRg")
p <- sg_gof_par_cov(
  fpath_i = fpath_i,
  ptype = "IndParvsCov",
  cont_cov = cont_cov,
  cat_cov = cat_cov
)
p$vs_contcov
p$vs_catcov

}
