Will have, because we will use overall=F in Note that this function expects a specific input, namely a list withĢ components corresponding to the 2 strata “Treatment” and “Control” in Here is aĬontinuation of the example from the previous section that produces the We can use a named vector to specify labels for each row aĭot (‘.’) can be used to indicate that the abbreviated code string Strings, in which case each result will be displayed in its own row in Keyword matching is case insensitive, and any text other than the fault function and includes: N, NMISS, MEAN, SD,ĬV, GMEAN, GCV, MEDIAN, MIN, MAX, IQR, Q1, Q2, Q3, T1, T2, FREQ, PCT. Recognized keywords comes from the output of the This is a character string that contains certain keywords whichĪre substituted for computed values in the table output. Used to accomplish this, but a simpler alternative is to use abbreviatedĬode. We already discussed custom render functions that could be We also want to display the geometric mean and geometric coefficient of Suppose that for continuous variables, we want to display the percentĬoefficient of variation (CV%) instead of the standard deviation (SD). Using abbreviated code to specify a custom renderer Let’s continue with an example of that nature, using This purpose having percentages add up to 100% within columns makes the With respect to the distribution of baseline characteristics, and for Or treatment groups, not outcomes, and we want to compare those groups Usually, the columns would represent exposure Really the standard application for these kinds of tables (at least not Respect to variables like sex, while in the original version it isĮasier to compare sexes with respect to outcomes. Version, it is easier to compare the different types of outcomes with Should add to 100% within a column, and in the original blog post theyĪdd to 100% along a row (except for the Total column, which adds to 100% Variables I include the number of individuals in each column under theĬolumn heading the percentages are different, because I think they Original blog post got it wrong) I added units to the continuous This is now looking pretty similar to the original blog post, butĪdmittedly there are still some differences: the sexes are inverted (the Involves using the slightly more complicated “default”įirst, we set up our labels differently, using a list: Result, we need to customize the output further, and in this case that With two significant digits rather than three. Like the table1 default output most values are displayed Grouped together under a common heading the continuous variables AgeĪnd Thickness show only Means (SD) (with a ±), and not Median Post: the two “Death” strata (Melanoma and Non-melanoma) should be This looks better, but still not quite the same as the original blog Overall column to be labeled “Total” and be positioned on the left, and We want, and specify units for the continuous variables ( sex and ulcer), label each variable the way To improve things, we can createįactors with descriptive labels for the categorical variables ‘+’ symbols, the “stratification” variable (which creates the columns)Īppears to the right of a “conditioning” symbol ‘|’, and theĭata argument specifies a ame thatīut because we don’t have nice labels for the variables andĬategories, it doesn’t look great. Interface, where the variables to include in the table are separated by Note that the table1 package uses a familiar formula
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |