Extract the model frame from a fitted model object.
# S3 method for ssn_lm
model.frame(formula, ...)
# S3 method for ssn_glm
model.frame(formula, ...)
A model frame that contains the variables used by the formula for the fitted model object.
# Copy the mf04p .ssn data to a local directory and read it into R
# When modeling with your .ssn object, you will load it using the relevant
# path to the .ssn data on your machine
copy_lsn_to_temp()
temp_path <- paste0(tempdir(), "/MiddleFork04.ssn")
mf04p <- ssn_import(temp_path, overwrite = TRUE)
ssn_mod <- ssn_lm(
formula = Summer_mn ~ ELEV_DEM,
ssn.object = mf04p,
tailup_type = "exponential",
additive = "afvArea"
)
model.frame(ssn_mod)
#> Summer_mn ELEV_DEM
#> 1 14.92 1947
#> 2 14.72 1952
#> 3 14.61 1958
#> 4 15.22 1923
#> 5 14.49 1932
#> 6 15.29 1940
#> 7 15.07 1940
#> 8 14.94 1945
#> 9 14.99 1948
#> 10 15.02 1950
#> 11 15.11 1949
#> 12 14.70 1950
#> 13 14.58 1951
#> 14 11.38 1977
#> 15 10.72 1984
#> 16 10.43 1993
#> 17 10.13 2007
#> 18 10.12 2009
#> 19 9.81 2012
#> 20 9.76 2023
#> 21 9.77 2023
#> 22 9.53 2026
#> 23 12.57 1988
#> 24 12.42 2013
#> 25 14.10 2015
#> 26 13.70 2015
#> 27 13.22 2038
#> 28 13.08 2052
#> 29 12.19 2066
#> 30 11.32 2085
#> 31 12.11 1975
#> 32 11.82 1982
#> 33 11.91 1999
#> 34 11.41 2002
#> 35 11.71 1997
#> 36 11.54 2006
#> 37 11.14 2026
#> 38 12.06 2036
#> 39 12.09 2046
#> 40 11.96 2050
#> 41 11.02 2071
#> 42 10.21 2077
#> 43 11.16 2016
#> 44 8.75 2034
#> 45 9.02 2042