R/FixedEffectsModel.R
toJSON-FixedEffectsModel-method.Rd
This function converts a fixed effects model into a JSON representation. Primarily, this is used internally to populate a remotely hosted MongoDatabase.
# S4 method for FixedEffectsModel
toJSON(object, ...)
A fixed effects model
Additional arguments passed to jsonlite::toJSON
A string containing the JSON representation of the object
toJSON(brackett_rubra, pretty = TRUE)
#> {
#> "model_id": "2a97d7ba",
#> "pub_id": "brackett_1977",
#> "model_type": "stem volume",
#> "model_class": "FixedEffectsModel",
#> "response": {
#> "name": "vsia",
#> "unit": "ft3"
#> },
#> "covariates": [
#> {
#> "name": "dsob",
#> "unit": "in"
#> },
#> {
#> "name": "hst",
#> "unit": "ft"
#> }
#> ],
#> "descriptors": {
#> "country": ["US"],
#> "region": ["US-WA"],
#> "geographic_region": [],
#> "age_class": [],
#> "taxa": [
#> {
#> "family": ["Betulaceae"],
#> "genus": ["Alnus"],
#> "species": ["rubra"]
#> }
#> ]
#> },
#> "parameters": {
#> "a": -2.672775,
#> "b": 1.920617,
#> "c": 1.074024
#> },
#> "predict_fn_body": ["10^a * dsob^b * hst^c"]
#> }