Look at the function's help page:

No help there. The "parameter" argument is not defined in any substantive manner, and no examples other than `parameter=mean` appear in the help page.

(Now) Look at the code. The parameter argument is expected to be a function. There is no function named `proportion` in base R that I know of and:

> wBoot::proportion
Error: 'proportion' is not an exported object from 'namespace:wBoot'
> wBoot:::proportion
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
  object 'proportion' not found


The code in the function you are asking about does begin with:

   {

     proportion <- mean

However, that named entity, `proportion`,  is never referenced in  code that follows, so it appears that the package author started down one path and then abandoned that line of code and did something else. I suspect that the code was written so that `mean` was inteended to deliver a test of equal proportions using the normal approximation to a binomial test. There is a waring in the help page that would apply to situations where the proportion is far from 0.5.  You are advised that not all packages are written with scrupulous quality control and peer review.

You should have read the posting guide. It would have told you that you should have addressed your concerns to the package author first, and also posted in plain text.

--

David

On 11/25/18 12:59 PM, Janh Anni wrote:
Hello R Experts!

I wonder if anyone is familiar with the wBoot package written by Neil
Weiss. I was trying to use the *boot.two.per* function in that package to
compute a bootstrapped two-sample hypothesis test for proportion.  Here"s
the *boot.two.per* script:

boot.two.per(x, y, parameter, stacked = TRUE, variable = NULL,

null.hyp = NULL, alternative = c("two.sided", "less", "greater"),

conf.level = 0.95, type = NULL, R = 9999)

The problem is that if I specify *mean* or *median *as the parameter for
the test, the script runs fine, but if I specify *proportion*, I get an
error message that *proportion* not found

Is there another way to specify proportion as the test parameter?

Thanks a lot!

Janh

        [[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.

______________________________________________
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