temp_model {APCI} | R Documentation |

Estimate the APCI original model. This is a generalized linear regression model.

```
temp_model(data,
outcome = "inlfc",
age = "acc",
period = "pcc",
cohort = NULL,
weight = NULL,
covariate = NULL,
family = "quasibinomial",
gee = FALSE,
id = NULL,
corstr = "exchangeable",
...)
```

`data` |
A data frame containing the outcome variable, age group indicator, period group indicator, and covariates to be used in the model. If the variable(s) are not found in data, there will be an error message reminding the users to check the input data again. |

`outcome` |
An object of class character containing the name of the outcome variable. The outcome variable can be continuous, categorical, or count. |

`age` |
An object of class character representing the age group index taking on a small number of distinct values in the data. Usually, the vector should be converted to a factor (or the terms of "category" and "enumerated type"). |

`period` |
An object of class character, similar to the argument of age, representing the time period index in the data. |

`cohort` |
An optional object of class character representing cohort membership index in the data. Usually, the cohort index can be generated from the age group index and time period index in the data because of the intrinsic relationship among these three time-related indices. |

`weight` |
An optional vector of sample weights to be used in the model fitting process. If non-NULL, the weights will be used in the first step to estimate the model. Observations with negative weights will be automatically dropped in modeling. |

`covariate` |
An optional vector of characters, representing the name(s) of the user-specified covariate(s) to be used in the model. If the variable(s) are not found in data, there will be an error message reminding the users to check the data again. |

`family` |
Used to specify the statistical distribution of the error term and link function to be used in the model. Usually, it is a character string naming a family function. For example, family can be "binomial", "multinomial"", or "gaussian". Users could also check R package glm for more details of family functions. |

`gee` |
logical, indicating if the data is cross-sectional data or longitudinal/panel data. If |

`id` |
A vector of character, specifying the cluster index in longitudinal data. It is required when |

`corstr` |
a character string, specifying a possible correlation structure in the error terms when |

`...` |

[Package *APCI* version 1.0.6 Index]