Noncentrality parameter of chi-squared test statistic

An important element of inference related to global tests in SMART is the noncentrality parameter λ of chi-squared test statistics. The function getncp helps obtain this value. In calling this function, the user needs to input the degrees of freedom, given the design structure of SMART, type I and II errors. Since no formula can calculate the value of λ directly, this function starts searching for the value by calculating the left-hand side of Eq. (7), based on a prespecified value, and then approaches the targeted value until a stopping criterion is reached. In this case, the stopping criterion is the maximal absolute difference between the left- and right-hand sides in Eq. (9). In practice, the user can set the initial value of λ by the numeric argument start and define the maximum absolute difference by d. Example 3 of the R code and the results shows the result of calling the function getncp in the CODIACS trial. Given the design structure, we calculate the degrees of freedom and input it by df = 5. We set the targeted type I and II errors as alpha=0.05 and beta=0.20, respectively. We then give an initial value of λ with start=5 and the maximal acceptable difference d=0.0001. Therefore, the computer starts the search process at λ = 5 and finally returns the value of the noncentrality parameter as 12.8249. Note that, when the getncp function is used, the start value of λdoes not affect the results of the search, although a start value closer to the result leads to a shorter search process. On the other hand, the value of d affects the accuracy of the search. Generally, a smaller maximal acceptable difference leads to better accuracy.

List 3. R code and results: Example 3

>  getncp(df = 5,alpha=0.05,beta=0.20, d = 0.0001,start=5)

[1] 12.8249

Note: The content above has been extracted from a research article, so it may not display correctly.



Q&A
Please log in to submit your questions online.
Your question will be posted on the Bio-101 website. We will send your questions to the authors of this protocol and Bio-protocol community members who are experienced with this method. you will be informed using the email address associated with your Bio-protocol account.



We use cookies on this site to enhance your user experience. By using our website, you are agreeing to allow the storage of cookies on your computer.