Implement a test to compare the percentage of hens whose pancreatic secretions increased (post - pre) among the five treatment regimens and report a p-value. Here's my approach: From Data Set HORMONE.DAT: `Pansecpr` - Pancreatic secretion rate (pre) `Pansecpt` - Pancreatic secretion rate (post) `Hormone` - 1=Saline, 2=aPP, 3=CCK, 4=secretin, 5=VIP #I created a new variable to calculate the pancreatic secretion difference (post-pre) in R hormone.df$DPansec <- hormone.df$Pansecpt - hormone.df$Pansecpr #I created an indicator variable.  A "success" is defined as the hen having an increase in pancreatic secretion.  A "failure" is defined as the hen not having an increase in pancreatic secretion. hormone.df$Indicator <- ifelse(hormone.df$DPansec > 0, "Increase", "NoIncrease") #I created a contingency table HormoneObsTable <- table(hormone.df$Indicator,hormone.df$Hormone)                           1      2        3        4       5 Increase            5       3      28       7      34 NoIncrease      25     32    137      31     96 #Convert table to percentage rowPerc(HormoneObsTable)                                1      2       3         4        5       Total   Increase        6.49   3.90  36.36   9.09  44.16 100.00   NoIncrease   7.79   9.97  42.68   9.66  29.91 100.00 Question: Am I correct to assume that I can run a Pearson's chi-squared test on the above data and get the following results?  Pearson's Chi-squared test data: HormoneObsTable X-squared = 7.2213, df = 4, p-value = 0.1246

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question

Implement a test to compare the percentage of hens whose pancreatic secretions increased (post - pre) among the five treatment regimens and report a p-value. Here's my approach:

From Data Set HORMONE.DAT:

`Pansecpr` - Pancreatic secretion rate (pre)

`Pansecpt` - Pancreatic secretion rate (post)

`Hormone` - 1=Saline, 2=aPP, 3=CCK, 4=secretin, 5=VIP

#I created a new variable to calculate the pancreatic secretion difference (post-pre) in R

hormone.df$DPansec <- hormone.df$Pansecpt - hormone.df$Pansecpr

#I created an indicator variable.  A "success" is defined as the hen having an increase in pancreatic secretion.  A "failure" is defined as the hen not having an increase in pancreatic secretion.

hormone.df$Indicator <- ifelse(hormone.df$DPansec > 0, "Increase", "NoIncrease")

#I created a contingency table
HormoneObsTable <- table(hormone.df$Indicator,hormone.df$Hormone)

                          1      2        3        4       5

Increase            5       3      28       7      34

NoIncrease      25     32    137      31     96

#Convert table to percentage

rowPerc(HormoneObsTable)  
                             1      2       3         4        5       Total
  Increase        6.49   3.90  36.36   9.09  44.16 100.00

  NoIncrease   7.79   9.97  42.68   9.66  29.91 100.00

Question: Am I correct to assume that I can run a Pearson's chi-squared test on the above data and get the following results?

 Pearson's Chi-squared test data: HormoneObsTable

X-squared = 7.2213, df = 4, p-value = 0.1246

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman