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
5571
1
5579
null
12
6431
I recently fit 4 multiple regression models for the same predictor/response data. Two of the models I fit with Poisson regression. ``` model.pois <- glm(Response ~ P1 + P2 +...+ P5, family=poisson(), ...) model.pois.inter <- glm(Response ~ (P1 + P2 +...+ P5)^2, family=poisson(), ...) ``` Two of the models I fit with n...
Comparing regression models on count data
CC BY-SA 3.0
null
2010-12-16T18:04:08.740
2014-12-10T12:22:50.943
2014-12-10T12:22:50.943
56216
1973
[ "regression", "aic", "count-data", "likelihood-ratio", "model-comparison" ]
5572
1
5584
null
8
531
I am planing a pre-post treatment-control design study with a large number of pre-treatment measurements. I have subjects divided into a control group and a treatment group. For both groups, I will collect hourly data for one year prior to the start of the treatment and then continue collecting data for another year. T...
Taking advantage of many pre-treatment measurements
CC BY-SA 2.5
null
2010-12-16T18:16:48.147
2010-12-17T21:50:50.030
2010-12-17T21:50:50.030
null
743
[ "mixed-model", "experiment-design", "repeated-measures", "panel-data" ]
5573
1
5577
null
7
769
I would like to create an "equilibrated histogram" with roughly the same number of data points in each bin. The second restriction I have is that I should have only 4 bins. Given the following list of numbers below, how can I achieve that? -2.153, -1.732, -1.699, -1.559, -1.355, -1.306, -1.151, -1.129, -0.636, 0.4085, ...
How to build an "equilibrated histogram"?
CC BY-SA 2.5
null
2010-12-16T20:06:26.387
2013-06-18T18:12:49.263
2010-12-16T20:49:03.377
696
64
[ "r", "histogram" ]
5574
2
null
5563
5
null
As @David mentioned, R is not doing symbolic calculations on its own, and such jobs should be done in other programs or with wrapper packages. Yet, calculating limit numerically is usually quite easy -- in most cases you just need to find argument $n$ large enough so the difference between $f(n+1)-f(n)$ is smaller than...
null
CC BY-SA 2.5
null
2010-12-16T20:10:54.397
2010-12-16T20:10:54.397
null
null
null
null
5575
2
null
5573
7
null
You are looking for [quantiles](http://en.wikipedia.org/wiki/Quantile); in R there is a function `quantile` that will calculate them for you; `Hmisc` R package provides `cut2` function which explicitly calculates such "equilibrated bins".
null
CC BY-SA 2.5
null
2010-12-16T20:14:35.177
2010-12-16T20:14:35.177
null
null
null
null
5577
2
null
5573
8
null
To follow up on @mbq's suggestion, here's the code to do that with R: ``` require(Hmisc) x <- c(-2.153, -1.732, -1.699, -1.559, -1.355 , -1.306, -1.151, -1.129, -0.636, 0.4085 , 0.5408, 0.5731, 0.5842, 0.6206, 0.8175 , 0.8274, 0.8710, 1.3214, 1.5552, 2.2342 ) eqBins <- cut2(x, g = 4) #what are the bins and how many i...
null
CC BY-SA 3.0
null
2010-12-16T20:48:42.173
2013-06-18T18:12:49.263
2013-06-18T18:12:49.263
919
696
null
5578
2
null
5364
2
null
I discovered a paper by Reiss, et. al., [Partial least squares confidence interval calculation for industrial end-of-batch quality prediction](http://dx.doi.org/10.1016/j.chemolab.2009.11.003), in which appears the quote: > The PLS prediction should be accompanied by an online confidence interval to indicate the acc...
null
CC BY-SA 2.5
null
2010-12-16T21:07:01.267
2010-12-16T22:27:47.410
2010-12-16T22:27:47.410
795
795
null
5579
2
null
5571
16
null
You can compare the negative binomial model to the corresponding Poisson model with a likelihood ratio test. A Poisson model is equivalent to a negative binomial model with an overdispersion parameter of zero. Therefore they are nested models and likelihood ratios are valid. The complication is that the overdispersion ...
null
CC BY-SA 3.0
null
2010-12-16T21:47:11.920
2013-11-18T16:27:07.357
2013-11-18T16:27:07.357
17230
449
null
5580
2
null
5525
5
null
A more general approach is to use the `logLik()` function. It returns an object with the attribute `df` that gives the fitted models degrees of freedom. The benefit of this approach is that it works with many other model classes (including `glm`). In the case of ordinary linear regression (`lm`) this corresponds to ...
null
CC BY-SA 2.5
null
2010-12-16T23:00:58.127
2010-12-16T23:16:31.660
2010-12-16T23:16:31.660
1670
1670
null
5581
2
null
4551
130
null
Failing to look at (plot) the data.
null
CC BY-SA 2.5
null
2010-12-16T23:13:28.913
2010-12-16T23:13:28.913
null
null
1670
null
5583
2
null
5572
1
null
Excuse my previous post. I now see that you are not referring to 9000 different covariates. What I have written does not apply to your situation. Sincerest apologies. Paul There is a lot of discussion about matching and dimensionality reduction on pre-treatment covariates that may be worthwhile examining - i.e. prope...
null
CC BY-SA 2.5
null
2010-12-17T04:14:41.050
2010-12-17T05:49:56.120
2010-12-17T05:49:56.120
2238
2238
null
5584
2
null
5572
5
null
This is not a complete answer, but just a few thoughts: - More pre-treatment measures should increase the reliability of your measurement of baseline differences. Increasing reliability of measuring baseline differences should increase your statistical power in detecting group differences (assuming a real effect exist...
null
CC BY-SA 2.5
null
2010-12-17T05:13:59.897
2010-12-17T05:13:59.897
2017-04-13T12:44:33.310
-1
183
null
5585
2
null
604
1
null
I am having troubling following your reasoning, but here are some things you should consider. Generally, the harder you fit a model to your training data, the worse the model will perform on independent validation data sets. By over-fitting the model to the training set, you risk capturing predictor-response relationsh...
null
CC BY-SA 2.5
null
2010-12-17T05:45:18.537
2010-12-17T05:45:18.537
null
null
2144
null
5586
1
null
null
3
3728
I have several OLS models with robust s.e.'s that predict an outcome variable Y. For instance: Model 1: $Y=B_0 +B_1X_1$ Model 2: $Y=B_0 + B_1X_1 + B_2X_2$ Model 3: $Y=B_0 +B_1X_1 + B_2X_2 +B_3X_3$ I am interested in giving an average effect for $B_1$ across Models 1-3 with an accompanied 95% CI. Can I just take the a...
Average effect of coefficients across multiple linear models?
CC BY-SA 3.0
null
2010-12-17T06:31:41.993
2021-02-04T22:51:05.250
2016-08-15T16:27:59.967
22468
null
[ "regression", "confidence-interval", "linear-model", "regression-coefficients", "mean" ]
5588
2
null
5514
3
null
Conditional logit models for unit $i$ in group $j$ of size $G$, $P(Y_{ij}=1|\sum_{k=1}^GY_{gj}=M)$ for some $0<M<G$. So, suppose you have a group of size 2 in which there is one success. Then, group member number 1's contribution to the likelihood is given by $A^{Y_{1j}}B^{1-Y_{1j}}$, where, $$ \begin{matrix} A & = ...
null
CC BY-SA 2.5
null
2010-12-17T06:57:01.517
2010-12-17T13:15:20.630
2010-12-17T13:15:20.630
96
96
null
5589
2
null
5586
4
null
If these 3 models are estimated from independent samples, then you can assume that $\beta_1$ are independent for these 3 models. Then you can average them. The standard error of the average then will be the square root from the average of the squares of the standard errors. However you should check if you do not have ...
null
CC BY-SA 2.5
null
2010-12-17T07:11:15.503
2010-12-17T07:11:15.503
null
null
2116
null
5590
2
null
5571
5
null
I believe `anova()` in R can be used for this. Despite its name, it's a likelihood ratio test. Crawley in his [The R Book](http://www.bio.ic.ac.uk/research/mjcraw/therbook/index.htm) has some examples of usage.
null
CC BY-SA 2.5
null
2010-12-17T07:16:03.467
2010-12-17T07:16:03.467
null
null
144
null
5591
1
5592
null
48
7219
Roughly speaking a p-value gives a probability of the observed outcome of an experiment given the hypothesis (model). Having this probability (p-value) we want to judge our hypothesis (how likely it is). But wouldn't it be more natural to calculate the probability of the hypothesis given the observed outcome? In more d...
Why do people use p-values instead of computing probability of the model given data?
CC BY-SA 3.0
null
2010-12-17T10:36:49.853
2021-11-05T10:51:01.080
2016-08-11T20:26:39.243
28666
2407
[ "likelihood", "p-value" ]
5592
2
null
5591
34
null
Computing the probability that the hypothesis is correct doesn't fit well within the frequentist definition of a probability (a long run frequency), which was adopted to avoid the supposed subjectivity of the Bayesian definition of a probability. The truth of a particular hypothesis is not a random variable, it is eit...
null
CC BY-SA 3.0
null
2010-12-17T11:06:10.647
2012-03-14T10:34:51.520
2012-03-14T10:34:51.520
887
887
null
5594
2
null
490
5
null
If you are only interested in generalization performance, you are probably better off not performing any feature selection and using regularization instead (e.g. ridge regression). There have been several open [challenges](http://clopinet.com/isabelle/Projects/NIPS2003) in the machine learning community on feature sel...
null
CC BY-SA 2.5
null
2010-12-17T11:13:27.427
2010-12-17T11:13:27.427
null
null
887
null
5596
2
null
5115
7
null
[Adolphe Quetelet](http://en.wikipedia.org/wiki/Adolphe_Quetelet) for his work on the "average man", and for pioneering the use of statistics in the social sciences. Before him, statistics were largely confined to the physical sciences (astronomy, in particular).
null
CC BY-SA 2.5
null
2010-12-17T12:20:38.070
2010-12-17T12:20:38.070
null
null
null
null
5597
1
5600
null
26
570
As a biologist, many of the research projects I work on at some point involve collaboration with a statistician, whether it be for simple advice or for implementing and testing a model for my data. My statistics colleagues admit that they do a significant amount of collaboration, insomuch that the tenure review process...
Statistics collaboration
CC BY-SA 2.5
null
2010-12-17T12:27:48.893
2017-01-21T09:30:29.850
2017-01-21T09:30:29.850
28666
1973
[ "academia" ]
5598
2
null
5597
3
null
Having no preconceived ideas about the method you should use solely based on papers. Their ideas, logic or methods may be faulty. You want to think about your problem and use the most appropriate set of tools. This reminds me of reproducing cited information without checking the source. On the other hand, paper with me...
null
CC BY-SA 2.5
null
2010-12-17T13:49:05.330
2010-12-17T13:49:05.330
null
null
144
null
5599
2
null
5597
10
null
I think the concept that few scientists grasp is this: A statistical result can really only be taken at face value when the statistical methods were chosen in advance while the experiment was being planned (or while preliminary data were collected to polish methods). You are likely to be mislead if you first analyze ...
null
CC BY-SA 2.5
null
2010-12-17T14:01:35.943
2010-12-18T03:00:48.173
2010-12-18T03:00:48.173
25
25
null
5600
2
null
5597
13
null
My answer is from the point of view of an UK academic statistician. In particular, as an academic that gets judged on advances in statistical methodology. > What would make me (or any other scientist) a better collaborator? To be blunt - money. My time isn't free and I (as an academic) don't get employed to carry...
null
CC BY-SA 2.5
null
2010-12-17T15:00:51.533
2010-12-18T21:22:28.910
2010-12-18T21:22:28.910
919
8
null
5601
1
5652
null
5
6067
I am trying to view the output from the GBM package for boosted trees in R. Below I am fitting a single tree without any sampling in order to compare the tree to the complete dataset. First, create the data set: ``` set.seed(1973) ############## CREATE DATA############################################# N <- 1000 X1 <...
How to view GBM package trees?
CC BY-SA 2.5
null
2010-12-17T15:25:31.870
2019-08-20T05:02:05.413
2019-08-20T05:02:05.413
11887
2040
[ "r", "boosting" ]
5602
1
null
null
2
243
I have data which has several properties (metadata, as key value pairs, where the keyspace is shared over the whole dataset) per object. I took a sample of objects and divided them in n groups according to an unknown algorithm. What statistical methods or algorithm exists to find the relevant properties and their weig...
Methods of grouping sets of data
CC BY-SA 2.5
null
2010-12-17T17:21:32.020
2010-12-21T14:58:31.110
2010-12-21T14:58:31.110
2423
2423
[ "classification", "data-mining" ]
5603
1
5640
null
3
775
How does one approach the problem of modeling a "birth-death process" where the arrivals are dependent on the current state in the following way: if the population is above a certain point, the probability of an arrival decreases. Basically, I'm interested in complicating (slightly) an existing model of "births" that j...
Modeling a birth-death process that is not memoryless
CC BY-SA 2.5
null
2010-12-17T17:24:10.373
2010-12-24T02:13:25.680
2010-12-23T15:53:46.737
446
446
[ "stochastic-processes" ]
5604
1
null
null
3
2797
I have a data set that includes the number of visits to a website. Here are some descriptive statistics for my data Median: 4 Mean: 14.1352 SD: 121.8119 Clearly, there are some huge values (individuals who have visited the site thousands of times.) To remove these outliers I considered simply removing any data that f...
Removing outliers from asymmetric data
CC BY-SA 3.0
null
2010-12-17T19:04:04.553
2017-04-10T15:45:27.100
2017-04-10T15:45:27.100
11887
null
[ "r", "outliers", "descriptive-statistics", "winsorizing" ]
5605
2
null
5591
6
null
"Roughly speaking p-value gives a probability of the observed outcome of an experiment given the hypothesis (model)." but it doesn't. Not even roughly - this fudges an essential distinction. The model is not specified, as Raskolnikov points out, but let's assume you mean a binomial model (independent coin tosses, fixe...
null
CC BY-SA 2.5
null
2010-12-17T19:10:47.387
2010-12-17T19:10:47.387
null
null
1739
null
5606
2
null
5542
2
null
I propose the following solution to 2), and would appreciate feedback: - Data include mean, $Y$, sample size $n$, and standard error $\sigma$; calculate precision ($\tau=\frac{1}{\sigma\sqrt{n}}$) because it is required for logN parameterization by BUGS - data $Y\sim \text{N}(\beta_0,\tau)$ - precision $\tau\sim\tex...
null
CC BY-SA 3.0
null
2010-12-17T19:57:51.563
2014-04-08T21:43:23.227
2014-04-08T21:43:23.227
1381
1381
null
5607
2
null
5534
7
null
It’s much easier to simultaneously construct $X_i$ and $Y_i$ having the desired properties, by first letting $Y_i$ be i.i.d. Uniform$[0,1]$ and then taking $X_i = F^{-1}(Y_i)$. This is the basic method for generating random variables with arbitrary distributions. The other direction, where you are first given $X_i$ an...
null
CC BY-SA 2.5
null
2010-12-17T20:13:50.217
2010-12-17T20:13:50.217
null
null
1670
null
5608
2
null
5591
11
null
As a former academic who moved into practice, I'll take a shot. People use p-values because they are useful. You can't see it in textbooky examples of coin flips. Sure they're not really solid foundationally, but maybe that is not as necessary as we like to think when we're thinking academically. In the world of data, ...
null
CC BY-SA 2.5
null
2010-12-17T20:55:13.000
2010-12-17T20:55:13.000
null
null
2134
null
5609
2
null
5399
5
null
There are no strong results and it does not depend on Gaussianity. In the case where $x_1$ and $x_2$ are scalars, you are asking if knowing the variance of the variables implies something about their covariance. whuber’s answer is right. The Cauchy-Schwarz Inequality and positive semidefiniteness constrain the possi...
null
CC BY-SA 2.5
null
2010-12-17T21:44:43.637
2010-12-17T22:05:36.543
2010-12-17T22:05:36.543
1670
1670
null
5610
2
null
4364
21
null
[Stein’s Lemma](http://en.wikipedia.org/wiki/Stein%27s_lemma) provides a very useful characterization. $Z$ is standard Gaussian iff $$E f’(Z) = E Z f(Z)$$ for all absolutely continuous functions $f$ with $E|f’(Z)| < \infty$.
null
CC BY-SA 2.5
null
2010-12-17T22:00:34.923
2010-12-17T23:24:38.617
2010-12-17T23:24:38.617
1670
1670
null
5611
2
null
411
4
null
I think you have to consider the theoretical vs applied advantages of the different notions of distance. Mathematically natural objects don’t necessarily translate well into application. Kolmogorov-Smirnov is the most well-known for application, and is entrenched in testing for goodness of fit. I suppose that one of...
null
CC BY-SA 2.5
null
2010-12-17T22:33:50.943
2010-12-17T22:42:22.920
2010-12-17T22:42:22.920
1670
1670
null
5613
2
null
5591
13
null
Your question is a great example of frequentist reasoning and is, actually quite natural. I've used this example in my classes to demonstrate the nature of hypothesis tests. I ask for a volunteer to predict the results of a coin flip. No matter what the result, I record a "correct" guess. We do this repeatedly unti...
null
CC BY-SA 2.5
null
2010-12-18T05:56:43.220
2010-12-18T06:11:01.040
2010-12-18T06:11:01.040
485
485
null
5614
1
null
null
8
1746
While it is easier to use the Pearson chi-square/Cressie-Read type test, I would like to test the equality of proportions in $k$ categories across two groups using a Kolmogorov-Smirnov type test of the form proposed by [Pettitt & Stephens (1977)](http://www.jstor.org/stable/1268631) (see also [here](http://www4.gu.ed...
Two-sample permutation Kolmogorov-Smirnov tests
CC BY-SA 2.5
null
2010-12-18T06:56:55.773
2010-12-19T06:48:42.843
null
null
2399
[ "hypothesis-testing" ]
5615
2
null
5604
6
null
Don't remove any outliers until you explore the data a bit further. I suggest that you should do a log transform on the data and see whether it becomes more nearly symmetrical--the outliers may not be as extreme as you think. (Log values make perfect sense if there is some sort of power law at play.)
null
CC BY-SA 2.5
null
2010-12-18T07:14:17.327
2010-12-18T07:14:17.327
null
null
1679
null
5617
1
5622
null
23
73411
Let's say we have two factors (A and B), each with two levels (A1, A2 and B1, B2) and a response variable (y). The when performing a two way ANOVA of the type: ``` y~A+B+A*B ``` We are testing three null hypothesis: - There is no difference in the means of factor A - There is no difference in means of factor B ...
What is the NULL hypothesis for interaction in a two-way ANOVA?
CC BY-SA 2.5
null
2010-12-18T13:50:36.403
2015-04-24T09:09:14.283
2010-12-18T16:12:53.090
930
253
[ "hypothesis-testing", "anova" ]
5618
2
null
5617
10
null
An interaction tells us that the levels of factor A have different effects based on what level of factor B you're applying. So we can test this through a linear contrast. Let C = (A1B1 - A1B2) - (A2B1 - A2B2) where A1B1 stands for the mean of the group that received A1 and B1 and so on. So here we're looking at A1B...
null
CC BY-SA 2.5
null
2010-12-18T14:14:19.383
2010-12-18T15:16:35.160
2010-12-18T15:16:35.160
930
1028
null
5619
1
null
null
5
10058
I know that $r$ is itself a measure of the effect size, but I would like to know if using Spearman's rank test I can argue that the relation between X and Y is significant with $r = 0.33$ and that the effect is medium, as I do with Pearson test.
Effect size of Spearman's rank test
CC BY-SA 2.5
null
2010-12-18T15:33:30.063
2010-12-21T17:02:01.640
2010-12-18T16:07:11.407
930
null
[ "correlation", "effect-size" ]
5620
1
5621
null
9
8404
I'm reading "[The Elements of Statistical Learning](http://statweb.stanford.edu/~tibs/ElemStatLearn/download.html)" and early on there are references to p-vectors (page 10) and K-vectors (page 12). What exactly is meant by a p-vector and K-vector?
p-vector and K-vector
CC BY-SA 3.0
null
2010-12-18T15:34:36.363
2015-10-14T14:50:47.170
2015-10-14T14:50:47.170
919
1212
[ "mathematical-statistics", "terminology" ]
5621
2
null
5620
11
null
It's merely some generic notation for a vector of $p$ attributes or variables observed on $i=1,\dots, N$ individuals, so that you can define $X^T = (X_1,X_2,\dots,X_p)$ as a vector of inputs, in the feature (or input) space (and each individual will have one such vector of observed inputs). The $K$ notation seems to b...
null
CC BY-SA 2.5
null
2010-12-18T15:53:41.117
2010-12-18T15:53:41.117
null
null
930
null
5622
2
null
5617
19
null
I think it's important to clearly separate the hypothesis and its corresponding test. For the following, I assume a balanced, between-subjects CRF-$pq$ design (equal cell sizes, Kirk's notation: Completely Randomized Factorial design). $Y_{ijk}$ is observation $i$ in treatment $j$ of factor $A$ and treatment $k$ of fac...
null
CC BY-SA 2.5
null
2010-12-18T17:38:48.130
2010-12-20T09:24:11.373
2010-12-20T09:24:11.373
1909
1909
null
5623
2
null
5619
3
null
With increasing sample size $n$, $r_{z} = \sqrt{n-1} r_{S}$ is asymptotically $N(0, 1)$ distributed (standard normal distribution). In R ``` rSz <- sqrt(n-1) * rS (pVal <- 1-pnorm(rSz)) # one-sided p-value, test for positive rank correlation ```
null
CC BY-SA 2.5
null
2010-12-18T17:55:17.180
2010-12-18T17:55:17.180
null
null
1909
null
5624
2
null
5604
2
null
The answer you get depends on the question you ask. Dason asked what you are trying to do; I would also ask this question. You say you know some of your data is "tainted" but do you know that this taint applies to the high values? Many sorts of counts have long tails, with no bad data at all. If you just want to summ...
null
CC BY-SA 2.5
null
2010-12-18T20:51:52.010
2010-12-18T20:51:52.010
null
null
686
null
5625
2
null
5597
8
null
To get a good answer, you must write a good question. Answering a statistics question without context is like boxing blindfolded. You might knock your opponent out, or you might break your hand on the ring post. What goes into a good question? - Tell us the PROBLEM you are trying to solve. That is, the substantive pro...
null
CC BY-SA 2.5
null
2010-12-18T20:55:08.027
2010-12-18T20:55:08.027
null
null
686
null
5626
2
null
452
7
null
In Introductory Econometrics (Woolridge, 2009 edition page 268) this question is addressed. Woolridge says that when using robust standard errors, the t-statistics obtained only have distributions which are similar to the exact t-distributions if the sample size is large. If the sample size is small, the t-stats obtai...
null
CC BY-SA 2.5
null
2010-12-19T00:59:28.370
2010-12-19T00:59:28.370
null
null
null
null
5627
2
null
4364
1
null
Its characteristic function has the same form as its pdf. I am not sure of another distribution which does that.
null
CC BY-SA 2.5
null
2010-12-19T02:56:46.690
2010-12-19T02:56:46.690
null
null
null
null
5628
2
null
5517
8
null
Here's (at least most of) a solution with `MCMCglmm`. First fit the equivalent intercept-variance-only model with `MCMCglmm`: ``` library(MCMCglmm) primingHeid.MCMCglmm = MCMCglmm(fixed=RT ~ RTtoPrime * ResponseToPrime + Condition, random=~Subject+Word, data = primingHeid) ``` Comparin...
null
CC BY-SA 3.0
null
2010-12-19T03:07:09.180
2013-08-24T15:05:00.227
2013-08-24T15:05:00.227
7290
2126
null
5629
1
5745
null
2
1283
Is there a software package that supports, or could support, through operator overloading or extensions, code such as the following; ``` x = rand_arr(10) ; array 10 elements long y = rand_arr(10) z = x + y ; elemental addition (z[0]=x[0]+y[0];z[1]=x[1]+y[1],...) print z ``` If the above, or something similar, is valid...
Implementing error propagation
CC BY-SA 2.5
null
2010-12-19T04:20:06.560
2016-09-07T11:45:57.263
2010-12-21T20:02:06.103
null
957
[ "error-propagation" ]
5630
2
null
5629
4
null
It's difficult to determine what you're asking for because you haven't specified the semantics of "x.err" etc., but it sounds like you might be interested in [interval arithmetic](http://en.wikipedia.org/wiki/Interval_arithmetic#Implementations). [Implementations](http://www.cs.utep.edu/interval-comp/intlang.html) are...
null
CC BY-SA 2.5
null
2010-12-19T05:08:59.810
2010-12-21T19:22:49.363
2010-12-21T19:22:49.363
919
919
null
5631
2
null
5629
3
null
I recommend you look into [R](http://www.r-project.org/), the open source software for statistical computing. R supports many vectorized functions to deal with element by element computation of objects. Chapter 3 of [The R Inferno](http://lib.stat.cmu.edu/S/Spoetry/Tutor/R_inferno.pdf) provides a good outline on vector...
null
CC BY-SA 2.5
null
2010-12-19T05:12:26.403
2010-12-19T05:12:26.403
null
null
696
null
5632
2
null
5620
8
null
In mathematics and physics, the "x" in "x-vector" stands for the dimension of the vector. The meanings of $K$ and $p$ were previously established. Typically a "p-vector" is written as a column vector and a "p-covector" would be written as a row vector.
null
CC BY-SA 2.5
null
2010-12-19T05:18:34.387
2010-12-19T05:18:34.387
null
null
919
null
5633
2
null
5614
3
null
The answer depends on the nature of the data generation process and on the alternative hypothesis you have in mind. Your test is a kind of unweighted chi-square. Because of this lack of weighting, changes that principally affect the less-populated categories will be difficult to detect. For example, your test is goin...
null
CC BY-SA 2.5
null
2010-12-19T06:15:26.400
2010-12-19T06:48:42.843
2010-12-19T06:48:42.843
919
919
null
5634
1
5635
null
3
31346
So I have data like: ``` Cost 20 30 10 5 Rating 5 3 2 5 ``` I want to make a chart of rating vs. cost, so the points would be ``` [(5,20), (3,30), (2,10), (5,5)] ``` I can't seem to get excel to do anything other than put the two rows as independent series. Am I missing something, or I do have to pivo...
In Excel, how do I plot two rows against each other?
CC BY-SA 2.5
null
2010-12-19T15:53:17.357
2014-07-29T14:28:00.070
2010-12-19T18:14:33.343
930
1531
[ "data-visualization", "excel" ]
5635
2
null
5634
5
null
Select the two rows and do a scatterplot which I think is called an XY plot in Excel (sorry, I run a Linux machine, so I do not have Excel installed).
null
CC BY-SA 2.5
null
2010-12-19T15:56:51.113
2010-12-19T15:56:51.113
null
null
582
null
5636
2
null
3497
4
null
The answer to your original question is yes, because the classical theory applies under your sampling scheme. You don’t need any assumptions on the original data matrix. All of the randomness (implicitly behind standard errors and consistency) comes from your scheme for sampling $N$ rows from the data matrix. Think o...
null
CC BY-SA 2.5
null
2010-12-19T18:04:59.073
2010-12-19T21:49:54.970
2010-12-19T21:49:54.970
1670
1670
null
5637
2
null
5418
2
null
Another piece of advise might be to look at packages yours will be depending on or interacting with, especially if these implement some [items](https://stats.stackexchange.com/questions/5418/first-r-packages-source-code-to-study-in-preparation-for-writing-own-package/5433#5433) [Joshua Ulrich](https://stats.stackexchan...
null
CC BY-SA 2.5
null
2010-12-19T18:29:21.010
2010-12-19T18:29:21.010
2017-04-13T12:44:31.577
-1
1355
null
5640
2
null
5603
3
null
If this is for a particular application, I would first consider the question: "do you need to fit such a complex model?" which is code for, what other, more simple methods have you tried prior to this one? Have you looked at a plot of the "births & deaths" data that you have? I would advise that you look up some of th...
null
CC BY-SA 2.5
null
2010-12-20T03:39:18.017
2010-12-20T03:39:18.017
null
null
2392
null
5641
2
null
5090
7
null
Here's the solution I came up with: The trick is to add NAs to the end of the observation data. When seeing NA as a response variable the Kalman filter algorithm will simply predict the next value and not update the state vector. This is exactly what we want to make our forecast. ``` nAhead <- 12 mod <- dlmModSeas(4)+d...
null
CC BY-SA 2.5
null
2010-12-20T03:50:36.193
2010-12-20T03:50:36.193
null
null
2451
null
5642
2
null
2182
6
null
It’s easier to explain in terms of standard deviations, rather than confidence intervals. Your friend’s conclusion is basically correct under the simplest model where you have simple random sampling and two candidates. Now the sample proportions satisfy $p_A + p_B = 1$ so that $p_B = 1 - p_A$. Thus, $$Var(p_A - p_B)...
null
CC BY-SA 2.5
null
2010-12-20T05:45:35.210
2010-12-22T06:32:25.093
2010-12-22T06:32:25.093
1670
1670
null
5644
2
null
5382
0
null
I worked on it and thought this Bayesian equation will be useful. RatingTM = SRTM/(1 + AWD/WDTM) + MSRT/(1 + WDTM/AWD) The variables are: SR = Team member's self rating AWD = Average work done by team WD = Work done by team member MSRT = Mean self rating of team (TM: TeamMember) Please comment if you think this is not ...
null
CC BY-SA 2.5
null
2010-12-20T07:25:21.537
2010-12-20T07:25:21.537
null
null
2344
null
5645
2
null
2982
6
null
$L_1$ penalization is part of an optimization problem. Soft-thresholding is part of an algorithm. Sometimes $L_1$ penalization leads to soft-thresholding. For regression, $L_1$ penalized least squares (Lasso) results in soft-thresholding when the columns of the $X$ matrix are orthogonal (assuming the rows correspond ...
null
CC BY-SA 2.5
null
2010-12-20T07:31:41.610
2010-12-21T01:03:16.813
2010-12-21T01:03:16.813
1670
1670
null
5646
2
null
2854
3
null
First I would like to point out that to get the object `ks3` you do not need to do that much of the book-keeping code. Use the features of `ddply`: ``` ks3 <- ddply(o,.(ai,Gs),function(d){ temp <- ols(value~as.numeric(bc)+as.numeric(age),data=d,x=T,y=T) t2 <- bootcov(temp,B=1000,coef.reps=T) data.frame(...
null
CC BY-SA 2.5
null
2010-12-20T07:59:32.343
2010-12-24T11:45:34.523
2010-12-24T11:45:34.523
2116
2116
null
5647
1
null
null
2
2467
I am fitting a conditional logistic regression model with 1:4 controls using `R`. I wish to obtain `AIC` from the model. How can I extract the appropriate parameters based on the object `m`? ``` library(survival) m<-clogit(cc~exp+ factor1+ factor2 + strata(stratum),data=data1) ```
How to obtain AIC with conditional logistic regression using R?
CC BY-SA 3.0
null
2010-12-20T12:30:03.800
2016-03-19T09:50:14.343
2013-09-03T11:43:32.840
22047
null
[ "r", "logistic", "clogit" ]
5648
2
null
5647
3
null
It seems you must do it manually, so something like this: ``` 2*length(m$coefficients)-2*(m$loglik[2]) ```
null
CC BY-SA 2.5
null
2010-12-20T12:40:11.920
2010-12-20T12:40:11.920
null
null
null
null
5649
2
null
5602
2
null
Since your metadata is probably discrete, I suggest using [classification trees](http://en.wikipedia.org/wiki/Classification_tree). Note that from your example it is highly likely that your unknown algorithm is random, i.e. there is no algorithm.
null
CC BY-SA 2.5
null
2010-12-20T14:10:31.630
2010-12-20T14:10:31.630
null
null
2116
null
5650
1
null
null
9
976
I am currently working on some time series data, I know I can use LOESS/ARIMA model. The data is written to a vector whose length is 1000, which is a queue, updating every 15 minutes, Thus the old data will pop out while the new data push in the vector. I can rerun the whole model on a scheduler, e.g. retrain the m...
Incremental learning for LOESS time series model
CC BY-SA 2.5
null
2010-12-20T14:49:58.113
2013-05-07T05:59:47.533
2013-03-31T20:37:54.133
919
2454
[ "time-series", "model-evaluation" ]
5651
2
null
5602
1
null
This isn't a clustering, it's (supervised) classification. There are a lot of methods to do classification, such as naïve bayes for binary features and linear discriminants for continuous, or neural networks for some opaque combination of both. For the example you mention, the feasibility of what you suggest depends a ...
null
CC BY-SA 2.5
null
2010-12-20T16:55:46.273
2010-12-20T16:55:46.273
null
null
2456
null
5652
2
null
5601
8
null
This is not a bug. The model is stored using a 0-based index. So SplitVar=0 is X1, SplitVar=1 is X2, and SplitVar=2 is X3. So this split corresponds to a split on X3. Since X3 is an ordinal factor and the split is at 1.5, this corresponds to splitting levels 0&1 from 2&3. > sum(data$X3<="c") [1] 522 > sum(data$X3>="b")...
null
CC BY-SA 2.5
null
2010-12-20T18:12:43.150
2010-12-20T18:12:43.150
null
null
null
null
5653
2
null
5111
2
null
Under one interpretation of your situation there is no need to modify the p values at all. For example, let's posit that a sequence of (unknown) bivariate distributions $p_i(x,y)$ govern $A$ and $B$ for each organism $i$. That is, $\Pr(A=x, B=y) = p_i(x,y)$ for all possible outcomes $(x,y)$ of $(A,B)$. To test whethe...
null
CC BY-SA 2.5
null
2010-12-20T19:26:32.303
2010-12-20T19:26:32.303
null
null
919
null
5654
1
null
null
9
1855
I'm trying to help a scientist design a study for the occurrence of salmonella microbes. He would like to compare an experimental antimicrobial formulation against a chlorine (bleach) at poultry farms. Because background rates of salmonella differ over time, he plans to measure % poultry w/salmonella before treatment...
Sample size for proportions in repeated measures
CC BY-SA 2.5
null
2010-12-20T22:24:03.600
2010-12-22T11:04:25.630
2010-12-22T11:04:25.630
null
2473
[ "sample-size", "repeated-measures", "proportion" ]
5655
2
null
1875
0
null
How about just binning the given predictions and taking the observed fractions as your estimate for each bin? You can generalise this to a continuous model by weighing all the observations around your value of interest (say the prediction by tomorrow) by a Gaussian and seeing what the weighted average is. You can guess...
null
CC BY-SA 2.5
null
2010-12-21T00:33:47.953
2010-12-21T00:33:47.953
null
null
2067
null
5656
1
5662
null
10
11800
Wondering if anyone has run across a package/function in R that will combine levels of a factor whose proportion of all the levels in a factor is less than some threshold? Specifically, one of the first steps in data preparation I conduct is to collapse sparse levels of factors together (say into a level called 'Other'...
R package for combining factor levels for datamining?
CC BY-SA 3.0
null
2010-12-21T01:35:25.853
2017-05-16T23:32:03.043
2017-05-16T23:32:03.043
11887
2040
[ "r", "many-categories" ]
5657
2
null
5656
5
null
I wrote a quick function that will accomplish this goal. I'm a novice R user, so it may be slow with large tables. ``` Merge.factors <- function(x, p) { #Combines factor levels in x that are less than a specified proportion, p. t <- table(x) y <- subset(t, prop.table(t) < p) z <- subset(t, prop.table(t...
null
CC BY-SA 2.5
null
2010-12-21T02:33:01.607
2010-12-21T06:58:11.473
2010-12-21T06:58:11.473
1118
1118
null
5658
2
null
5656
5
null
The only problem with Christopher answer is that it will mix up the original ordering of the factor. Here is my fix: ``` Merge.factors <- function(x, p) { t <- table(x) levt <- cbind(names(t), names(t)) levt[t/sum(t)<p, 2] <- "Other" change.levels(x, levt) } ``` where `change.levels` is the foll...
null
CC BY-SA 2.5
null
2010-12-21T04:51:40.117
2010-12-21T04:51:40.117
null
null
2116
null
5659
2
null
5399
0
null
suppose $(X,Y)$ is bivariate normal with zero means and correlation $\rho$. then ${\mathrm E} XY= cov(X,Y)= \rho\sigma_X\sigma_Y$. all of the entries in the matrix $x_1x_2^T$ are of the form $XY$.
null
CC BY-SA 2.5
null
2010-12-21T05:30:02.967
2010-12-21T05:30:02.967
null
null
1112
null
5660
2
null
5602
0
null
You can use SOM which is a kind of supervised clustering. Or as sesqu said their are tons of other algorithms such as support vector machines, regression or logistic regression. Neural Networks, etc ..
null
CC BY-SA 2.5
null
2010-12-21T08:36:12.760
2010-12-21T08:36:12.760
null
null
1808
null
5661
2
null
1875
2
null
The [Brier Score](http://docs.lib.noaa.gov/rescue/mwr/078/mwr-078-01-0001.pdf) approach is very simple and the most directly applicable way verify accuracy of a predicted outcome versus binary event. Don't rely on just formulas ...plot the scores for different periods of time, data, errors, [weighted] rolling average...
null
CC BY-SA 2.5
null
2010-12-21T08:54:45.653
2010-12-21T22:21:01.123
2010-12-21T22:21:01.123
2342
2342
null
5662
2
null
5656
11
null
It seems it's just a matter of "releveling" the factor; no need to compute partial sums or make a copy of the original vector. E.g., ``` set.seed(101) a <- factor(LETTERS[sample(5, 150, replace=TRUE, prob=c(.1, .15, rep(.75/3,3)))]) p <- 1/5 lf <- names(which(prop.table(table(a)) < p)) level...
null
CC BY-SA 2.5
null
2010-12-21T10:16:38.273
2010-12-21T10:16:38.273
null
null
930
null
5663
2
null
5115
23
null
[Florence Nightingale](http://en.wikipedia.org/wiki/Florence_Nightingale) for being "a true pioneer in the graphical representation of statistics" and developing the polar area diagram. Yes, that Florence Nightingale!
null
CC BY-SA 3.0
null
2010-12-21T11:49:21.513
2011-12-14T06:47:23.300
2011-12-14T06:47:23.300
183
null
null
5664
1
5665
null
6
409
I'm a complete newbie to statistics (although I find it really interesting!), and I have taken the task of distributing feedback to speakers of a conference I'm co-organizing. Each speaker was given a grade on the scale 1-5 from the participants, and we combine feedback from all participants into a mean score, for inst...
Is there a name for 10% best individual grades?
CC BY-SA 3.0
null
2010-12-21T13:18:15.667
2015-12-19T16:39:46.913
2015-12-19T16:39:46.913
28666
2470
[ "terminology", "quantiles" ]
5665
2
null
5664
9
null
If I understand you correctly, you may refer to [Percentiles](http://en.wikipedia.org/wiki/Percentile), perhaps espacially Quartiles. Perhaps you can elaborate a little more on which percentages should be enclosed in each bin, to get a more accurate answer. UPDATE: Based on the comments below decile seems to be the ter...
null
CC BY-SA 2.5
null
2010-12-21T13:37:09.843
2010-12-21T14:34:48.360
2010-12-21T14:34:48.360
442
442
null
5666
2
null
5654
2
null
Let's take a stab at a first-order approximation assuming simple random sampling and a constant proportion of infection for any treatment. Assume the sample size is large enough that a normal approximation can be used in a hypothesis test on proportions so we can calculate a z statistic like so $z = \frac{p_t - p_0}{\...
null
CC BY-SA 2.5
null
2010-12-21T14:10:44.480
2010-12-21T14:10:44.480
null
null
5792
null
5667
2
null
726
20
null
> The primary product of a research inquiry is one or more measures of effect size, not p values. Cohen, J. (1990). [Things I have learned (so far)](http://www.cps.nova.edu/marker/whatIhavelearnedsofarcohen.pdf). American Psychologist, 45, 1304-1312.
null
CC BY-SA 2.5
null
2010-12-21T15:48:06.727
2010-12-21T15:48:06.727
null
null
930
null
5668
2
null
5664
3
null
You have the answer you asked for, but along with how to communicate this information you might also want to think about how to asses the reliability & precision of the scores. If the evaluators aren't really using the same standards, the scores will furnish a misleading measure of the quality of the speakers no matter...
null
CC BY-SA 2.5
null
2010-12-21T16:02:19.503
2010-12-21T18:29:28.220
2010-12-21T18:29:28.220
11954
11954
null
5669
2
null
859
4
null
Look into models with spatially correlated errors (and spatially correlated covariates). A brief introduction, with references to [GeoDa](http://geodacenter.asu.edu/), is available [here](http://www.s4.brown.edu/s4/courses/SO261-John/lab9.pdf). There are plenty of texts; good ones are by [Noel Cressie](http://rads.st...
null
CC BY-SA 2.5
null
2010-12-21T16:08:11.367
2010-12-21T16:08:11.367
null
null
919
null
5670
2
null
5619
5
null
I see no obvious reason not to do so. As far as I know, we usually make a distinction between two kind of effect size (ES) measures for qualifying the strength of an observed association: ES based on $d$ (difference of means) and ES based on $r$ (correlation). The latter includes Pearson's $r$, but also Spearman's $\rh...
null
CC BY-SA 2.5
null
2010-12-21T16:44:46.750
2010-12-21T17:02:01.640
2010-12-21T17:02:01.640
930
930
null
5671
2
null
5207
3
null
In fact, you should not do MCMC, since your problem is so much simpler. Try this algorithm: Step 1: Generate a X from Log Normal Step 2: Keeping this X fixed, generate a Y from the Singh Maddala. Voilà! Sample Ready!!!
null
CC BY-SA 3.0
null
2010-12-21T17:16:52.633
2018-02-24T13:37:18.813
2018-02-24T13:37:18.813
7224
2472
null
5672
2
null
5054
1
null
Maybe I'm missing something here, but if you plot the number of times these hashtags are mentioned over time, shouldn't that tell you something? Of course, maybe you need automated processing. In that case fit splines to these series, and take the derivative. (They are easy : just look up what the Function Data Analyst...
null
CC BY-SA 2.5
null
2010-12-21T17:23:16.220
2010-12-21T17:23:16.220
null
null
2472
null
5675
1
5676
null
4
1001
When computing a confidence interval of slope in linear regression, should you use the z- or t-statistic?
Confidence interval of slope in linear regression
CC BY-SA 2.5
null
2010-12-21T19:37:50.770
2010-12-22T07:04:10.727
2010-12-21T20:59:47.620
null
1395
[ "regression", "confidence-interval" ]
5676
2
null
5675
5
null
If you're doing linear regression using least squares, you should use base confidence intervals on Student's t-distribution.
null
CC BY-SA 2.5
null
2010-12-21T19:43:52.090
2010-12-21T19:43:52.090
null
null
449
null
5677
2
null
5675
5
null
Rule of thumb: Use Student's t distribution if you must estimate the variance. Since the distribution's variance is estimated (not known), you should use Student's t distribution rather than the standard normal distribution (z), which requires a known variance. Although the t distribution becomes almost exactly the sam...
null
CC BY-SA 2.5
null
2010-12-21T20:10:22.910
2010-12-21T21:18:12.697
2010-12-21T21:18:12.697
1583
1583
null
5678
2
null
5054
1
null
As far as I can tell from my reading, a common method for determining a time series' trend is to smooth the series, perhaps in an iterated fashion, as in: [A Pakistan SBP paper](http://www.sbp.org.pk/departments/stats/sam.pdf). In the Seasonal Adjustment Methodology section, it describes how X-12 ARIMA does it, though ...
null
CC BY-SA 2.5
null
2010-12-21T20:21:54.227
2010-12-21T20:55:04.573
2010-12-21T20:55:04.573
1764
1764
null
5679
2
null
5675
3
null
Depends on assumptions on your disturbances. If they are normal and homoscedastic, then yes use t-statistic. In economic applications though these assumptions rarely hold, so in that case I would suggest using z-statistic with [robust standard errors](http://en.wikipedia.org/wiki/White_standard_errors).
null
CC BY-SA 2.5
null
2010-12-21T21:10:43.467
2010-12-22T07:04:10.727
2010-12-22T07:04:10.727
2116
2116
null
5680
1
5946
null
32
151636
I have analyzed an experiment with a repeated measures ANOVA. The ANOVA is a 3x2x2x2x3 with 2 between-subject factors and 3 within (N = 189). Error rate is the dependent variable. The distribution of error rates has a skew of 3.64 and a kurtosis of 15.75. The skew and kurtosis are the result of 90% of the error rate me...
Can I trust ANOVA results for a non-normally distributed DV?
CC BY-SA 2.5
null
2010-12-21T21:38:00.003
2019-05-08T13:47:21.173
null
null
2322
[ "anova", "normality-assumption" ]
5681
1
null
null
1
125
Measurement outcome is a continuous number measured in $p$ locations. This yields a vector $X_1$ to $X_p$ per subject. These vectors are obtained on $N$ subjects. In addition these $N$ subjects come from $k$ groups. What method should I use to compare the average vector across the entire study population to an hypothes...
Comparing a vector of averages to a null one
CC BY-SA 2.5
null
2010-12-22T00:04:01.290
2010-12-22T11:47:26.107
2010-12-22T11:31:41.020
null
null
[ "multiple-comparisons", "multivariate-analysis" ]
5682
1
6236
null
7
3016
I was wondering if anyone had experience with SAS/IML and R, and can give some pointers as to the relative advantages/disadvantages of the two. I've used R extensively for programming and statistical analyses, but haven't had much experience with IML. However, as this company is a SAS shop, I'm likely to have to use it...
SAS/IML compared to R
CC BY-SA 2.5
null
2010-12-22T01:19:57.423
2019-02-14T17:43:29.250
null
null
1569
[ "r", "sas" ]