# NOT RUN {
# System of Non-linear Regressions
eq_c <- c("hg ~ exp( h0 + h1*log(tht) + h2*tht^2 + h3*elev)",
"dg ~ exp( d0 + d1*log(dbh) + d2*hg + d3*cr)")
par_c <- c(paste0("h", 0:3),paste0("d", 0:3))
para_cont <- get_par(par_c, eq_c)
# Indirect utility functions for discrete choice:
eq_d <- c("a1 + p1 * price_1 + p2 * catch_2", "a2 + p1 * price_2 + p2 * catch_2",
"a3 + p1 * price_3 + p2 * catch_3", "a4 + p1 * price_4 + p2 * catch_4")
par_d <- c(paste0("a", 1:4), paste0("p", 1:2))
disc_par <- get_par(par_d, eq_d)
# }
Run the code above in your browser using DataLab