Page 1 of 1

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

PostPosted: Mon Aug 29, 2011 6:55 am
by Roman Luštrik
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?

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

PostPosted: Mon Aug 29, 2011 3:16 pm
by jlaake
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)
}

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

PostPosted: Tue Aug 30, 2011 7:59 am
by Roman Luštrik
Thank you Jeff for your exspeedient (expedient and speedy, did I just make up a word?) correct answer.