s-news
[Top] [All Lists]

bootstrapping question

To: S-news <s-news@lists.biostat.wustl.edu>
Subject: bootstrapping question
From: "Walter R. Paczkowski" <dataanalytics@earthlink.net>
Date: Wed, 27 Oct 2004 10:30:19 -0500
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (nscd2)
Hi,

I have a question on how to set up a bootstrapping problem in S-Plus (v. 6.2.1 on Windows). The basic problem involves survey data. Each survey respondent was asked to rate 20 messages about a product on, let's say, a 0/1 scale where 1 is agree. There are 30 products. My client found the proportion of respondents who agreed (a "1") with the message for a product and then averaged over the 20 messages to create a single score for all the messages for that product. He repeated this for all 30 products. He did this in 2002 and 2003. He asked me to calculate the standard errors and do a test to see if the score in 2003 differs from the score in 2002 for each product. The answers will determine compensation for management.

I want to do a bootstrap to calculate the standard errors and the mean scores and then use these to test the difference. I set up a simple bootstrap is S using

       bootstrap(data.test, mean(apply(data.test, 2, mean)))

where data.test is a data frame of three randomly generated messages coded as 0/1 numbers (the columns) with 20 "respondents". This represents just a single product. The mean was used since the mean of the 0/1 data is just the sample proportion. The actual data, when I get it, will have 20 messages and several thousand respondents for each of the 30 products.

This call to bootstrap gave me what I think I need, but since I've used this function so infrequently and am not that familiar with bootstrap, I need clarification on what it's doing. I believe it's resampling data.test, then passing the resampled data frame to the function mean(apply...)). Is this correct? Based on the description above of what the client did, is this function giving me what I want? Can I do a simple hypothesis test using the results? Can I assume normality for that test? Is there anything else I need to consider?

Thanks for any help or advice,

Walt Paczkowski



<Prev in Thread] Current Thread [Next in Thread>