We’re rewarding the question askers & reputations are being recalculated! Read more.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
92 views

Estimating the total number of sample subsets of size 10 from a population of size 1000

If we have $n > 1000$ units to sample from, how can we estimate the number of subsets of a certain size, since the number is too much for R to handle? What I ...
1
vote
0answers
68 views

Identifying potential for missingness in a seasonal time series to bias period-averages

I have high-frequency time series (observations every few minutes) for which I wish to compute daily averages. The data exhibit a strong diel cycle. Sometimes observations are missing in the time ...
3
votes
3answers
2k views

In R, how to sample from the output of combn(a,b) if the “a choose b” is too large?

I would like to sample 1 million vectors from the set of vectors $$\mathbf{v} = \{v_1,v_2,...,v_n \} $$ subject to $\sum_{i=1}^n v_i = 1$ $\forall i: v_i \ge 0$ each $v_i$ has at most 2 decimal ...
4
votes
2answers
833 views

Incidence density sampling in R

I was wondering if there is an R package to perform incidence density sampling for a case-control design. That is, for matching in a case-control design; accounting for multiple matching covariates.
4
votes
1answer
488 views

Correct variance estimation for random sample post-stratification weights

I'm dealing with a random sample and I have a question about its poststratification weights. Let's assume that: this is a random sample of addresses, but post-stratification weights have been ...
2
votes
1answer
14k views
2
votes
1answer
3k views

The sample size applied to a non-normal distribution

I have a single variable that represents my population values (sample of data): ...
0
votes
1answer
1k views

R: Density estimation vs Histogram Estimation

To draw random samples from a custom distribution, I recall reading that KDE's are better than histograms. (See hadley's comment here.) When I experimented in R, I am finding that the KDE method ...
3
votes
3answers
2k views

Downsampling excessively sampled curves

I'm looking for a quick (event if not so accurate) way to deal with over-sampled curves using R. Consider the following example in which x contains 1000 values in ...
1
vote
2answers
94 views

Statistical test to find variable causing failure

I have a database with tests that are either a pass or fail and around 25 description fields. Each description field is either a boolean or has between 3 and 10 options. I'd like to hook into my ...
1
vote
1answer
185 views

Sampling method for constructing multiple groups from a given pool

There is a set A having $N$ elements. Based on set A, I would like to construct $M$ groups, where each group has $P$ elements. Naturally, $M P <N$. All of those elements in the $M$ groups are ...
5
votes
1answer
3k views

What are the rules / guidelines for downsampling?

I have a data set with ~ 7 million rows, of which ~ 100k are positives. I'm looking to shrink the data by keeping all the ...
7
votes
2answers
8k views

How do I sample without replacement using a sampling-with-replacement function?

I vaguely recall from grad school that the following is a valid approach to do a weighted sampling without replacement: Start with an initially empty "sampled set". Draw a (single) weighted sample ...
4
votes
2answers
2k views

A robust R package to do MCMC and Gibbs sampling

I need to make linear model for which I need to do Gibbs sampling in MCMC simulations. The model needed to be fitted is a linear mixed model. Please suggest me for a robust R package for this task.
6
votes
3answers
2k views

Multistage sampling in R

I've got a dataset similar to this: ...
3
votes
1answer
279 views

Sample selection and variation in the variable of interest when using panel data

I wonder how to reason when selecting samples. I am doing a panel data regression analysis about how the euro membership correlates with the budget deficit in the member countriues. Using R that is: ...
1
vote
2answers
886 views

Should I use an average ECDF?

This relates to a previous question of mine which didn't gain many responses, perhaps because it wasn't very clear nd well written. I hope this time I will be more accurate and get your much ...