specifying c=p(.)*ind_cov using formula notation

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

specifying c=p(.)*ind_cov using formula notation

Postby Roman Luštrik » Mon Aug 29, 2011 6:55 am

My apologies for crossposting this at crossvalidated.com, but I think a post here will speak to a broader audience.

I specify a model in MARK using the design matrix. I name the model c=p(.) and the DM is

Image

I would like to extend this model by adding an individual covariate, result in the model c=p(.)*sp

Image

I've tried to reproduce this analysis in RMark, but I'm at a loss on how to tell RMark to construct this design matrix. This is the code I used.

Code: Select all
tr.models <- function() {
    # specify models
    c.pequal.dot <- list(formula = ~ 1, share = TRUE)
    c.pequal.dot.sp <- list(formula = ~ sp, share = TRUE)

    # collect models and run
    cml <- create.model.list("Huggins")
    tr.result <- mark.wrapper(cml, data = tr.process, ddl = tr.ddl, adjust = FALSE)

    return(tr.result)
}


The results are (notice the number of parameters, they should be 1 and 2 respectively):

Code: Select all
        model npar     AICc DeltaAICc     weight Deviance
2 p(~1)c(~sp)    3 1543.523  0.000000 0.99162194 1537.504
1  p(~1)c(~1)    2 1553.070  9.547451 0.00837806 2358.903


Any tips on how to specify my formulas in RMark to replicate above MARK DM approach?
Roman Luštrik
 
Posts: 9
Joined: Thu Aug 25, 2011 8:48 am

Re: specifying c=p(.)*ind_cov using formula notation

Postby jlaake » Mon Aug 29, 2011 3:16 pm

The share argument needs to be put on the formula for the dominant parameter which is p. The following should do what you want. BTW the phidot forum is the only place you are likely to get a response on RMark. --jeff

Code: Select all
tr.models <- function() {
    # specify models
    p.cequal.dot <- list(formula = ~ 1, share = TRUE)
    p.cequal.dot.sp <- list(formula = ~ sp, share = TRUE)

    # collect models and run
    cml <- create.model.list("Huggins")
    tr.result <- mark.wrapper(cml, data = tr.process, ddl = tr.ddl, adjust
= FALSE)

    return(tr.result)
}
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: specifying c=p(.)*ind_cov using formula notation

Postby Roman Luštrik » Tue Aug 30, 2011 7:59 am

Thank you Jeff for your exspeedient (expedient and speedy, did I just make up a word?) correct answer.
Roman Luštrik
 
Posts: 9
Joined: Thu Aug 25, 2011 8:48 am


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest

cron