Description Usage Arguments Details Value Examples
mechanical model: use an exponential function to describe the coefficients away from roads
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | mechanical(
variabledf,
y_var = c("day_value", "night_value", "value_mean"),
pop_var = "pop3k",
distance_centre,
roadtypes = 3,
buffers_in,
buffers_out,
training,
test,
nls2start = NA,
Road_varname = "ROAD",
normalize = F
)
|
variabledf |
the dataframe containing predictors and dependent variable |
y_var |
name of the dependent variable. |
pop_var |
the name of an additional variable as a linear term, usually population withn a buffer, a string. |
distance_centre |
the distance to centre from each buffer. (b2-b1)/2 + b1 |
training |
the index for the rows used for training. |
test |
the index for the rows used for testing. |
nls2start |
the start value for nls2. if providing an nls2start, the nls2 from nls2 package is used. Details see nls2. |
Road_varname |
the name of variables contains road buffers, e.g. 'ROAD' |
normalize |
if True, the road ring is normalised by the area (default is false) |
This method used nls for modelling. This function also prints errormatrix, the exponential model; plot coefficient. The modelling and evaluation should be separated at a later stage, now putting together for exploration only.
An object of nls
1 | mechanical(inde_var,'day_value',pop_var = 'pop5k', distance_centre = distance_centre, training, test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.