wtd.ttestC: Weighted T-Test

Description Usage Arguments Value Examples

View source: R/wtd.ttestC.R

Description

This function conducts a weighted t-test

Usage

1
wtd.ttestC(f1, f2, data, digits = 3)

Arguments

f1

Function identifying interval-level dependent variable in the form ~ depvar

f2

A function that defines groups to be compared in the form ~ indepvar

data

A design dataset such as gssD, nesD, statesD, or worldD

digits

Number of digits to report after decimal place, optional (default = 3).

Value

No return

Examples

1
2
3
4
5
   library(poliscidata)
   
   wtd.ttestC(f1 = ~ ftgr_gay, f2 = ~ gender, data = nesD)
   
   wtd.ttestC(~ ft_rep, ~ gender, nesD)

Example output

     Means and Standard Errors:
       gender ftgr_gay        se
Male     Male 47.36710 0.7033388
Female Female 55.66918 0.7379861

     t-Test Statistics:
Mean difference         Std.Err     t-statistic         P-value 
  -8.302086e+00    1.019465e+00   -8.143571e+00    1.926719e-16 

   Lower 95% CI    Upper 95% CI 
     -10.300200       -6.303971 
     Means and Standard Errors:
       gender   ft_rep        se
Male     Male 44.57382 0.6776347
Female Female 44.32298 0.7060677

     t-Test Statistics:
Mean difference         Std.Err     t-statistic         P-value 
      0.2508335       0.9786319       0.2563104       0.6011443 

   Lower 95% CI    Upper 95% CI 
      -1.667250        2.168917 

poliscidata documentation built on July 8, 2020, 6:23 p.m.