Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72776

modelling costs with meglm: error message on zero values

$
0
0
My dataset has repeated observations on patients with patient-level costs captured at regular intervals over a period of time. I model how these costs vary over time using time-invariant patient characteristics (xi) and time indicators (quarters). This works with a GLM model with a gamma log link (see 1 below). However, when I use a generalized linear mixed model to account for non-independence of observations by the same patient, again with a gamma log link (see 2 below), I get the following error message:

option family(gamma) invalid;
cost <= 0 (le 0) in some observations

Is meglm not able to model zero costs? I am using Stata 14.1. I would appreciate any comments or references.


(1)

glm cost quarter1-quarter8 x1-x5 , family(gamma) link(log) vce(cluster patient_id) eform

(2)

meglm cost quarter1-quarter8 x1-x5 || patient_id:, family(gamma) link(log) eform

Viewing all articles
Browse latest Browse all 72776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>