Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fit Vector Fields and Potential Landscapes from Intensive Longitudinal Data

License

NotificationsYou must be signed in to change notification settings

Sciurus365/fitlandr

Repository files navigation

CRAN_Status_BadgeR-CMD-check

A toolbox for estimating vector fields from intensive longitudinal data,and construct potential landscapes thereafter. The vector fields can beestimated with two nonparametric methods: the Multivariate Vector FieldKernel Estimator (MVKE) by Bandi & Moloche (2018)https://doi.org/10.1017/S0266466617000305 and the Sparse Vector FieldConsensus (SparseVFC) algorithm by Ma et al. (2013)https://doi.org/10.1016/j.patcog.2013.05.017. The potential landscapescan be constructed with a simulation-based approach with thesimlandrpackage (Cui et al., 2021)https://doi.org/10.31234/osf.io/pzva3, orthe Bhattacharya et al. (2011) method for path integrationhttps://doi.org/10.1186/1752-0509-5-85.

Installation

You can install the development version offitlandr fromGitHub with:

# install.packages("devtools")devtools::install_github("Sciurus365/fitlandr")

Example

We use the following bistable dynamic system to illustrate the use offitlandr. The test data set is created as follows.

single_output_grad<-simlandr::sim_fun_grad(length=200,seed=1614)library(tidyverse)ggplot(data=single_output_grad %>% as_tibble())+  geom_path(aes(x=1:200,y=x),color="blue")+  geom_path(aes(x=1:200,y=y),color="red")+  theme_bw()

Fit the vector field with MVKE (see?MVKE for the explanations ofparameters):

library(fitlandr)v2<- fit_2d_vf(single_output_grad,x="x",y="y",method="MVKE")plot(v2)

Fit the potential landscape:

future::plan("multisession")set.seed(1614)l2<- fit_3d_vfld(v2,.sim_vf_options= sim_vf_options(chains=16,stepsize=1,forbid_overflow=TRUE),.simlandr_options= simlandr_options(adjust=5,Umax=4))#> ℹ Simulating the model✔ Simulating the model [28.8s]#> ℹ Constructing the landscape✔ Constructing the landscape [2.5s]plot(l2,2)

# equivalent:# s2 <- sim_vf(v2, chains = 16, stepsize = 1, forbid_overflow = TRUE)# l2 <- simlandr::make_3d_static(s2, x = "x", y = "y", lims = v2$lims, adjust = 5, Umax = 4)

About

Fit Vector Fields and Potential Landscapes from Intensive Longitudinal Data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp