# Welcome to deFit
Fitting Differential Equations to Time Series Data ( [deFit](https://github.com/yueqinhu/defit) ).
## Overview
### What is deFit?
Use numerical optimization to fit ordinary differential equations (ODEs) to time series data to examine the dynamic relationships between variables or the characteristics of a dynamical system. It can now be used to estimate the parameters of ODEs up to second order.
### Features
* Fit ordinary differential equation models to time series data
* Report model parameter estimations, standard errors, R-squared, and root mean standard error
* Plot raw data points and fitted lines
* Support ordinary differential equation models up to second order
* deFit can run in Python and R environments
### 1.2 First impression in Python
To get a first impression of how deFit works in simulation, consider the following example of a differential equational model. The figure below contains a graphical representation of the model that we want to fit.
```python
import defit
import pandas as pd
df1 = pd.read_csv('defit/data/example1.csv')
model1 = '''
x =~ myX
time =~ myTime
x(2) ~ x + x(1)
'''
result1 = defit.defit(data=df1,model=model1)
```
![example1](docs/img/example1_python.png)
## 2 Navigation
- [Home](https://github.com/yueqinhu/defit)
- [User guide in R](https://github.com/yueqinhu/defit/blob/main/Documents/UserGuideR.md)
- [User guide in Python](https://github.com/yueqinhu/defit/blob/main/Documents/UserGuidePython.md)
- [issues](https://github.com/yueqinhu/defit/issues)
Raw data
{
"_id": null,
"home_page": "https://github.com/yueqinhu/defit",
"name": "deFit",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "ODE, optimization, numerical methods, Intensive longitudinal data, dynamical system, differential equation, time series",
"author": "Yueqin Hu, Qingshan Liu",
"author_email": "yueqinhu@bnu.edu.cn",
"download_url": "https://files.pythonhosted.org/packages/88/3a/65d72011a64ffeb4ddd84d3a887378abbf8a71ad4ec64b6c12c64aed5369/deFit-0.1.2.tar.gz",
"platform": null,
"description": "# Welcome to deFit\r\n\r\nFitting Differential Equations to Time Series Data ( [deFit](https://github.com/yueqinhu/defit) ).\r\n\r\n## Overview\r\n### What is deFit?\r\nUse numerical optimization to fit ordinary differential equations (ODEs) to time series data to examine the dynamic relationships between variables or the characteristics of a dynamical system. It can now be used to estimate the parameters of ODEs up to second order.\r\n\r\n### Features\r\n* Fit ordinary differential equation models to time series data\r\n* Report model parameter estimations, standard errors, R-squared, and root mean standard error\r\n* Plot raw data points and fitted lines\r\n* Support ordinary differential equation models up to second order\r\n* deFit can run in Python and R environments\r\n\r\n### 1.2 First impression in Python\r\nTo get a first impression of how deFit works in simulation, consider the following example of a differential equational model. The figure below contains a graphical representation of the model that we want to fit.\r\n```python\r\nimport defit\r\nimport pandas as pd\r\ndf1 = pd.read_csv('defit/data/example1.csv')\r\nmodel1 = '''\r\n x =~ myX\r\n time =~ myTime\r\n x(2) ~ x + x(1)\r\n '''\r\nresult1 = defit.defit(data=df1,model=model1)\r\n```\r\n![example1](docs/img/example1_python.png)\r\n\r\n\r\n## 2 Navigation\r\n- [Home](https://github.com/yueqinhu/defit)\r\n- [User guide in R](https://github.com/yueqinhu/defit/blob/main/Documents/UserGuideR.md)\r\n- [User guide in Python](https://github.com/yueqinhu/defit/blob/main/Documents/UserGuidePython.md)\r\n- [issues](https://github.com/yueqinhu/defit/issues)\r\n",
"bugtrack_url": null,
"license": "GPL-3",
"summary": "Fitting Differential Equations to Time Series Data",
"version": "0.1.2",
"project_urls": {
"Documentation": "https://github.com/yueqinhu/defit",
"Homepage": "https://github.com/yueqinhu/defit",
"Source Code": "https://github.com/yueqinhu/defit"
},
"split_keywords": [
"ode",
" optimization",
" numerical methods",
" intensive longitudinal data",
" dynamical system",
" differential equation",
" time series"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "883a65d72011a64ffeb4ddd84d3a887378abbf8a71ad4ec64b6c12c64aed5369",
"md5": "d0059abaf60aac50ab01c6eceadda528",
"sha256": "f51c01059c56c743073a92422164c61e398f9f0553210e2f941b3f0bfb37330b"
},
"downloads": -1,
"filename": "deFit-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "d0059abaf60aac50ab01c6eceadda528",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 14932,
"upload_time": "2024-03-26T08:36:14",
"upload_time_iso_8601": "2024-03-26T08:36:14.072797Z",
"url": "https://files.pythonhosted.org/packages/88/3a/65d72011a64ffeb4ddd84d3a887378abbf8a71ad4ec64b6c12c64aed5369/deFit-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-26 08:36:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yueqinhu",
"github_project": "defit",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "defit"
}