# NOT RUN {
rstep <- if(interactive()) 0.005 else 0.02
# one irregular parameter
rr <- data.frame(r=seq(0.05,0.15, by=rstep))
ps <- profilepl(rr, Strauss, cells)
plot(ps) # profile pseudolikelihood
plot(ps, coeff="Interaction") # fitted interaction coefficient log(gamma)
# two irregular parameters
rs <- expand.grid(r=seq(0.05,0.15, by=rstep),sat=1:3)
pg <- profilepl(rs, Geyer, cells)
plot(pg) # profile pseudolikelihood against r for each value of 'sat'
plot(pg, coeff="Interaction")
plot(pg, xvariable="sat", col=ifelse(r < 0.1, "red", "green"))
# }
Run the code above in your browser using DataLab