[R-sig-eco] RMark Burnham Ananlysis
Jeff Laake
Jeff.Laake at noaa.gov
Tue Dec 2 16:07:39 CET 2008
Best place to post questions about RMark is on the phidot MARK forum. I
do get postings from this list but in digest form but I don't always
review carefully. Also, since RMark is not on CRAN many on this list
may not be aware of RMark.
Now to your question. You are on the right track to add another factor
variable but not for groups. I didn't quite understand your notation
but you need to add a factor variable to the design data for S that you
can use in place of the default time field. I don't know how you have
your time intervals set up but let's say it is something like below
where time starts at beginning of "year" and end of breeding is after .2
of a year (not sure arithmetic is correct here). Because S is an
interval paramter, time will be given the value of the beginning of the
interval. Thus, records in the design data with values of
1.0,1.1,2.0,2.1 etc are breeding season periods and the periods
1.2,2.2,... will be non-breeding periods
ddl$S
time
1.0 breeding
1.1 breeding
1.2 non-breeding
2.0 breeding
2.1 breeding
2.2 non-breeding
.
.
So you can create 2 factor variables. One could be B or N for breeding
non-breeding that would allow you to fit a model with differences
between seasons but not years and the other would be Year which would be
for yearly effects. You could do this as follows if your design data
is names ddl:
ddl$S$season="B"
ddl$S$season[ddl$S$Time-floor(ddl$S$Time)>0.15]="N"
ddl$S$season=factor(ddl$S$season)
ddl$S$year=factor(floor(ddl$S$Time))
Then you can use models for S like ~season, ~year, ~season+year or
~season*year where the latter is equivalent to ~time. Note that I
didn't check the above in R and you'll want to modify to fit your time
setup but it should get going in the right direction.
--jeff
More information about the R-sig-ecology
mailing list