Page 1 of 1

Specifying link functions on a per real parameter basis

PostPosted: Fri Feb 10, 2012 8:33 pm
by wchallen
Hello, please feel free to yell at me, but I have been looking (web, forum and finally combing through the RMark source code) and I cannot find any way to specify link functions on a per real parameter basis (as can be done in GUI mark).

There is mention in the R-mark code base of "Parm-specific" settings in the mark.make.model function line 1234 (I didn't make up that line number), but this was really referring to parameter classes (e.g. p, phi), not link functions within a parameter class.

I would like to use both a log and logit link to model the survival parameter. We have migrating salmon which typically swim in a fair direct path between detection points. We would like to estimate a survival rate per unit time.

Let S_t = (\zeta_t)^{td} be a survival rate function, where \zeta_t is the survival rate per week, and dt is the time in weeks to travel between detection points (aka occasions).

Using a log link we get the following

\log(S_t)= dt \cdot log(\zeta_t)

where log(\zeta_t) = \beta_1 in a regular mark beta parameter in a model without an intercept allowing us to estimate survival rate as \hat{\zeta_t}=e^{\hat{\beta_1}}, given the invariance properties of MLE's.

Now the problem is we have subgroups, one of which pauses in one to two of the segments during migration, for this group*segment we would like to use a logit link function and just estimate the probability of survival, while in other segments we would like an estimate a survival rate.

For now I am just using a log link and a separate beta parameter with '1' in the design matrix for these special segments, giving us \hat{S_t} = e^\hat{\beta} as our estimator, but as you know there is no bounds imposed when using the log link. Occasionally, we get some approx 95% CI that reveal the approximate nature as survival in this segment is quite high. Would a journal accept an upper bound of 1.05? Talk about great survival!!

Am I stuck using GUI MARK or have I missed something somewhere? Please feel free to berate as necessary.

Re: Specifying link functions on a per real parameter basis

PostPosted: Wed Feb 15, 2012 8:29 pm
by jlaake
You are not missing anything. Can't do this in RMark but I'd entertain ideas on what to do here. One idea would be to add the link to the design data which would enable it to be set programmatically. The problem is that you would have to specify the link for each real parameter before simplification of the parameters. Also, I'd need to incorporate this into the simpification process so it wouldn't simplify over parameters with different link functions. I'll add this to the list. In the meantime, you can either go back to MARK or use the following workaround:

1) build the models in RMark using the log link specification for survival.
2) use export.MARK and then import them into Mark interface
3) recall each model and change the link for the parameter that should be logit and re-run

It is a kludge but will prevent you from having to build the models by hand. I'll consider making them specific to a real parameter.

--jeff