# Controlling Error Correlations in Models with Panel Data

### Description

`errorcorr`

is an additional function in the bdynsys package. It calls functions `preprocess_data`

. It computes the errors in the models (differential equations) and the covariances of the errors. It then uses the covarinaces to re-estimate the Betas of the models. The covarinace matrix is printed and the re-estimated Betas saved in a file. It requires the package `MASS`

### Usage

1 | ```
errorcorr(dataset, indnr, x, y, f, xterms, yterms, nrterms, z, zterms, v, vterms)
``` |

### Arguments

`dataset` |
a |

`indnr` |
an integer number indicating number of indicators, to be included in the modeling procedure |

`x` |
a reference to variable from the paneldata to be included as indicator 1 in the modeling procedure. |

`y` |
a reference to variable from the paneldata to be included as indicator 2 in the modeling procedure. |

`f` |
a function that contains the models of the indicators. |

`xterms` |
a vector that contains the terms from the model dx/dt. |

`yterms` |
a vector that contains the terms from the model dy/dt. |

`nrterms` |
total number of in all equations, e.g. sum of terms in equation for dx/dt and terms in equation for dy/dt, if the number of variables is two. |

`z` |
a reference to variable from the paneldata to be included as indicator 3 in the modeling procedure. |

`zterms` |
a vector that contains the terms from the model dz/dt. |

`v` |
a reference to variable from the paneldata to be included as indicator 4 in the modeling procedure. |

`vterms` |
a vector that contains the terms from the model dv/dt. |

### Author(s)

Viktoria Spaiser: viktoria.sp@web.de

### Examples

1 2 3 4 5 |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.