Learn R Programming

phenology (version 10.1)

adapt_parameters: Extract the parameters from a set of parameters to be used with another dataset.

Description

The function "adapt_parameters" extracts the set of parameters to be used with a subset of data. All the uncessary parameters are removed. It can be used when a set of beaches are fitted first and after only one of these beaches is fitted again.

Usage

adapt_parameters(
  data = stop("Datasets is mandatory for this function"),
  parameters = stop("Set of parameters is mandatory for this function")
)

Value

Return the set of parameters

Arguments

data

A dataset of counts

parameters

A set of parameters

Author

Marc Girondot marc.girondot@gmail.com

Details

adapt_parameters get the fitted parameters from a result object.

See Also

Other Phenology model: AutoFitPhenology(), BE_to_LBLE(), Gratiot, LBLE_to_BE(), LBLE_to_L(), L_to_LBLE(), MarineTurtles_2002, MinBMinE_to_Min(), add_SE(), add_phenology(), extract_result(), fit_phenology(), likelihood_phenology(), logLik.phenology(), map_Gratiot, map_phenology(), par_init(), phenology(), phenology2fitRMU(), phenology_MHmcmc(), phenology_MHmcmc_p(), plot.phenology(), plot.phenologymap(), plot_delta(), plot_phi(), print.phenology(), print.phenologymap(), print.phenologyout(), remove_site(), result_Gratiot, result_Gratiot1, result_Gratiot2, result_Gratiot_Flat, result_Gratiot_mcmc, summary.phenology(), summary.phenologymap(), summary.phenologyout()

Examples

Run this code
library(phenology)
# Read a file with data
data(Gratiot)
# Generate a formatted list nammed data_Gratiot 
refdate <- as.Date("2001-01-01")
data_Gratiot<-add_phenology(Gratiot, name="Complete", 
		reference=refdate, format="%d/%m/%Y")
# Generate initial points for the optimisation
parg<-par_init(data_Gratiot, fixed.parameters=NULL)
# Add unnecessary parameters to parg
parg <- c(parg, Max_dummybeach=2, Peak_dummybeach=123)
# Extract the fitted parameters
parg1<-adapt_parameters(data=data_Gratiot, parameters=parg)

Run the code above in your browser using DataLab