# NOT RUN {
live <- interactive()
rstep <- if(live) 0.005 else 0.025
# 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
smax <- if(live) 3 else 2
rs <- expand.grid(r=seq(0.05,0.15, by=rstep), sat=1:smax)
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