Às 14:23 de 07/09/2023, Thomas Subia via R-help escreveu:

Colleagues

  Consider
smokers  <- c( 83, 90, 129, 70 )
patients <- c( 86, 93, 136, 82 )

  prop.trend.test(smokers, patients)

  Output:

      Chi-squared Test for Trend inProportions

  data:  smokers out of patients ,

using scores: 1 2 3 4

X-squared = 8.2249, df = 1, p-value = 0.004132

  # trend test for proportions indicates proportions aretrending.

  How does one identify the direction of trending?
  # prop.test indicates that the proportions are unequal but doeslittle to 
indicate trend direction.
All the best,
Thomas Subia


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Hello,

By visual inspection it seems that there is a decreasing trend.
Note that the sample estimates of prop.test and smokers/patients are equal.


smokers  <- c( 83, 90, 129, 70 )
patients <- c( 86, 93, 136, 82 )

prop.test(smokers, patients)$estimate
#>    prop 1    prop 2    prop 3    prop 4
#> 0.9651163 0.9677419 0.9485294 0.8536585
smokers/patients
#> [1] 0.9651163 0.9677419 0.9485294 0.8536585

plot(smokers/patients, type = "b")



Hope this helps,

Rui Barradas

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to