if (FALSE) {
# Example with simulated data
set.seed(123)
x_train <- data.frame(PlanetaryMassJpt = rnorm(100), RadiusJpt = rnorm(100))
model <- list(
coefs = c(Intercept = -0.5, PlanetaryMassJpt = 0.2, RadiusJpt = -0.1),
class = "bgnlm_model"
)
class(model) <- "bgnlm_model"
# New data for prediction
x_new <- data.frame(PlanetaryMassJpt = c(0.1, -0.3), RadiusJpt = c(0.2, -0.1))
# Predict using the identity link (default)
preds <- predict.bgnlm_model(model, x_new)
}
Run the code above in your browser using DataLab