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

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/adapt_parameters.R

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

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

Arguments

data

A dataset of counts

parameters

A set of parameters

Details

adapt_parameters get the fitted parameters from a result object.

Value

Return the set of parameters

Author(s)

Marc Girondot

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(), phenology2fitRMU(), phenology_MHmcmc_p(), phenology_MHmcmc(), phenology(), plot.phenologymap(), plot.phenology(), plot_delta(), plot_phi(), print.phenologymap(), print.phenologyout(), print.phenology(), remove_site(), result_Gratiot1, result_Gratiot2, result_Gratiot_Flat, result_Gratiot_mcmc, result_Gratiot, summary.phenologymap(), summary.phenologyout(), summary.phenology()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

Example output

Loading required package: numDeriv
Loading required package: parallel
Loading required package: optimx
Loading required package: lmf
Loading required package: HelpersMG
Loading required package: lme4
Loading required package: Matrix

Attaching package: 'Matrix'

The following object is masked from 'package:lmf':

    nearPD

Loading required package: coda
Welcome in package phenology version 7.3
Complete
Reference:  2001-01-01

phenology documentation built on Oct. 23, 2020, 7:22 p.m.