Sin link for dot models... can it be done?

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Sin link for dot models... can it be done?

Postby claudiapenaloza » Fri Feb 17, 2012 1:39 pm

I am specifying a "dot" model for one of my parameters in Rmark

S(.)
Code: Select all
S.dot <- list(formula=~1)


I would like survival to be estimated with a sin link but that can't be done in RMark if your model has an intercept (which is how the dot models are built by definition in RMark, right?). Is there a way to specify a "dot" model without precluding the use of the "sin" link?
claudiapenaloza
 
Posts: 63
Joined: Tue Sep 23, 2008 9:48 pm
Location: York, SC

Re: Sin link for dot models... can it be done?

Postby jlaake » Fri Feb 17, 2012 1:45 pm

The following will do the trick. It does work with the intercept model and any other model that can be specified as an identity. With factor variables that can be done with ~-1+factor. I'll clarify that in the help as I forgot to mention the dot model.

Code: Select all
S.dot <- list(formula=~1,link="sin")


--jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Sin link for dot models... can it be done?

Postby claudiapenaloza » Fri Feb 17, 2012 2:08 pm

Thanks Jeff... I confess I hadn't tried it, I had only read how "it couldn't" be done with a model that had the intercept; I assumed that applied to the dot model too.

In cases where Mlogit isn't required, does RMark default to the logit link unless you specify a different link function?
claudiapenaloza
 
Posts: 63
Joined: Tue Sep 23, 2008 9:48 pm
Location: York, SC

Re: Sin link for dot models... can it be done?

Postby jlaake » Fri Feb 17, 2012 2:21 pm

Thanks Jeff... I confess I hadn't tried it, I had only read how "it couldn't" be done with a model that had the intercept; I assumed that applied to the dot model too.

Yes, it should have said intercept + other columns in the DM. Gary said that my restriction is too tight but I couldn't work it out exactly how to loosen it to get the restriction correct. But sin will work with either the identity or the dot model.

In cases where Mlogit isn't required, does RMark default to the logit link unless you specify a different link function?


It will default to logit for a probability, log for N (f0), etc. I've tried to pick sensible defaults. You can see how all the parameters are set and their defaults in the file parameters.txt which is in the RMark package directory wherever you have your R library. That lays out each model in RMark and all the parameters. That is how I now enter models, so you can see how easy it is for me to add models. In fact it is so easy that I forogt what models are in it and had to review MarkModels.pdf to remember that MARK now contains a model (Pradel with p mixture) that could be very useful for my work.

Technically anyone could add a model or change defaults by changing the contents of that file. But if you screw something up, don't expect the code to be very forgiving. The only exception is if you are adding parameters that use mlogit because at present coded is needed in mark.mark.model to set up the mlogit structure which is fairly unique to each parameter and I've yet worked out a general scheme.

--jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron