PtotalCat_svy_mean: PtotalCat_svy_mean: Calculating the Weighted Mean for the...

View source: R/PtotalCat_svy_mean.R

PtotalCat_svy_meanR Documentation

PtotalCat_svy_mean: Calculating the Weighted Mean for the Total Physical Activity Categories and any Combination of the Factors for the Global Physical Activity Questionnaire (GPAQ)

Description

Prepare the output for Total Physical Activity Categories (Low, Medium, and High) explained in the GPAQ Analysis Guide at the population level

Usage

PtotalCat_svy_mean(Outcome, Group = NULL, Data, id, weights, strata, CLN)

Arguments

Outcome

the outcome of interest. PtotalCat is the outcome of interest with three levels "Low", "Moderate", and "High".

Group

the group of interest. The default is NULL for when only the outcome variable is in our interest. Group can be any combination of categorical variables. Examples for group can be: ~age4y, ~age4y+sex, ~age4y+UrbanRural+sex, etc.

Data

the output object of gpaq function.

id

an argument in the "svydesign" function.

weights

an argument in the "svydesign" function.

starta

an argument in the "svydesign" function.

CLN

is the "cln_ptotal" for the analysis of the outcome variable "ptotalCat".

Value

Output is a matrix with number of rows equal to the combination number of categories for Group arguments and seven columns. The first column indicate the group of interest, columns two to seven are the average and 95 percent confidence intervals for Low, Moderate, and High categories for total physical activity, respectively.

Examples

   PtotalCat_svy_mean(~ptotalCat,~age4y,Data=Data,id=psu,weights=wstep1,strata =stratum,CLN="cln_ptotal")
   PtotalCat_svy_mean(~ptotalCat,~age4y+sex,Data=Data,id=psu,weights=wstep1,strata =stratum,CLN="cln_ptotal")
   PtotalCat_svy_mean(~ptotalCat,~age4y+ur+sex,Data=Data,id=psu,weights=wstep1,strata =stratum,CLN="cln_ptotal")

   PtotalCat_svy_mean(~ptotalCat,Data=Data,id=psu,weights=wstep1,strata =stratum,CLN="cln_ptotal")


mhajihos/GPAQ documentation built on Nov. 21, 2023, 6:52 p.m.