1

I'm trying to use brms package to run a model where my dependent variable Y is an estimate of the latent variable (Disease=0 absent or Disease=1 present with a probability p). I've a dataframe bd which contains a dichotomous variable Y (result of a test either positive 1 or negative 0 for assessing the disease status), and 3 covariates (X1 numeric, X2 and X3 as factors)

Y~q #where q is a Bernoulli event and q depends on the false positive and false negative fraction of the test. q­­~ pSe +(1-p)(1-Sp) # true positive and false positive depending on the true probability of disease p

The model I want to finally obtain is on the form:

logit(p)~ X1 + X2 + X3 #I want to determine the impacts of my Xi's on the latent variable p

I used brms package with a non linear formula but struggle with specific problems

bform <- bf( Y~q, #defining my Bernoulli event

nlf(q~ Se * p+(1-p) * (1-Sp)),

nlf(p~inv_logit(X1 + X2 + X3)), Se+Sp~1, nl=TRUE, family=bernoulli("identity"))

I put some priors on the test sensitivity ans specificity using beta priors but letting default priors for logistic regression coefficients => bprior

bprior <- set_prior("beta(4.6, 0.86)", nlpar="Se", lb=0, ub=1)+ set_prior("beta(77.55, 4.4)", nlpar="Sp", lb=0, ub=1)

My final model looks like (using the previously created list bform and bprior ):

brm(bform, data=bd, prior=bprior, init="0")

When running the model I only get posteriors from the Se and Sp parameters but I am not able to see any coefficient associated with my covariables X1, X2, X3. I guess my model has a mistake but I'm not able to see what's happen. Any help would be greatly appreciated!!!

I expected to get output from the line code p~inv_logit(X1 + X2 + X3)) to be able to determine coefficients associated with this logistic regression (accounting for imperfect dependent variable estimation)

Buczinski
  • 41
  • 4

0 Answers0