Hi,

I can estimate quantile regression models, but can¹t get the proper syntax
for the newdata argument in the predict.lqm function.

Specifically:

The model call

Des.Iso.ATE.lqm <- lqm(Wakeup.0.30 ~ Anesthetic,
data = Des.Iso.dt,weights = get.weights(Des.Iso.ATE.ps, stop.method =
'es.mean'),
tau = seq(0.1, 0.9, 0.1), control = list(loop_max_iter = 10000))

The explanatory factor Anesthetic is a two level.

Attempts to use predict


> predict(Des.Iso.ATE.lqm, newdata = data.table(Anesthetic = 'Iso'))
Error in predict.lqm(Des.Iso.ATE.lqm, newdata = data.table(Anesthetic =
"Iso")) : 
  object 'yhat' not found
> predict(Des.Iso.ATE.lqm, newdata = data.frame(Anesthetic = factor('Iso',
>levels=levels(Des.Iso.dt$Anesthetic))))
Error in predict.lqm(Des.Iso.ATE.lqm, newdata = data.frame(Anesthetic =
factor("Iso",  : 
  object 'yhat' not found



???

Nathan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to