Id stringlengths 1 6 | PostTypeId stringclasses 7
values | AcceptedAnswerId stringlengths 1 6 ⌀ | ParentId stringlengths 1 6 ⌀ | Score stringlengths 1 4 | ViewCount stringlengths 1 7 ⌀ | Body stringlengths 0 38.7k | Title stringlengths 15 150 ⌀ | ContentLicense stringclasses 3
values | FavoriteCount stringclasses 3
values | CreationDate stringlengths 23 23 | LastActivityDate stringlengths 23 23 | LastEditDate stringlengths 23 23 ⌀ | LastEditorUserId stringlengths 1 6 ⌀ | OwnerUserId stringlengths 1 6 ⌀ | Tags list |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3924 | 1 | null | null | 1 | 229 | Sorry if this is a very basic question, my statistics knowledge is very low!
I've got a dataset which is basically a set of greyscale values in a greyscale texture (ie. 0-255). What I want to do is take the mean value, and find out what the values would be at a specified standard-deviation to the left and right of the ... | Value based on a supplied standard-deviation | CC BY-SA 3.0 | null | 2010-10-23T16:31:41.513 | 2017-11-12T17:24:01.703 | 2017-11-12T17:24:01.703 | 11887 | 1683 | [
"standard-deviation"
] |
3925 | 2 | null | 3921 | 14 | null | I think chl's answer is great.
One thing I might add, is for the case you'd want to compare the correlation between the items. For that you can use something like a [Correlation scatter-plot matrix for ordered-categorical data](http://www.r-statistics.com/2010/04/correlation-scatter-plot-matrix-for-ordered-categorical... | null | CC BY-SA 2.5 | null | 2010-10-23T18:34:23.693 | 2010-10-23T18:34:23.693 | null | null | 253 | null |
3926 | 1 | null | null | 2 | 169 | I'm looking at two plant categories (all species fall into one type or the other) at several different types of locations. Within each type of location, I have several samples, so I have an average of each type of plant as it is found in each type of location.
Within each type of location, I want to compare the average... | How to look at two different (but related) averages within a population | CC BY-SA 2.5 | null | 2010-10-23T19:21:33.553 | 2010-12-23T06:44:25.977 | null | null | null | [
"categorical-data",
"mean"
] |
3927 | 2 | null | 3926 | 0 | null | Assuming that you are looking at proportions you need to do a [One-proportion z-test](http://en.wikipedia.org/wiki/Statistical_hypothesis_testing#Common_test_statistics). The link takes you to the wiki which has common test statisitics used in various situations including the one-proportion z-test.
If I have understood... | null | CC BY-SA 2.5 | null | 2010-10-23T20:50:56.860 | 2010-10-23T20:50:56.860 | null | null | null | null |
3928 | 1 | 3951 | null | 7 | 424 | I have developmental data collected across several grades (1-6), where each child in each grade is measured many times. I would like to be able to assess whether there are any linear or non-linear trends in the response variable across grade. Does it make sense to run a first lmer treating grade as continuous, obtain t... | Assessing linearity in a mixed effects model | CC BY-SA 2.5 | null | 2010-10-23T21:24:24.377 | 2010-10-24T17:16:01.820 | null | null | 364 | [
"mixed-model",
"binomial-distribution"
] |
3929 | 2 | null | 3926 | 0 | null | For a particular plot we estimate "% cover" per plant species (summed across all species within a type to give the % cover for the plant type); in a forest canopy (as one example of the locations we used) this means that the total will definitely be greater than 100%, so a statistic using proportions wont work...
When ... | null | CC BY-SA 2.5 | null | 2010-10-23T21:55:19.983 | 2010-10-23T21:55:19.983 | null | null | null | null |
3930 | 1 | null | null | 32 | 35850 | Most standard distributions in R have a family of commands - pdf/pmf, cdf/cmf, quantile, random deviates (for example- dnorm, pnorm, qnorm, rnorm).
I know it's easy enough to make use of some standard commands to reproduce these functions for the discrete uniform distributions, but is there already a preferred built-in... | Are there default functions for discrete uniform distributions in R? | CC BY-SA 2.5 | null | 2010-10-23T22:02:20.557 | 2021-10-25T07:37:19.767 | null | null | null | [
"r",
"distributions",
"uniform-distribution"
] |
3931 | 1 | 3934 | null | 229 | 247343 | I was asked today in class why you divide the sum of square error by $n-1$ instead of with $n$, when calculating the standard deviation.
I said I am not going to answer it in class (since I didn't wanna go into unbiased estimators), but later I wondered - is there an intuitive explanation for this?!
| Intuitive explanation for dividing by $n-1$ when calculating standard deviation? | CC BY-SA 3.0 | null | 2010-10-23T22:04:57.160 | 2023-04-27T08:59:40.013 | 2021-01-11T14:06:29.100 | 919 | 253 | [
"standard-error",
"intuition",
"teaching",
"bessels-correction",
"faq"
] |
3932 | 2 | null | 3931 | 66 | null | A common one is that the definition of variance (of a distribution) is the second moment recentered around a known, definite mean, whereas the estimator uses an estimated mean. This loss of a degree of freedom (given the mean, you can reconstitute the dataset with knowledge of just $n-1$ of the data values) requires t... | null | CC BY-SA 2.5 | null | 2010-10-23T22:21:58.407 | 2010-10-23T22:21:58.407 | null | null | 919 | null |
3934 | 2 | null | 3931 | 146 | null | The standard deviation calculated with a divisor of $n-1$ is a standard deviation calculated from the sample as an estimate of the standard deviation of the population from which the sample was drawn. Because the observed values fall, on average, closer to the sample mean than to the population mean, the standard devia... | null | CC BY-SA 3.0 | null | 2010-10-24T03:46:26.027 | 2020-10-07T12:25:39.747 | 2020-10-07T12:25:39.747 | 919 | 1679 | null |
3935 | 2 | null | 3911 | 7 | null | You are correct in saying that the 95% confidence intervals are things that result from using a method that works in 95% of cases, rather than any individual interval having a 95% likelihood of containing the expected value.
"The logical basis and interpretation of confidence limits are, even now, a matter of controver... | null | CC BY-SA 3.0 | null | 2010-10-24T04:23:55.957 | 2011-06-07T05:09:43.653 | 2011-06-07T05:09:43.653 | 1679 | 1679 | null |
3936 | 2 | null | 3924 | 2 | null | I suspect that you want to re-scale the values so that they have a specified standard deviation. If so, then it is easy.
Let's assume that you have a mean of x and a standard deviation of y, and the desired standard deviation is z. Subtract x from every observation, then divide them by y so that you have a mean of zer... | null | CC BY-SA 2.5 | null | 2010-10-24T04:47:40.530 | 2010-10-24T04:47:40.530 | null | null | 1679 | null |
3938 | 2 | null | 3926 | 1 | null | A location (Between) x Plant Type (Within) mixed ANOVA may do what you want. The disadvantage of this approach is that there is no clear post-hoc to perform at each location, so you'll have to do a bonferroni correction or take some other approach (e.g. [question 1](https://stats.stackexchange.com/questions/575/post-h... | null | CC BY-SA 2.5 | null | 2010-10-24T06:20:31.360 | 2010-10-24T06:20:31.360 | 2017-04-13T12:44:39.283 | -1 | 196 | null |
3939 | 2 | null | 3930 | 15 | null | The [CRAN Task View: Probability Distributions](http://finzi.psych.upenn.edu/views/Distributions.html) page says:
>
The discrete uniform distribution can be easily obtained with the basic functions.
I guess something on the lines of this should do:
```
a <- round(runif(1000, min=0, max=100))
```
EDIT
As csgillesp... | null | CC BY-SA 2.5 | null | 2010-10-24T07:12:40.887 | 2010-10-25T08:34:59.653 | 2010-10-25T08:34:59.653 | 582 | 582 | null |
3940 | 2 | null | 3930 | 36 | null | As nico wrote, they're not implemented in R. Assuming we work in 1..k, those functions should look like:
For random generation:
```
rdu<-function(n,k) sample(1:k,n,replace=T)
```
PDF:
```
ddu<-function(x,k) ifelse(x>=1 & x<=k & round(x)==x,1/k,0)
```
CDF:
```
pdu<-function(x,k) ifelse(x<1,0,ifelse(x<=k,floor(x)/k,1)... | null | CC BY-SA 2.5 | null | 2010-10-24T07:36:16.800 | 2010-10-24T07:36:16.800 | null | null | null | null |
3941 | 2 | null | 3931 | 20 | null | This is a total intuition, but the simplest answer is that is a correction made to make standard deviation of one-element sample undefined rather than 0.
| null | CC BY-SA 2.5 | null | 2010-10-24T10:28:15.323 | 2010-10-24T10:28:15.323 | null | null | null | null |
3942 | 2 | null | 3931 | 16 | null | You can gain a deeper understanding of the $n-1$ term through geometry alone, not just why it's not $n$ but why it takes exactly this form, but you may first need to build up your intuition cope with $n$-dimensional geometry. From there, however, it's a small step to a deeper understanding of degrees of freedom in line... | null | CC BY-SA 3.0 | null | 2010-10-24T11:01:31.550 | 2017-08-25T17:17:04.040 | 2017-08-25T17:17:04.040 | 168153 | 449 | null |
3943 | 1 | 3946 | null | 94 | 93163 | In which cases should one prefer the one over the other?
I found someone who claims an advantage for Kendall, [for pedagogical reasons](http://web.archive.org/web/20090207060710/http://www.rsscse.org.uk/ts/bts/noether/text.html), are there other reasons?
| Kendall Tau or Spearman's rho? | CC BY-SA 4.0 | null | 2010-10-24T13:15:49.687 | 2018-11-04T01:16:49.227 | 2018-11-04T01:16:49.227 | 75266 | 253 | [
"correlation",
"nonparametric",
"spearman-rho",
"kendall-tau"
] |
3944 | 1 | 3948 | null | 21 | 34088 | Reading about methods and results of statistical analysis, especially in epidemiology, I very often [hear](https://www.acpjournals.org/doi/10.7326/0003-4819-136-2-200201150-00009) about adjustment or controlling of the models.
How would you explain, to a non-statistician, the purpose of that? How do you interpret your ... | Explain model adjustment, in plain English | CC BY-SA 4.0 | null | 2010-10-24T13:58:01.527 | 2022-11-28T05:11:09.387 | 2022-11-28T05:11:09.387 | 362671 | 22 | [
"regression",
"modeling",
"epidemiology"
] |
3945 | 2 | null | 3943 | 37 | null | I refer the honorable gentleman to [my previous answer](https://stats.stackexchange.com/questions/3730/pearsons-or-spearmans-correlation-with-non-normal-data/3744#3744): "...confidence intervals for Spearman’s rS are less reliable and less interpretable than confidence intervals for Kendall’s τ-parameters", according t... | null | CC BY-SA 2.5 | null | 2010-10-24T14:24:27.680 | 2010-10-24T14:24:27.680 | 2017-04-13T12:44:33.550 | -1 | 449 | null |
3946 | 2 | null | 3943 | 48 | null | I found that Spearman correlation is mostly used in place of usual linear correlation when working with integer valued scores on a measurement scale, when it has a moderate number of possible scores or when we don't want to make rely on assumptions about the bivariate relationships. As compared to Pearson coefficient, ... | null | CC BY-SA 2.5 | null | 2010-10-24T14:26:35.747 | 2010-10-31T10:29:50.693 | 2017-04-13T12:44:37.583 | -1 | 930 | null |
3947 | 1 | 3954 | null | 84 | 8590 | I understand the basics of what a Support Vector Machines' aim is in terms of classifying an input set into several different classes, but what I don't understand is some of the nitty-gritty details. For starters, I'm a bit confused by the use of Slack Variables. What is their purpose?
I'm doing a classification proble... | Help me understand Support Vector Machines | CC BY-SA 2.5 | null | 2010-10-24T15:11:52.427 | 2015-07-31T07:16:17.830 | 2010-10-26T19:45:29.510 | null | 1224 | [
"machine-learning",
"classification",
"svm"
] |
3948 | 2 | null | 3944 | 38 | null | Easiest to explain by way of an example:
Imagine study finds that people who watched the World Cup final were more likely to suffer a heart attack during the match or in the subsequent 24 hours than those who didn't watch it. Should the government ban football from TV? But men are more likely to watch football than wom... | null | CC BY-SA 2.5 | null | 2010-10-24T15:20:40.330 | 2010-10-24T15:20:40.330 | null | null | 449 | null |
3949 | 2 | null | 3943 | 24 | null | Again somewhat philosophical answer; the basic difference is that Spearman's Rho is an attempt to extend R^2 (="variance explained") idea over nonlinear interactions, while Kendall's Tau is rather intended to be a test statistic for nonlinear correlation test.
So, Tau should be used for testing nonlinear correlations, ... | null | CC BY-SA 2.5 | null | 2010-10-24T15:57:33.700 | 2010-10-24T15:57:33.700 | null | null | null | null |
3950 | 1 | 3956 | null | 7 | 1134 | I am currently working with feature-vectors that are made up of continuous attributes, so I can use the euclidean distance for things like KNN-classification and clustering. Now I want to add a nominal attribute that has a special distance function defined. What options do I have of combining these distance functions, ... | What options are there to combine different distance functions? | CC BY-SA 2.5 | null | 2010-10-24T16:34:57.410 | 2010-10-24T20:03:13.467 | null | null | 977 | [
"distance-functions"
] |
3951 | 2 | null | 3928 | 5 | null | Not really an answer, but I was interested in trying it out...
I assume that the pattern is not easily recognisable just by plotting? So I tried to make up some data that might behave this way:
```
set.seed(69)
id<- rep(1:20, each=6)
x<-rep(1:6, 20)
y<-jitter(x+id/5, factor=5) + jitter(sin(x), factor=5)
df1<-data.frame... | null | CC BY-SA 2.5 | null | 2010-10-24T17:16:01.820 | 2010-10-24T17:16:01.820 | null | null | 966 | null |
3953 | 2 | null | 3944 | 12 | null | Onestop explained it pretty well, I'll just give a simple R example with made up data. Say x is weight and y is height, and we want to find out if there's a difference between males and females:
```
set.seed(69)
x <- rep(1:10,2)
y <- c(jitter(1:10, factor=4), (jitter(1:10, factor=4)+2))
sex <- rep(c("f", "m"), each=10)... | null | CC BY-SA 2.5 | null | 2010-10-24T17:43:38.477 | 2010-10-24T17:43:38.477 | null | null | 966 | null |
3954 | 2 | null | 3947 | 111 | null | I think you are trying to start from a bad end. What one should know about SVM to use it is just that this algorithm is finding a hyperplane in hyperspace of attributes that separates two classes best, where best means with biggest margin between classes (the knowledge how it is done is your enemy here, because it blur... | null | CC BY-SA 2.5 | null | 2010-10-24T17:44:34.170 | 2010-10-24T17:44:34.170 | null | null | null | null |
3955 | 1 | null | null | 15 | 580 |
### Context:
I have a group of websites where I record the number of visits on a daily basis:
```
W0 = { 30, 34, 28, 30, 16, 13, 8, 4, 0, 5, 2, 2, 1, 2, .. }
W1 = { 1, 3, 21, 12, 10, 20, 15, 43, 22, 25, .. }
W2 = { 0, 0, 4, 2, 2, 5, 3, 30, 50, 30, 30, 25, 40, .. }
...
Wn
```
### General Question:
- How do I ... | Determining whether a website is active using daily visits | CC BY-SA 2.5 | null | 2010-10-24T19:55:39.883 | 2011-02-26T14:46:45.880 | 2017-05-23T12:39:26.167 | -1 | 1694 | [
"time-series",
"forecasting"
] |
3956 | 2 | null | 3950 | 5 | null | I can think of three:
- Combine them in a linear manner ($d=d_1+\alpha d_2$) and find best $\alpha$ by some optimization, let's say minimizing CV error for kNN or minimizing silhouette for clustering.
- Train separate classifiers / cluster the data few times based on both distances and then blend the results. This ma... | null | CC BY-SA 2.5 | null | 2010-10-24T20:03:13.467 | 2010-10-24T20:03:13.467 | null | null | null | null |
3958 | 1 | null | null | 2 | 915 | >
Possible Duplicate:
What are some valuable Statistical Analysis open source projects?
I understand the basics of statistical analysis, but I am not good at math. What is the best website or software package (preferably FOSS) that can analysize the data, find correlations, levels of confidence, etc. automagically... | What is your favorite, easy to use statistical analysis website or software package? | CC BY-SA 2.5 | null | 2010-10-24T20:23:32.503 | 2010-10-24T23:15:48.183 | 2017-04-13T12:44:46.680 | -1 | 1689 | [
"software"
] |
3959 | 2 | null | 3958 | 5 | null | Your objectives seem rather vague, but I think the open-source [R statistical package](http://www.R-project.org/) should fit your needs, and beyond. Although primarily a command line driven software, you will find several useful GUIs, e.g. [Rcommander](http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/) or [deducer](http://ww... | null | CC BY-SA 2.5 | null | 2010-10-24T20:48:31.153 | 2010-10-24T20:48:31.153 | 2017-04-13T12:44:52.277 | -1 | 930 | null |
3960 | 2 | null | 3958 | 1 | null | [RapidMiner](http://rapidminer.com/) is a nice GUI based, workflow data mining tool. It's open source and runs on mac, linux, windows.
I think R and RapidMiner will end up as the predominant tools, with R being for people that like command-line style linux-like work, and RapidMiner for Windows and Mac types that prefe... | null | CC BY-SA 2.5 | null | 2010-10-24T21:15:53.470 | 2010-10-24T21:15:53.470 | null | null | 74 | null |
3961 | 1 | 3971 | null | 6 | 1051 | Suppose you have an $n$-vector $X$. For a fixed real number, $r$ between $-1$ and $1$, can one generate a random permutation of the integers $1,2,\ldots,n$, call it $i_1,i_2,\ldots,i_n$ such that the vector $X$ and the vector $\tilde{X}$ defined by $\tilde{X_j} = X_{i_j}$ have expected sample correlation of $r$? I am ... | Random permutation of a vector with a fixed expected sample correlation to the original? | CC BY-SA 3.0 | null | 2010-10-24T23:27:39.733 | 2017-02-15T22:50:52.443 | 2017-02-15T22:50:52.443 | 28666 | 795 | [
"correlation",
"monte-carlo",
"combinatorics"
] |
3963 | 1 | 3969 | null | 4 | 158 | Below is part of the proof of large deviations result. K is cumulant generating function. Can anyone explain how the last step follows?
[](https://i.stack.imgur.com/iHYax.png)
This is page 157 of McCullagh's "Tensor Methods in Statistics"
| Large deviations proof question | CC BY-SA 4.0 | null | 2010-10-25T03:31:56.330 | 2019-01-13T11:43:46.177 | 2019-01-13T11:43:46.177 | 79696 | 511 | [
"probability",
"mathematical-statistics"
] |
3965 | 1 | 4001 | null | 3 | 2429 | i am working with a set of distributions. I have so far analyzed several probability distributions with respect to each other, that means i have made a t-test, to see how probable it is that two events happen at the same time according to those distributions.
That means i have computed:
```
let x1 and x2 be probability... | Overlapping probability distributions | CC BY-SA 2.5 | null | 2010-10-25T08:52:48.763 | 2015-03-26T22:53:30.063 | 2010-10-26T11:16:36.720 | 1516 | 1516 | [
"distributions",
"probability"
] |
3966 | 2 | null | 3931 | 8 | null | Sample variance can be thought of to be the exact mean of the pairwise "energy" $(x_i-x_j)^2/2$ between all sample points. The definition of sample variance then becomes
$$ s^2 = \frac{2}{n(n-1)}\sum_{i< j}\frac{(x_i-x_j)^2}{2} = \frac{1}{n-1}\sum_{i=1}^n(x_i-\bar{x})^2 .$$
This also agrees with defining variance of a ... | null | CC BY-SA 2.5 | null | 2010-10-25T09:51:10.803 | 2010-10-25T09:51:10.803 | null | null | null | null |
3967 | 1 | null | null | 17 | 1785 | I'm a pharmacologist and, in my experience, almost all papers in basic biomedical research use Student's t-test (either to support inference or to conform to expectations...). A couple of years ago it came to my attention that Student's t-test is not the most efficient test that might be used: sequential tests offer mu... | Sequential hypothesis testing in basic science | CC BY-SA 2.5 | null | 2010-10-25T10:14:17.670 | 2022-11-23T09:52:15.920 | 2010-10-26T00:58:33.383 | 1679 | 1679 | [
"hypothesis-testing",
"teaching",
"statistical-significance"
] |
3969 | 2 | null | 3963 | 10 | null | Think back to the proof of Chebychev's inequality, and you'll be home free. The RHS of the next-to-the-last equality is $P[\exp (\xi (X - x)) \geq 1]$. Now think of when $X$ has a PDF $f$ (but this is not required); the probability is
$$
\int_{\exp (\xi (u - x))\geq 1} 1 \cdot f(u) \mathrm{d}u
$$
Now, over the regio... | null | CC BY-SA 2.5 | null | 2010-10-25T14:33:53.893 | 2010-10-25T14:33:53.893 | null | null | null | null |
3970 | 2 | null | 3893 | 1 | null | I guess this is an intuitive way to think about the relation between CV and causal inference: (please correct if I am wrong)
I always think about CV as a way to evaluate the performance of a model in predictions. However, in causal inference we are more concerned with something equivalent to Occam's Razor (parsimony), ... | null | CC BY-SA 2.5 | null | 2010-10-25T14:39:37.197 | 2010-10-25T14:39:37.197 | null | null | 1307 | null |
3971 | 2 | null | 3961 | 7 | null | The answers are no, not for all $r$ in general; yes, for a restricted range of $r$ that is readily computed; but there remain a wide set of choices to be made.
I will use a standard notation where the action of a permutation $\sigma$ is written $ X^\sigma_i = X_{\sigma (i)}$ and the set of all permutations of the $n$ c... | null | CC BY-SA 2.5 | null | 2010-10-25T14:46:32.913 | 2010-10-25T14:52:57.817 | 2010-10-25T14:52:57.817 | 919 | 919 | null |
3972 | 2 | null | 3857 | 2 | null | I just came across this webpage hosted by ICPSR on [data management plans](http://www.icpsr.umich.edu/icpsrweb/ICPSR/dmp/index.jsp). Although I think the goals of ICPSR will be somewhat different than your business (e.g. they are heavily interested in making the data readily able to be disseminated without violating co... | null | CC BY-SA 2.5 | null | 2010-10-25T14:59:22.130 | 2010-10-25T14:59:22.130 | null | null | 1036 | null |
3973 | 2 | null | 3857 | 2 | null | In the case of a much smaller scales, I experienced using dropbox fora sharing/syncing a copy of the data files (and scripts and results) with other researchers/collaborators (I wrote about it [here](http://www.r-statistics.com/2010/05/syncing-files-across-computers-using-dropbox/)).
The other tool I have used is googl... | null | CC BY-SA 2.5 | null | 2010-10-25T15:54:27.227 | 2010-10-25T15:54:27.227 | null | null | 253 | null |
3974 | 1 | null | null | 6 | 587 | I have (trivariate: multivariate with three variables) data that appears to be good empirical and reasonable theoretical fit for a (univariate) convolution of an exponential and a normal distribution (some times called exp-norm or exGauss distributions).
My data are samples from the joint distribution: J(R,G,B)
It a... | From Marginal Exp-Norm Distributions to What Conditionals and Joint? | CC BY-SA 2.5 | null | 2010-10-25T16:39:19.197 | 2013-06-28T22:51:39.283 | 2013-06-28T22:51:39.283 | 22468 | 1704 | [
"distributions",
"multivariable",
"joint-distribution"
] |
3975 | 2 | null | 3921 | 32 | null | I like the centered count view. This particular version removes the neutral answers (effectively treating neutral and n/a as the same) to show only the amount of agree/disagree opinions. The 0 point is where red and blue meet. The count axis is clipped out.

For compariso... | null | CC BY-SA 3.0 | null | 2010-10-25T17:40:25.237 | 2013-08-11T20:36:17.530 | 2013-08-11T20:36:17.530 | 1191 | 1191 | null |
3976 | 2 | null | 3974 | 4 | null | Would [copulas](http://en.wikipedia.org/wiki/Copula_%28statistics%29) be any use here? I don't know enough about them, or your problem, to be sure.
| null | CC BY-SA 2.5 | null | 2010-10-25T17:50:35.663 | 2010-10-25T17:50:35.663 | null | null | 449 | null |
3977 | 1 | 3978 | null | 0 | 198 | M or MM? I prefer "M" -- it's shorter, but someone here was pushing for "MM".
| How do you abbreviate "Millions"? | CC BY-SA 2.5 | null | 2010-10-25T20:17:25.713 | 2015-01-11T19:41:03.320 | 2015-01-11T19:41:03.320 | 28666 | 1531 | [
"terminology",
"abbreviation"
] |
3978 | 2 | null | 3977 | 1 | null | I would use M, as it is the SI prefix for million (mega-).
| null | CC BY-SA 2.5 | null | 2010-10-25T21:13:34.243 | 2010-10-25T21:13:34.243 | null | null | 582 | null |
3979 | 2 | null | 3977 | 1 | null | I would use "million", or 10^6, because M stands for molar (concentration in moles per litre) in my discipline.
| null | CC BY-SA 2.5 | null | 2010-10-25T21:39:42.333 | 2010-10-25T21:39:42.333 | null | null | 1679 | null |
3980 | 1 | 4021 | null | 4 | 170 | I have some data corresponding to changes in a binomial variable - i.e, in month 1 there were n1 trials and k1 successes, and in month 2 there were n2 trials and k2 successes. Say I have M of these cases, and in between month 1 and month 2 there were performed a number of different operations (so for case 1 we might h... | What distribution to use to model changes in ratios? | CC BY-SA 2.5 | null | 2010-10-26T00:24:40.997 | 2010-10-27T14:04:15.370 | 2010-10-26T06:21:20.107 | 449 | null | [
"time-series",
"regression",
"binomial-distribution",
"ancova"
] |
3981 | 2 | null | 3749 | 11 | null | I think a few methods that can be used, but not designed specifically for you, are as follows:
Modeling approaches:
- Topic Models (used to find patters in a set of documents and/or information retrieval)
a. Simplest one is LDA
b. Dynamic topic models (IMHO, most suited for your case, without much domain knowledge)
... | null | CC BY-SA 2.5 | null | 2010-10-26T05:40:40.813 | 2010-10-26T06:19:55.590 | 2010-10-26T06:19:55.590 | null | 1307 | null |
3982 | 1 | null | null | 1 | 681 | ```
var w = 810,
h = 400,
mapMargin = 30;
geo = pv.Geo.scale().range(w, h);
var vis = new pv.Panel()
.width(w)
.height(h)
.top(50)
.bottom(30)
.def("i", -1);
var dot = vis.add(pv.Dot)
.data(geoPopList)
.left(function(d) {return geo(d.center).x})
.top(function(d) {return geo(d... | Adding Zoom & Pan for Protovis Dot Chart with GeoScale | CC BY-SA 2.5 | null | 2010-10-26T05:56:12.743 | 2010-10-26T13:52:10.313 | 2010-10-26T13:52:10.313 | 5 | 1706 | [
"data-visualization",
"protovis",
"javascript"
] |
3984 | 1 | null | null | 14 | 34332 | I am running a logistic model. The actual model dataset has more than 100 variables but I am choosing a test data set in which there are around 25 variables. Before that I also made a dataset which had 8-9 variables. I am being told that AIC and SC values can be used to compare the model. I observed that the model had ... | Understanding AIC and Schwarz criterion | CC BY-SA 3.0 | null | 2010-10-26T07:28:19.323 | 2012-03-24T09:05:12.993 | 2012-03-24T09:05:12.993 | 930 | 1763 | [
"model-selection",
"logistic",
"aic"
] |
3986 | 2 | null | 3984 | 15 | null | It is quite difficult to answer your question in a precise manner, but it seems to me you are comparing two criteria (information criteria and p-value) that don't give the same information. For all information criteria (AIC, or Schwarz criterion), the smaller they are the better the fit of your model is (from a statist... | null | CC BY-SA 2.5 | null | 2010-10-26T08:15:47.120 | 2010-10-27T09:44:59.743 | 2010-10-27T09:44:59.743 | 930 | 930 | null |
3987 | 2 | null | 3967 | 5 | null | I don't know much of sequential tests and their application outside of interim analysis (Jennison and Turnbull, 2000) and computerized adaptive testing (van der Linden and Glas, 2010). One exception is in some fMRI studies that are associated to large costs and difficulty to enroll subjects. Basically, in this case seq... | null | CC BY-SA 4.0 | null | 2010-10-26T09:13:52.530 | 2022-11-23T09:52:15.920 | 2022-11-23T09:52:15.920 | 362671 | 930 | null |
3989 | 1 | 3992 | null | 13 | 5373 | Let $Q_n = C_n.\{|X_i-X_j|;i < j\}_{(k)}$ so for a very short sample like $\{1,3,6,2,7,5\}$ it can be calculated from finding the $k$th order static of pairwise differences:
```
7 6 5 3 2 1
1 6 5 4 2 1
2 5 4 3 1
3 4 3 2
5 2 1
6 1
7
```
h=[n/2]+1=4
k=h(h-1)/2=8
Thus $Q_n=C_n. 2$
Obviously for large samp... | How to calculate Rousseeuw’s and Croux’ (1993) Qn scale estimator for large samples? | CC BY-SA 3.0 | null | 2010-10-26T09:34:08.073 | 2019-12-02T14:52:47.783 | 2016-03-16T02:51:58.517 | 805 | 1637 | [
"data-transformation",
"scales",
"robust",
"optimal-scaling"
] |
3992 | 2 | null | 3989 | 15 | null | Update: The crux of the problem is that in order to achieve the $O(n\log(n))$ time complexity, one needs in the order of $O(n)$ storage.
---
No, $O(n\log(n))$ is the lower theoretical bound for the time complexity of (see (1)) selecting the $k^{th}$ element among all $\frac{n(n-1)}{2}$ possible $|x_i - x_j|: 1 \leq... | null | CC BY-SA 4.0 | null | 2010-10-26T10:20:01.583 | 2019-12-02T14:52:47.783 | 2019-12-02T14:52:47.783 | 66885 | 603 | null |
3993 | 2 | null | 3893 | 13 | null | It seems to me that your question more generally addresses different flavour of validation for a predictive model: Cross-validation has somewhat more to do with internal validity, or at least the initial modelling stage, whereas drawing causal links on a wider population is more related to external validity. By that (a... | null | CC BY-SA 2.5 | null | 2010-10-26T10:20:31.147 | 2010-10-27T20:34:55.987 | 2010-10-27T20:34:55.987 | 930 | 930 | null |
3997 | 1 | 4022 | null | 8 | 29971 | I have a dataset with a very simple logfile-like structure, I want to subset the data according to date ranges but can only do on one parameter.
my data looks like this:
```
date_time loc_id node energy kgco2
1 2009-02-27 00:11:08 87 103 0.00000 0.00000
2 2009-02-27 01:05:05 87 103 7.00000 3.... | Subsetting a data-frame in R based on dates | CC BY-SA 2.5 | null | 2010-10-26T15:10:55.440 | 2010-10-27T14:34:10.650 | 2010-10-26T15:22:53.140 | 449 | 1716 | [
"time-series",
"r"
] |
3998 | 2 | null | 3997 | 4 | null | A few points:
- I'm not sure why that's happening. Clearly the POSIXlt slots are wrong. I typically use POSIXct unless I absolutely need to adjust the slots.
- One option is to use the dates directly rather than messing with the slots, and say <= and >= to subset. Something like ae[ae$date >= as.POSIXlt("2009-10-0... | null | CC BY-SA 2.5 | null | 2010-10-26T15:35:24.063 | 2010-10-26T15:35:24.063 | null | null | 5 | null |
3999 | 1 | 4003 | null | 5 | 28590 | I have 5 categories, each category is divided into the subcategories low, medium and high. An object can belong to one or more of these categories with a number between 1 and 100 in each subcategory but the sum for each category can no exceed 100. Is there are a way to summarise this into one single number?
Any hints o... | How to create an index | CC BY-SA 2.5 | null | 2010-10-26T15:39:43.867 | 2013-03-14T06:46:42.387 | null | null | 791 | [
"descriptive-statistics"
] |
4001 | 2 | null | 3965 | 4 | null | I can't make sense of any of the statements in the question, but you're asking for terminology and that request at least I can understand and appreciate, so here's some to get you started.
I will italicize technical terms and key concepts to draw them to your attention.
The upward face of a die after it is thrown or th... | null | CC BY-SA 2.5 | null | 2010-10-26T17:17:14.607 | 2010-10-26T17:17:14.607 | null | null | 919 | null |
4002 | 2 | null | 3907 | 1 | null | Since the individuals were born with the 'genetic change' I would use their birth as the starting time instead of the time at which they entered the registry.
The following is my reasoning: First, ignore the effect of other variables on survival such as gender, income levels, exercise levels etc. For the sake of illus... | null | CC BY-SA 2.5 | null | 2010-10-26T18:18:51.977 | 2010-10-26T18:29:36.550 | 2010-10-26T18:29:36.550 | null | null | null |
4003 | 2 | null | 3999 | 6 | null | Your solution should depend on how you plan to use the information. If, for instance, you intend to use these data as potential explanatory variables in a model, then you are better off without an index, because that is likely to cause a loss of explanatory power. Just use the original variables. If, on the other ha... | null | CC BY-SA 2.5 | null | 2010-10-26T20:57:01.053 | 2010-10-26T20:57:01.053 | 2017-04-13T12:44:41.493 | -1 | 919 | null |
4004 | 1 | null | null | 3 | 1458 | Does anyone know of a step-by-step guide for the practical implementation of Gifi Methods for Optimal Scaling in R: The Package homals? Although I have an OK theoretical understanding (thanks chl for directing me to articles), I'm a tech novice and some of the language/technical information is a bit too complicated for... | How to understand optimal Scaling in R: The Package homals for novices | CC BY-SA 2.5 | null | 2010-10-26T21:40:51.110 | 2021-12-09T17:39:05.927 | 2021-12-09T17:39:05.927 | 11887 | 1647 | [
"r",
"pca",
"spss",
"ordinal-data",
"optimal-scaling"
] |
4005 | 1 | null | null | 2 | 388 | I am trying work out the variance of the population estimate var (R) where R = X/Y (X = sum(x) and Y = sum(y)). For each member of the population I know y and I have stratified the population and taken a random sample of each strata. For each member of the sample I need to estimate x. x is not known with certainty a... | Stratified Random Sampling of Ratio (X/Y) where X itself is an estimate | CC BY-SA 2.5 | null | 2010-10-26T22:58:33.633 | 2010-10-27T01:36:31.307 | null | null | null | [
"standard-error",
"sampling"
] |
4006 | 2 | null | 4004 | 2 | null | Check out homals [vignette](http://cran.r-project.org/web/packages/homals/vignettes/homals.pdf).
| null | CC BY-SA 2.5 | null | 2010-10-26T23:17:16.707 | 2010-10-26T23:17:16.707 | null | null | null | null |
4007 | 2 | null | 4004 | 3 | null | With regards to SPSS, I believe you need the [Categories add-on module](http://www.spss.com/software/statistics/categories/).
- SPSS White Paper has further information including lots of references.
- PPT presentation by Richard Bell
| null | CC BY-SA 2.5 | null | 2010-10-27T00:46:03.703 | 2010-10-27T07:48:02.677 | 2010-10-27T07:48:02.677 | 183 | 183 | null |
4008 | 2 | null | 4005 | 2 | null | I am going to translate what you said into math and answer your question. If my translation into math is not correct please clarify via the comments and I will edit my response as appropriate.
You have:
$R = \frac{\sum_i{X_i}}{\sum_i{Y_i}}$
where,
$i= 1, 2, ..n$ index members of the population,
$Y_i$ is a constant
$X_i... | null | CC BY-SA 2.5 | null | 2010-10-27T01:36:31.307 | 2010-10-27T01:36:31.307 | null | null | null | null |
4009 | 1 | null | null | 6 | 11467 |
### Initial Question:
I am trying to calculate inter-rater reliability. Previous researchers in this area have used intraclass correlation. SPSS has options for two-way random, mixed random and one-way random models. SPSS help says choose the right one based on whether the 'people effects are random' and 'item effec... | Inter-rater reliability using Intra-class correlation with ratings for multiple objects on multiple properties | CC BY-SA 3.0 | null | 2010-10-27T02:29:31.147 | 2016-07-05T14:35:54.150 | 2011-08-24T22:48:45.273 | 5739 | 2025 | [
"spss",
"reliability",
"agreement-statistics",
"intraclass-correlation"
] |
4010 | 1 | null | null | 1 | 260 | I am now having a sequence of numbers, e.g. $x_1, x_2,\dots , x_N$, ($0\leq x_i\leq 1$), which may represent the correlation between a couple of measurements. I want to set a threshold for this sequence, that for $x_i$ which are greater than the threshold may have a significant difference with $x_j$ which are smaller t... | Set a threshold for a sequence | CC BY-SA 2.5 | null | 2010-10-27T04:05:47.197 | 2023-04-04T08:00:30.070 | 2010-10-27T09:21:47.860 | 930 | null | [
"correlation",
"nonparametric"
] |
4011 | 2 | null | 3907 | 0 | null | @Skirant you lost me on your last comment, but I agree with Whuber that by using birth at start start you are distorting your sample as it doesn't take into account people with that gene change that actually already had the event or died from it. On top of it once people enter the regstry there is a chance that they ch... | null | CC BY-SA 2.5 | null | 2010-10-27T04:32:45.037 | 2010-10-27T04:32:45.037 | null | null | 10229 | null |
4012 | 2 | null | 3907 | 2 | null | You need to be careful to distinguish two different "start times" in studies such as this:
- The origin for the time variable, i.e. the point which you're calling t=0 for each participant
- The time at which an individual enters the study, i.e. the time from which you would record an event if one happened
In the s... | null | CC BY-SA 2.5 | null | 2010-10-27T06:40:00.510 | 2010-10-27T06:40:00.510 | null | null | 449 | null |
4013 | 1 | 4015 | null | 20 | 10365 | I've read through [this thread](https://stats.stackexchange.com/questions/665/whats-the-difference-between-probability-and-statistics), and it looks to me like it can be said that:
- statistics = induction ?
- probability = deduction ?
But I am wondering if there might be some more details on the comparison that I ... | Can you say that statistics and probability is like induction and deduction? | CC BY-SA 2.5 | null | 2010-10-27T07:47:44.047 | 2020-03-17T19:18:40.160 | 2017-04-13T12:44:45.783 | -1 | 253 | [
"probability",
"mathematical-statistics"
] |
4014 | 2 | null | 4013 | 3 | null | Yes! Maybe statistics isn't strictly equal to induction, but statistics is the solution to the [problem of induction](http://en.wikipedia.org/wiki/Problem_of_induction) in my opinion.
| null | CC BY-SA 2.5 | null | 2010-10-27T08:18:14.943 | 2010-10-27T08:18:14.943 | null | null | 449 | null |
4015 | 2 | null | 4013 | 18 | null | I think it is the best to quickly recap the meaning of inductive and deductive reasoning before answering your question.
- Deductive Reasoning: "Deductive arguments are attempts to show that a conclusion necessarily follows from a set of premises. A deductive argument is valid if the conclusion does follow necessarily... | null | CC BY-SA 3.0 | null | 2010-10-27T08:28:20.517 | 2016-03-19T22:34:10.047 | 2016-03-19T22:34:10.047 | 109158 | 442 | null |
4016 | 2 | null | 4009 | 10 | null | These are distinct ways of accounting for raters or items variance in overall variance, following [Shrout and Fleiss (1979)](http://www3.uta.edu/faculty/ricard/COED/Shrout%20&%20Fleiss%20(1979)%20Intraclass%20correlations.pdf) (cases 1 to 3 in Table 1):
- One-way random effects model: raters are considered as sampled ... | null | CC BY-SA 3.0 | null | 2010-10-27T09:13:38.807 | 2015-04-21T22:45:53.847 | 2017-04-13T12:44:23.203 | -1 | 930 | null |
4017 | 1 | 4018 | null | 10 | 11258 | I would like to learn to use Rcpp. I went through the docs on the package's CRAN website, but i feel working on a practical example (second practical, considering convolve3) would be more helpfull .
I propose the following code, from the the robustbase package because it's neither too long nor too short, uses a combin... | Translate R to C++ (eventually with Rcpp) | CC BY-SA 2.5 | null | 2010-10-27T09:59:40.793 | 2018-04-11T15:45:35.220 | 2010-10-27T19:04:31.570 | 930 | 603 | [
"r",
"c++"
] |
4018 | 2 | null | 4017 | 14 | null | Interesting question, but quite possibly too challenging to be discussed briefly:
- You would need a C++-side implementations of median()
- The cited code from package robustbase is highly 'R-optimised' which may not be the best starting point.
- Rcpp is not an 'R compiler' that you toss any such function at to 'mak... | null | CC BY-SA 2.5 | null | 2010-10-27T12:17:28.647 | 2010-10-27T12:17:28.647 | null | null | 334 | null |
4019 | 1 | 4020 | null | 7 | 4647 | Let us consider a comparison of two machine learning algorithms (A and B) on some dataset. Results (root mean squared error) of both algorithms depend on randomly generated initial approximation (parameters).
Questions:
- When I use the same parameters for both algorithms, "usually" A slightly outperforms B. How many ... | Measuring statistical significance of machine learning algorithms comparison | CC BY-SA 2.5 | null | 2010-10-27T12:56:45.837 | 2010-10-27T20:00:28.423 | 2010-10-27T20:00:28.423 | 1725 | 1725 | [
"machine-learning",
"statistical-significance"
] |
4020 | 2 | null | 4019 | 4 | null |
- You have two biases to remove here -- the selection of the initial parameters set and the selection of train/test data.
So, I don't think it is good to compare algorithms based on the same initial parameters set; I would just run the evaluation over few different initial sets for each of the algorithms to get more g... | null | CC BY-SA 2.5 | null | 2010-10-27T13:17:40.497 | 2010-10-27T16:48:32.687 | 2010-10-27T16:48:32.687 | null | null | null |
4021 | 2 | null | 3980 | 1 | null | You are still looking for binomial regression. You have to rearrange the data so that each observation is one set of binomial trials (separately for pre- and post), adding a "time" and "subject" variable. The effect of "time" on the probability of success is like the pre-post difference (on the logit scale), its intera... | null | CC BY-SA 2.5 | null | 2010-10-27T14:04:15.370 | 2010-10-27T14:04:15.370 | null | null | 279 | null |
4022 | 2 | null | 3997 | 6 | null | ok timeseries seem to have done the trick:
```
aets <- as.xts(read.zoo("n8_energy_actual2009_2010.csv", header=TRUE, sep=",", FUN=as.POSIXct))
eats.2010 <- aets["2010-01::2010-10"]
```
| null | CC BY-SA 2.5 | null | 2010-10-27T14:34:10.650 | 2010-10-27T14:34:10.650 | null | null | 1716 | null |
4023 | 1 | null | null | 10 | 4677 | I am comparing two groups of mutants each of which can have only one out of 21 different phenotypes. I would like to see whether distribution of these outcomes is similar between two groups. I found an [online test](http://www.fon.hum.uva.nl/Service/Statistics/EqualDistribX2.html)
that calculates the "Chi-square test... | Chi-square test for equality of distributions: how many zeroes does it tolerate? | CC BY-SA 2.5 | null | 2010-10-27T14:39:11.707 | 2010-10-28T13:00:07.440 | 2010-10-27T18:22:28.543 | 449 | 1727 | [
"distributions",
"chi-squared-test",
"contingency-tables"
] |
4024 | 2 | null | 4023 | 5 | null | The usual guidelines are that the expected counts should be greater than 5, but it can be somewhat relaxed as discussed in the following article:
>
Campbell , I, Chi-squared and
Fisher–Irwin tests of two-by-two
tables with small sample
recommendations, Statistics in
Medicine (2007) 26(19): 3661–3675.
See als... | null | CC BY-SA 2.5 | null | 2010-10-27T15:11:25.390 | 2010-10-27T15:28:30.650 | 2010-10-27T15:28:30.650 | 930 | 930 | null |
4025 | 1 | null | null | 2 | 1395 | I am using the `naivebayes` function of the [e1071](http://cran.r-project.org/web/packages/e1071/index.html) library. Some example commands are:
```
model = naiveBayes(Species ~ ., data = iris)
pred = predict(model, iris[,])
```
My question is: how can I obtain the maximum likelihood estimate for the conditional proba... | MLE for Naive Bayes in R | CC BY-SA 2.5 | null | 2010-10-27T15:45:20.203 | 2010-11-26T22:44:24.210 | 2010-10-27T22:08:34.000 | null | null | [
"r",
"machine-learning",
"e1071",
"naive-bayes"
] |
4026 | 2 | null | 4025 | 1 | null | This seems a bit ambiguous... What's wrong with `model$table`?
| null | CC BY-SA 2.5 | null | 2010-10-27T16:26:56.013 | 2010-10-27T16:26:56.013 | null | null | null | null |
4029 | 2 | null | 4023 | 8 | null | Perfectly feasible these days to do [Fisher's 'exact' test](http://en.wikipedia.org/wiki/Fisher%27s_exact_test) on such a table. I just got p = 0.087 using Stata (`tabi 2 1 \ 2 3 \ .... , exact`. Execution took 0.19 seconds).
EDIT after chl's comment below (tried adding as a comment but can't format):
It works in R 2.... | null | CC BY-SA 2.5 | null | 2010-10-27T18:28:19.503 | 2010-10-28T13:00:07.440 | 2010-10-28T13:00:07.440 | 449 | 449 | null |
4030 | 1 | null | null | 7 | 2865 | I want to extend the standard [VECM](http://en.wikipedia.org/wiki/Error_correction_model) form:
Δx[t] = δ0 + ... + Π x[t-1] + Φ1 Δx[t-1] + Φ1 Δx[t-2] + ... + ε
to include exogenous variables (i.e. variables that are participant in describing the relationships amongst `Δx[t]`, but are not in the dependent set `Δx[t]`)... | Finding coefficients for VECM + exogenous variables | CC BY-SA 2.5 | null | 2010-10-27T18:35:57.930 | 2011-04-26T18:27:01.343 | 2010-10-27T18:54:53.467 | 930 | 1127 | [
"time-series",
"econometrics"
] |
4031 | 2 | null | 3984 | 8 | null | Grouping SC and AIC together IS WRONG. They are very different things, even though people heavily misuse them. AIC is meaningful when you are predicting things, using SC in this scenario can lead (not all the times) to wrong results. Similarly, if you are interested in doing model selection with the principle of parsim... | null | CC BY-SA 2.5 | null | 2010-10-27T20:31:24.907 | 2010-10-27T20:31:24.907 | null | null | 1307 | null |
4033 | 2 | null | 2909 | 4 | null | This is an alternating sum. Each successive pair almost cancels; such pair-sums eventually decrease monotonically.
One approach, then, is to compute the sum in pairs where $n$ = {1,2}, {3,4}, {5,6}, etc. (Doing so eliminates a lot of floating point error, too.) Some more tricks can help:
(1) To solve $\tan(t) = t / \... | null | CC BY-SA 2.5 | null | 2010-10-27T22:39:50.370 | 2010-10-28T20:12:38.843 | 2010-10-28T20:12:38.843 | 919 | 919 | null |
4034 | 1 | 4038 | null | 13 | 3269 | This may be a naive question, but here goes. If I have a set of empirical data and fit a kernel density to it, and then obtain a new single value which possibly comes from the same process which generated the original data set, can I assign a probability that this new value belongs to the set/process by simply reading ... | Interpretation/use of kernel density | CC BY-SA 2.5 | null | 2010-10-27T23:56:53.503 | 2010-10-28T08:22:03.600 | 2010-10-28T08:22:03.600 | null | 226 | [
"kde"
] |
4036 | 5 | null | null | 0 | null |
- stata.com (official website)
- Wikipedia article
Some other sources of Stata help:
- Stata's built-in search facilities
- Statalist FAQ
- Resources from UCLA
'Stata' is an invented word, not an acronym, and therefore should not have all its letters capitalized (i.e. 'STATA' is considered incorrect). See the ... | null | CC BY-SA 2.5 | null | 2010-10-28T07:26:22.207 | 2010-10-28T07:46:12.183 | 2010-10-28T07:46:12.183 | 449 | 449 | null |
4037 | 4 | null | null | 0 | null | A statistical software package. Use this tag for any on-topic question that (a) involves Stata either as a critical part of the question or expected answer, & (b) is not just about how to use Stata. | null | CC BY-SA 4.0 | null | 2010-10-28T07:26:22.207 | 2019-10-08T17:20:58.670 | 2019-10-08T17:20:58.670 | 121522 | 449 | null |
4038 | 2 | null | 4034 | 13 | null | No, I'm afraid not. The kernel density estimand is the [probability density function](http://en.wikipedia.org/wiki/Probability_density_function). The y-value is an estimate of the probability density at that value of x, so the area under the curve between x1 and x2 estimates the probability of the random variable X ... | null | CC BY-SA 2.5 | null | 2010-10-28T07:55:48.317 | 2010-10-28T07:55:48.317 | null | null | 449 | null |
4039 | 2 | null | 3715 | 5 | null | When applying the formula for P(B|A) for [Agresti-Coull](http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Agresti-Coull_Interval), it seems important to me to use, for the denominator (ñ), a number with uncertainty. The formula ñ=P(A)*N+4 (where N is the size of your sample) gives you this number, ... | null | CC BY-SA 3.0 | null | 2010-10-28T08:15:50.047 | 2017-02-12T09:15:31.103 | 2017-02-12T09:15:31.103 | 1735 | 1735 | null |
4040 | 1 | 4041 | null | 17 | 91925 | In R, I have a data frame comprising a class label C (a factor) and two measurements, M1 and M2. How do I compute the correlation between M1 and M2 within each class?
Ideally, I'd get back a data frame with one row for each class and two columns: the class label C and the correlation.
| R: compute correlation by group | CC BY-SA 2.5 | null | 2010-10-28T08:24:14.630 | 2015-10-08T21:14:58.500 | 2010-10-28T09:13:26.317 | 8 | 439 | [
"r",
"correlation"
] |
4041 | 2 | null | 4040 | 20 | null | The package plyr is the way to go.
Here is a simple solution:
```
xx <- data.frame(group = rep(1:4, 100), a = rnorm(400) , b = rnorm(400) )
head(xx)
require(plyr)
func <- function(xx)
{
return(data.frame(COR = cor(xx$a, xx$b)))
}
ddply(xx, .(group), func)
```
The output will be:
```
group COR
1 1 0.05... | null | CC BY-SA 2.5 | null | 2010-10-28T08:40:21.723 | 2010-10-28T08:40:21.723 | null | null | 253 | null |
4042 | 2 | null | 4040 | 12 | null | If you are inclined to use functions in the base package, you can use the `by` function, then reassemble the data:
```
xx <- data.frame(group = rep(1:4, 100), a = rnorm(400) , b = rnorm(400) )
head(xx)
# This returns a "by" object
result <- by(xx[,2:3], xx$group, function(x) {cor(x$a, x$b)})
# You get pretty close to... | null | CC BY-SA 2.5 | null | 2010-10-28T10:46:38.670 | 2010-10-28T10:46:38.670 | null | null | 1195 | null |
4043 | 1 | null | null | 8 | 1270 | I have a few time series that were (for technical reasons) acquired with slightly different time intervals, ranging between 19 and 21 seconds.
Now, I would like to average the values of these different time series over time, so I thought that I could do some sort of interpolation of the values at some regular interval ... | Averaging time series with different sampling interval | CC BY-SA 4.0 | null | 2010-10-28T11:29:57.120 | 2020-01-31T00:36:39.107 | 2020-01-31T00:36:39.107 | 11887 | 582 | [
"time-series",
"interpolation",
"unevenly-spaced-time-series"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.