Hi everyone, I am kind of new to the forum. I have a question relates to resampling and Fisher's exact test. I hope someone will be able to help me with this. I have a sample of 1197 observations, among that, 807 observations have "Treatment==1", and 390 observations have "Treatment==0". I want to resample (the new sample size is till 1,197 observations) with replacement the observation that have "Treatment ==1". My code is following:
generate fw = .
bsample 807 if Treatment==1, weight(fw)
This is what I get:
Array
Do they way I did correct? My new sample still have 1,197 observations with 807 observations is resample with replacement if "Treatment==1" ?
Then I want to do the Fisher's exact test for the new sample which "Treatment ==1" and "Treatment ==0". Does anyone know how to do it?
Related Posts with Bootstrap and Fisher's exact test
Conversion of string to number changes numberHi, I am having trouble when Stata converts a variable from numeric to a string, as it appears to b…
Inference with mixed and melogit with few units at highest levelDear Statalisters, I am seeking guidance on how to approach inference with multilevel mixed-effects…
survey data - 90% CIs for a proportion - tabulate or proportion?HI all, I'm analyzing survey data. I have a series of proportions and would like to produce standard…
Sorting string variables- a couple of questionsDear Statalist, I've just ran a small pilot study, which is a 2*2 factorial survey conducted via the…
Cointegration between predictor vaiablesI am estimating a logit model. Several of the predictors are time series. Rather than differencing t…
Subscribe to:
Post Comments (Atom)
0 Response to Bootstrap and Fisher's exact test
Post a Comment