Constraints in INLA

711 views
Skip to first unread message

Gwénaël Leday

unread,
Mar 16, 2012, 5:39:22 AM3/16/12
to r-inla-disc...@googlegroups.com
Dear all,
Is it possible in INLA to specify linear equality or inequality constraints on regression parameters??
Any help would be appreciated,
Gwenael

INLA help

unread,
Mar 16, 2012, 12:30:27 PM3/16/12
to Gwénaël Leday, r-inla-disc...@googlegroups.com


inqualities constraints: no. equality constraits: yes.

each f() model has two arguments

constr = TRUE will impose a sum-to-zero constraint

extraconstr (see ?f) is a general one. additinal to 'constr'.


in case you have constraints 'between' different 'f()'s, then there is
an option in the linear predictor, see ?control.predictor and argument
'cross', which essential, allow you do any anything if you define
formula accordingly.


if you have a spesific problem, please post some detals.

--
INLA help <he...@r-inla.org>
R-INLA

INLA help

unread,
Mar 16, 2012, 12:39:30 PM3/16/12
to Gwénaël Leday, r-inla-disc...@googlegroups.com
On Fri, 2012-03-16 at 17:30 +0100, INLA help wrote:
> On Fri, 2012-03-16 at 02:39 -0700, Gwénaël Leday wrote:
> > Dear all,
> > Is it possible in INLA to specify linear equality or inequality
> > constraints on regression parameters??

oops, you were spesific.

if you have to effects, v and w, and you want beta.v + beta.w = 0, say,
then

y ~ f(i, v, model="iid", constr=TRUE, values = c(1,2)) +
f(j, w, copy="i")

where

i = rep(1,n)
j = rep(2,n)

would do the trick.

an alterntive solution is to extend the model so that (eta = linear
predictor,) eta[n+1] = beta.v, and eta[n+2] = beta.w, and then use
argument

control.predictor=list(cross = c(rep(NA,n),1,1))

see ?control.predictor


A third option is to use the 'A' matrix in the control.predictor and
observe it with 0 and high precision.

Reply all
Reply to author
Forward
0 new messages