0

I have to create a co-variate model however, I am not sure of how to do with a categorical variable such sex. The obfj is identical to the obfj of the model with not covariant.

my data source is

amox <- read_csv("https://raw.githubusercontent.com/dlonsdal/SGUL_PK_data/main/assignment_2/pkdata.csv")

code I used:

one.cmt.Sex <- function() {
  ini({ 
    tcl <- log(15) 
    tv <- log(20)
    SEXe<--0.3
    eta.cl ~ 0.1
    eta.v ~ 0.1
    add.sd <- 0.01
  })
  model({
    cl <- exp(tcl + eta.cl)*(1+SEX*SEXe)
    v <- exp(tv + eta.v)
    linCmt() ~ add(add.sd)
  })
}


nlmixr2(one.cmt.Sex)

Sexfit<- nlmixr2(one.cmt.Sex, amox, est="saem", list(print=0), table = tableControl(cwres = TRUE))

Sexfit$objf

Phil
  • 7,287
  • 3
  • 36
  • 66

0 Answers0