fit_cough_model: Fit mean-variance regression model to cough

Description Usage Arguments Value

View source: R/fit_model_to_cough.R

Description

Fit a regression model of the relationship between mean cough rate and its variance, in which each data point is the mean-variance from a user with sufficient monitoring time.

Usage

1
fit_cough_model(ho, cutoff_hours = 50, cutoff_hourly = 30, toplot = TRUE)

Arguments

ho

A hyfe object, which is generated by process_hyfe_data(). See full details and examples in the package vignette.

cutoff_hours

Minimum number of qualifying hours a user must have to be included in the model.

cutoff_hourly

Minimum monitoring time within an hour for that hour to be included in the model.

toplot

If TRUE, a regression scatterplot plot will be displayed.

Value

A list with several named elements: p is the regression F statistic; r2 is the adjusted R-squared value for the regression; n is the number of users included in the analysis (i.e., the sample size of the model); coefficients provide the coefficient estimates from the model (b1 and intercept); model provids the model object; data provide the data used to fit the model.


hyfe-ai/hyfer documentation built on Dec. 20, 2021, 5:53 p.m.