fixing parameters to 0

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

fixing parameters to 0

Postby agoldberg » Sat Dec 18, 2021 12:03 pm

Hi, I am running a robust design model and I have some missing trapping days/sessions within a data set with multiple sessions and years. I am setting p=c for all models. Do I need to write code for both p and c or just p for fixing parameters? When I run the models it appears that c is being estimated for some of the fixed p parameters which it should not be. Thank you for your help,
Amanda

Code: Select all
# convert spec, sex, and trt variables to factors so that we can treat them as
# grouping variables in the analysis to ease working with output later

buckrd$sex  <- factor(buckrd$sex,
                      levels = c(0, 1),
                      labels = c("F", "M"))                     
buckrd$trt  <- factor(buckrd$trt,
                      levels = c(0, 1),
                      labels = c("Pl", "Va"))
buckrd$site  <- factor(buckrd$site,
                       levels = c(0, 1,2,3,4,5),
                       labels = c("F117","S131","BR","FS127A","BT","PJ"))
buckrd$year  <- factor(buckrd$year,
                     levels = c(0, 1,2),
                     labels = c("19","20","21"))
buckrd$spec  <- factor(buckrd$spec,
                       levels = c(0, 1),
                       labels = c("pman","msp"))

#Robust
buckrd.process=process.data(data=buckrd,model="Robust", time.intervals=c(0,0,0,0,0.867,0,0,0,0,   0.789,0,0,0,0,0.744,0,0,0),
                            groups=c("sex", "trt","site","year","spec"))

#Create parameter specifications for formulas

p.br.19=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==3.4&buckrd.ddl$p$year=="19",]))
p.br.20=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==1&buckrd.ddl$p$year=="20",]))
p.br.20b=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==1.867&buckrd.ddl$p$year=="20"&buckrd.ddl$p$time==5,]))
p.br.20c=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==2.656&buckrd.ddl$p$year=="20"&buckrd.ddl$p$time==5,]))
p.br.20f=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==3.4&buckrd.ddl$p$year=="20"&buckrd.ddl$p$time==4,]))
p.br.21a=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==1&buckrd.ddl$p$year=="21"&buckrd.ddl$p$time==5,]))
p.br.21b=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==1.867&buckrd.ddl$p$year=="21"&buckrd.ddl$p$time==5,]))
p.br.21f=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==2.656&buckrd.ddl$p$year=="21"&buckrd.ddl$p$time==4,]))
p.br.21c=as.numeric(row.names(buckrd.ddl$p[buckrd.ddl$p$session==2.656&buckrd.ddl$p$year=="21"&buckrd.ddl$p$time==5,]))
agoldberg
 
Posts: 11
Joined: Sun Aug 23, 2015 9:10 pm

Re: fixing parameters to 0

Postby jlaake » Sat Dec 18, 2021 12:07 pm

You need to do both and use fix in the design data like it says on the third sticky note at the top of the forum

Fixing real parameters - RMark users PLEASE READ
jlaake
 
Posts: 1295
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: fixing parameters to 0

Postby agoldberg » Sat Dec 18, 2021 3:41 pm

Thanks. Sorry should have seen that the code had been updated. I appreciate you taking the time to help.

Amanda
agoldberg
 
Posts: 11
Joined: Sun Aug 23, 2015 9:10 pm


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest

cron