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
4821
2
null
4816
24
null
The Sharpest bound I know is that of [Massart and Laurent](https://projecteuclid.org/journals/annals-of-statistics/volume-28/issue-5/Adaptive-estimation-of-a-quadratic-functional-by-model-selection/10.1214/aos/1015957395.full) Lemma 1 p1325. A corollary of their bound is: $$P(X-k\geq 2\sqrt{kx}+2x)\leq \exp (-x) $$ $$P...
null
CC BY-SA 4.0
null
2010-11-23T12:02:06.880
2022-08-12T20:27:22.900
2022-08-12T20:27:22.900
79696
223
null
4822
2
null
4818
16
null
A close-to-intuitive answer: Take a closer look at the formula for the McNemar test, given the table ``` pos | neg ----|-----|----- pos | a | b ----|-----|----- neg | c | d ``` The McNemar statistic `M` is calculated as: $$ M = {(b-c)^2 \over b+c} $$ The definition of a $\chi^2$ distribution with k degree...
null
CC BY-SA 2.5
null
2010-11-23T12:33:32.047
2010-11-23T21:09:56.640
2010-11-23T21:09:56.640
1124
1124
null
4823
1
4824
null
13
43131
I've got a dataframe like the following: ``` case simulation temp plank oxygen 1 1 1 8 7 11 2 2 1 16 10 15 ... 17 17 2 26 12 17 18 18 2 15 8 12 19 19 2 28 11 21 20 20 2 24 6 14 ``` I'd lik...
Automatically produce summary by factor variable in R
CC BY-SA 2.5
null
2010-11-23T12:44:40.340
2010-11-23T14:31:45.363
null
null
261
[ "r" ]
4824
2
null
4823
19
null
Check out the `by()` or `tapply()` functions. Basically, ``` tapply(y, g, mean) ``` will give you the mean of `y` by levels of `g`. If you want to get a data.frame from the resulting aggregated measures, use `aggregate()`. A more elaborated solution is available through the `summary.formula()` function in the [Hmisc]...
null
CC BY-SA 2.5
null
2010-11-23T12:49:02.623
2010-11-23T12:49:02.623
null
null
930
null
4825
2
null
3113
7
null
Some people seem to use a concept of Pitman Asymptotic Relative Efficiency (ARE) to inflate the sample size obtained by using a sample size formula for a parametric test. Ironically, in order to compute it, one has to assume a distribution again... see e.g. [Sample size for the Mann-Whitney U test](http://www.childrens...
null
CC BY-SA 2.5
null
2010-11-23T14:04:56.840
2010-11-23T19:45:50.180
2010-11-23T19:45:50.180
1573
1573
null
4826
2
null
4823
3
null
package `doBy` has a `summaryBy` function that has a formula based syntax like the one you tried. Also, i think that question would have been better asked on stackexchange.
null
CC BY-SA 2.5
null
2010-11-23T14:31:45.363
2010-11-23T14:31:45.363
null
null
1979
null
4827
2
null
4817
7
null
Good (2005) defines the one-sample sign-test for the location parameter $\theta$ for a continuous symmetric variable $X$ as follows: - Take the difference $D_i$ of each observation to the location parameter $\theta_0$ under the null hypothesis. - Define an indicator variable $Z_i$ as $0$ when $D_i < 0$, and as $1$ wh...
null
CC BY-SA 2.5
null
2010-11-23T14:35:44.533
2010-11-23T15:31:39.493
2010-11-23T15:31:39.493
1909
1909
null
4828
2
null
4807
2
null
When I initially wrote the comments below I had assumed that the Heckman estimator could be used for dichotomous outcomes, but the second paper I cite says there is no direct analog. Hopefully someone can point to different and more applicable resources. I still leave my initial comment up as I still feel those papers ...
null
CC BY-SA 3.0
null
2010-11-23T15:05:47.490
2013-07-25T12:09:30.270
2013-07-25T12:09:30.270
930
1036
null
4829
2
null
4753
2
null
I might suggest non-negative matrix factorization. The iterative algorithm of Lee and Seung is easy to implement and should be amenable to sparse matrices (although it involves Hadamard products, which some sparse matrix packages may not support.).
null
CC BY-SA 2.5
null
2010-11-23T17:00:09.463
2010-11-23T17:00:09.463
null
null
795
null
4830
1
4873
null
13
7835
Full Disclosure: This is homework. I've included a link to the dataset ( [http://www.bertelsen.ca/R/logistic-regression.sav](http://www.bertelsen.ca/R/logistic-regression.sav) ) My goal is to maximize the prediction of loan defaulters in this data set. Every model that I have come up with so far, predicts >90% of non...
Better Classification of default in logistic regression
CC BY-SA 2.5
null
2010-11-23T17:35:51.753
2010-12-07T16:30:00.257
2010-11-24T11:46:49.317
159
776
[ "r", "logistic", "spss", "self-study" ]
4831
1
4833
null
51
42253
When transforming variables, do you have to use all of the same transformation? For example, can I pick and choose differently transformed variables, as in: Let, $x_1,x_2,x_3$ be age, length of employment, length of residence, and income. ``` Y = B1*sqrt(x1) + B2*-1/(x2) + B3*log(x3) ``` Or, must you be consistent wi...
Regression: Transforming Variables
CC BY-SA 3.0
null
2010-11-23T17:41:19.050
2021-05-20T11:40:23.770
2017-10-04T13:24:10.083
919
776
[ "r", "regression", "logistic", "data-transformation" ]
4832
1
4835
null
7
7205
In SPSS output there is a pretty little classification table available when you perform a logistic regression, is the same possible with R? If so, how? ![alt text](https://i.stack.imgur.com/yFS6P.jpg)
Logistic Regression: Classification Tables a la SPSS in R
CC BY-SA 2.5
null
2010-11-23T17:44:28.190
2010-11-23T21:33:23.423
2010-11-23T17:52:19.663
776
776
[ "r", "logistic", "spss" ]
4833
2
null
4831
71
null
One transforms the dependent variable to achieve approximate symmetry and homoscedasticity of the residuals. Transformations of the independent variables have a different purpose: after all, in this regression all the independent values are taken as fixed, not random, so "normality" is inapplicable. The main objectiv...
null
CC BY-SA 2.5
null
2010-11-23T17:55:52.673
2010-11-23T18:03:33.650
2010-11-23T18:03:33.650
919
919
null
4834
1
4836
null
8
2397
One of the assumptions for using the Wilcoxon sign-rank test is that the underlying distribution is continuous ([see here](http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test#Assumptions).) However, there are cases (for example, when analyzing Likert scale data) where this assumption might not necessarily hold. In ...
Alternative to the Wilcoxon test when the distribution isn't continuous?
CC BY-SA 2.5
null
2010-11-23T17:59:32.200
2010-11-23T18:18:57.223
2010-11-23T18:18:57.223
919
253
[ "r", "nonparametric", "sign-test", "wilcoxon-signed-rank" ]
4835
2
null
4832
8
null
I'm not aware of a specific command, but this might be a start: ``` # generate some data > N <- 100 > X <- rnorm(N, 175, 7) > Y <- 0.4*X + 10 + rnorm(N, 0, 3) # dichotomize Y > Yfac <- cut(Y, breaks=c(-Inf, median(Y), Inf), labels=c("lo", "hi")) # logistic regression > glmFit <- glm(Yfac ~ X, family=binomial(link="lo...
null
CC BY-SA 2.5
null
2010-11-23T18:00:23.230
2010-11-23T18:00:23.230
null
null
1909
null
4836
2
null
4834
7
null
I have found that the Wilcoxon statistic is still fine for this purpose and that small simulations do a good job of estimating the size and the power of the test. I suspect this is more powerful than just comparing the two medians. The main concern is lack of power due to extensive numbers of ties, but that concern a...
null
CC BY-SA 2.5
null
2010-11-23T18:17:49.580
2010-11-23T18:17:49.580
null
null
919
null
4837
2
null
4364
25
null
There's an entire book written about this: "Characterizations of the normal probability law", A. M. Mathai & G. Perderzoli. A brief review in [JASA (Dec. 1978)](http://www.jstor.org/pss/2286313) mentions the following: > Let $X_1, \ldots, X_n$ be independent random variables. Then $\sum_{i=1}^n{a_i x_i}$ and $\sum_{...
null
CC BY-SA 3.0
null
2010-11-23T18:37:54.900
2016-11-04T16:46:51.817
2016-11-04T16:46:51.817
1569
919
null
4838
2
null
47
2
null
This is problem with clustering, you can't tell what is considered a cluster. I would see what is the reason behind clustering users, specify my threshold value, and use hierarchical clustering. In my experience, one has to set either the number of cluster needed, or the threshold value (the distance value that binds t...
null
CC BY-SA 2.5
null
2010-11-23T18:59:58.170
2010-11-23T18:59:58.170
null
null
2108
null
4839
1
null
null
4
1870
I have a survey where I have asked people which type of computer games they enjoy and whether they consider themselves a hardcore gamer. I allowed people to select multiple genres, but now I am unsure what to do with my data. I initially thought factor analysis, with the idea being if there were genres that belonged to...
Whether to use factor analysis based on binary multiple response data?
CC BY-SA 3.0
null
2010-11-23T19:10:52.133
2019-07-20T21:48:37.407
2019-07-20T21:48:37.407
11887
2127
[ "binary-data", "factor-analysis", "survey", "correspondence-analysis" ]
4840
1
null
null
1
235
my friend is a chemist and his problem is to predict the level of ozone concentration in a single site. We have the data for the last 12 years. We want to predict the concentration for the coming years (as much as possible). I know this data set is small, so my question is is this possible? And how much of data is requ...
How to predict Ozone concentration in few years time?
CC BY-SA 2.5
null
2010-11-23T19:11:35.047
2011-05-19T21:20:30.913
2010-11-27T15:10:15.177
2108
2108
[ "machine-learning", "forecasting", "predictive-models" ]
4841
2
null
4803
3
null
A Gamma distribution with an integer shape parameter is an [Erlang distribution](http://en.wikipedia.org/wiki/Erlang_distribution) which in turn is a generalization of the Exponential distribution often used to model waiting times. Thus, perhaps one approach is to use an Erlang distribution instead of a Gamma to model ...
null
CC BY-SA 2.5
null
2010-11-23T20:00:49.273
2010-11-23T20:00:49.273
null
null
null
null
4842
2
null
4818
8
null
Won't the two approaches come to the same thing? The relevant chi-square distribution has one degree of freedom so is simply the distribution of the square of a random variable with a standard normal distribution. I'd have to go through the algebra to check, which I haven't got time to do right now, but I'd be surprise...
null
CC BY-SA 2.5
null
2010-11-23T20:23:40.877
2010-11-23T20:23:40.877
null
null
449
null
4843
1
4848
null
3
2477
The "standard" way to compute Kappa for a predictive classification model (Witten and Frank page 163) is to construct the random confusion matrix in such a way that the number of predictions for each class is the same as the model predicted. For a visual, see (right side is the random): ![alt text](https://i.stack.img...
Kappa for Predictive Model
CC BY-SA 2.5
null
2010-11-23T20:47:07.533
2010-11-23T22:09:40.567
2010-11-23T21:30:51.223
2040
2040
[ "predictive-models" ]
4844
1
null
null
5
1780
I have a timeseries of data which was gathered by driving a car around randomly. One data point was gathered every minute and each data point is either "Yes" or "No". Yes = temperature is above a threshold, No = it is below the threshold. Assume the car never stops. I'm interested in the proportion of Yeses and relat...
Confidence interval based on time series
CC BY-SA 2.5
null
2010-11-23T20:52:02.350
2022-08-18T20:59:10.793
2010-11-23T20:58:18.350
null
1784
[ "time-series", "confidence-interval", "independence" ]
4845
2
null
4830
4
null
I'm not a logistic regression expert, but isn't it just a problem of unbalanced data? Probably you have much more non-defaulters than defaulters what may shift the prediction to deal better with larger class. Try to kick out some non-defaulters and see what happens.
null
CC BY-SA 2.5
null
2010-11-23T20:53:52.237
2010-11-23T20:53:52.237
null
null
null
null
4846
2
null
4832
5
null
Thomas D. Fletcher has a function called `ClassLog()` (for "classification analysis for a logistic regression model") in his [QuantPsyc](http://cran.r-project.org/web/packages/QuantPsyc/) package. However, I like @caracal's response because it is self-made and easily customizable.
null
CC BY-SA 2.5
null
2010-11-23T21:33:23.423
2010-11-23T21:33:23.423
null
null
930
null
4847
2
null
4843
2
null
This is just an outer product of actual and predicted class frequencies times all objects count. In R: ``` A<-c(100,60,40) P<-c(120,60,20) numCases<-sum(A) #=sum(P) also (A/numCases)%o%(P/numCases)*numCases A%o%P/numCases #same simplified ```
null
CC BY-SA 2.5
null
2010-11-23T21:34:43.747
2010-11-23T21:34:43.747
null
null
null
null
4848
2
null
4843
6
null
It might be useful to consider Cohen's $\kappa$ in the context of inter-rater-agreement. Suppose you have two raters individually assigning the same set of objects to the same categories. You can then ask for overall agreement by dividing the sum of the diagonal of the confusion matrix by the total sum. But this does n...
null
CC BY-SA 2.5
null
2010-11-23T21:53:33.310
2010-11-23T22:09:40.567
2010-11-23T22:09:40.567
1909
1909
null
4849
2
null
4839
4
null
Correspondence analysis might be a good fit. Creating a graph that shows the relationship between Hard-Core gaming (or not) and the different types of games that they are playing. The result would be the ability to say with cautious confidence that Hard Core Gamers play a certain group of game types (or not). With res...
null
CC BY-SA 2.5
null
2010-11-23T22:12:47.053
2010-11-23T22:12:47.053
2017-04-13T12:44:46.680
-1
776
null
4850
2
null
1525
27
null
I have hesitated to wade into this discussion, but because it seems to have gotten sidetracked over a trivial issue concerning how to express numbers, maybe it's worthwhile refocusing it. A point of departure for your consideration is this: > A probability is a hypothetical property. Proportions summarize observatio...
null
CC BY-SA 3.0
null
2010-11-23T22:38:38.997
2013-12-10T15:01:22.863
2020-06-11T14:32:37.003
-1
919
null
4851
1
4853
null
4
397
I'm trying to precompute the distributions of several random variables. In particular, these random variables are the results of functions evaluated at locations in a genome, so there will be on the order of 10^8 or 10^9 values for each. The functions are pretty smooth, so I don't think I'll lose much accuracy by only ...
Efficient Empirical CDF Computation / Storage
CC BY-SA 2.5
null
2010-11-23T23:02:12.753
2010-11-23T23:29:44.537
null
null
2111
[ "distributions", "python", "bioinformatics", "cumulative-distribution-function", "biostatistics" ]
4852
2
null
4851
2
null
Here's a possible computing solution to your problem. If the pdf is sparse (by sparse I mean that long stretches are zero) as your graph indicates, then you could perhaps exploit that structure. For example, you could have one vector which gives the pdf for non-zero regions and another vector indicating where the non-z...
null
CC BY-SA 2.5
null
2010-11-23T23:28:58.350
2010-11-23T23:28:58.350
null
null
8
null
4853
2
null
4851
6
null
Why not create bins a priori to cover the expected range of a variable, scan through the data once to record all the bin counts, and then estimate the percentiles via interpolation of the EDF? If the bins are evenly distributed, locating the bin for a value is a $O(1)$ operation; in the worst case it's a binary search...
null
CC BY-SA 2.5
null
2010-11-23T23:29:44.537
2010-11-23T23:29:44.537
null
null
919
null
4854
1
4861
null
26
17819
In Logistic Regression, is there a need to be as concerned about multicollinearity as you would be in straight up OLS regression? For example, with a logistic regression, where multicollinearity exists, would you need to be cautious (as you would in OLS regression) with taking inference from the Beta coefficients? Fo...
Logistic Regression - Multicollinearity Concerns/Pitfalls
CC BY-SA 2.5
null
2010-11-23T23:50:10.213
2013-05-31T08:26:39.323
2010-11-24T15:01:27.013
919
776
[ "regression", "logistic", "multicollinearity" ]
4855
2
null
4839
6
null
The first step is to define your research question. A few possible research questions given your data include: - How can genres of video games be grouped into a smaller set? - How are genres of video games or groups of genres related to self-identifying as a hard-core gamer? Then, you could present a table of frequ...
null
CC BY-SA 2.5
null
2010-11-24T01:22:36.983
2010-11-24T07:56:08.127
2010-11-24T07:56:08.127
930
183
null
4856
1
4857
null
3
2580
How can I rewrite an AR(p) model in state-space form? Max(p)=5 and I want to use Kalman Predictor.
Rewriting AR model in State-Space form
CC BY-SA 2.5
null
2010-11-24T01:36:32.617
2010-11-24T12:49:59.810
null
null
1637
[ "time-series", "kalman-filter" ]
4857
2
null
4856
4
null
I suggest you buy the excellent book by G. Petris, S. Petrone and P. Campagnoli [Dynamic Linear Models with R](http://www.springer.com/statistics/statistical+theory+and+methods/book/978-0-387-77237-0). You will learn that any ARMA model $Y_t = \sum_{j=1}^{r}\phi_jY_{t-j} + \sum_{j=1}^{r-1}\psi_{j}\epsilon_t$ can be e...
null
CC BY-SA 2.5
null
2010-11-24T02:11:51.600
2010-11-24T10:57:39.583
2010-11-24T10:57:39.583
1709
1709
null
4858
1
null
null
10
8633
I have been reading a good book called [Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence](http://gseacademic.harvard.edu/alda/) by Judith Singer and John Willet. The book shows that by modeling in 2 levels, we can model the individual change in level 1 and in level 2 model for systematic interin...
How to test random effects in a multilevel model in R
CC BY-SA 3.0
null
2010-11-24T04:12:41.550
2013-07-01T02:02:33.493
2013-07-01T02:02:33.493
7290
1663
[ "r", "hypothesis-testing", "mixed-model", "multilevel-analysis", "panel-data" ]
4859
2
null
4830
2
null
You might just try including all of the interaction effects. You can then use L1/L2-regularized logistic regression to minimize over-fitting and take advantage of any helpful features. I really like Hastie/Tibshirani's glmnet package (http://cran.r-project.org/web/packages/glmnet/index.html).
null
CC BY-SA 2.5
null
2010-11-24T04:31:36.440
2010-11-24T04:31:36.440
null
null
2077
null
4860
2
null
3061
4
null
This statistic measures a [kind of correlation](http://www.jstor.org/pss/2532051) between two sets of data. Its calculation requires no assumptions about what their scatterplot looks like (if that's what you mean by "tendency").
null
CC BY-SA 2.5
null
2010-11-24T05:05:17.127
2010-11-24T05:05:17.127
null
null
919
null
4861
2
null
4854
21
null
All of the same principles concerning multicollinearity apply to logistic regression as they do to OLS. The same diagnostics assessing multicollinearity can be used (e.g. VIF, condition number, auxiliary regressions.), and the same dimension reduction techniques can be used (such as combining variables via principal co...
null
CC BY-SA 2.5
null
2010-11-24T05:13:29.350
2010-11-24T13:14:11.800
2017-04-13T12:44:21.160
-1
1036
null
4862
2
null
4858
3
null
One of the best resources on multilevel analysis in R is John Fox's web appendix to the text "An R and S-PLUS Companion to Applied Regression". It provides a great overview of the method and means to calculate some of the more familiar measures from the R NLME output. The appendix is available on CRAN. Here is the li...
null
CC BY-SA 2.5
null
2010-11-24T05:32:41.863
2010-11-24T05:32:41.863
null
null
485
null
4863
2
null
4810
2
null
I guess it depends on what statistics or findings you are going to find out, research, study, or report. I'm assuming you will prob be using these graphs to represent findings for your university topic, right? Like for example, if you want to present your finding about say, 'How long users stays on a a certain website...
null
CC BY-SA 2.5
null
2010-11-24T05:35:57.333
2010-11-24T05:35:57.333
null
null
null
null
4864
2
null
4830
2
null
I know your question is about logistic regression and as it is a homework assignment so your approach may be constrained. However, if your interest is in interactions and accuracy of classification, it might be interesting to use something like CART to model this. Here's some R code to do produce the basic tree. I've...
null
CC BY-SA 2.5
null
2010-11-24T05:41:16.503
2010-11-24T06:51:58.127
2010-11-24T06:51:58.127
485
485
null
4866
2
null
4858
5
null
The `intervals()` function should provide you with $100(1-\alpha)$ confidence intervals for the random effects in your model, see `help(intervals.lme)` for more information. You can also test if any of the variance components can be droped from the model by using `anova()` (which amounts to do an LRT between two nested...
null
CC BY-SA 2.5
null
2010-11-24T07:54:23.777
2010-11-24T07:54:23.777
null
null
930
null
4867
2
null
4839
3
null
As an alternative to CA suggested by @Brandon, you could also try [Multiple Correspondence Analysis](http://en.wikipedia.org/wiki/Multiple_correspondence_analysis) which has the advantage of considering all types of games at the same time (unlike CA), which are probably scored as binary variable (in this case, the MCA ...
null
CC BY-SA 2.5
null
2010-11-24T08:13:19.087
2010-11-24T08:13:19.087
null
null
930
null
4868
1
4871
null
6
2250
Is it possible to do k-fold cross-validation to test all data, rather than using kfcv to find the optimal hypothesis as is typically done. Example: Say I want to use a svms on a dataset of size 1000. Could I use 900 events to train the svm for the testing of the other 100 events. Then use a separate 900 events to train...
Using k-fold cross-validation to test all data
CC BY-SA 2.5
null
2010-11-24T08:47:26.607
2012-08-19T15:38:39.877
2010-11-24T12:47:15.397
null
2113
[ "machine-learning", "cross-validation" ]
4869
2
null
4184
2
null
The paper [http://www.ricam.oeaw.ac.at/Groebner-Bases-Bibliography/gbbib_files/publication_582.pdf](http://www.ricam.oeaw.ac.at/Groebner-Bases-Bibliography/gbbib_files/publication_582.pdf) by Pistone et al seems to be the source paper for this.
null
CC BY-SA 2.5
null
2010-11-24T08:52:57.620
2010-11-24T08:52:57.620
null
null
null
null
4870
2
null
4858
19
null
First point: You need to be careful if you want to test whether the variance of a random effect is 0: The standard $\chi^2$-asymptotics for the LR that are used in `anova()` do not apply for LRTs or restricted likelihood ratio tests on variance components since the null hypothesis is on the edge of the parameter space...
null
CC BY-SA 2.5
null
2010-11-24T09:28:58.507
2010-11-24T09:28:58.507
null
null
1979
null
4871
2
null
4868
6
null
As far as I understand your question, it can be formulated this way: Instead of calculating a quality measure for each of the k validation-folds and then calculate the average, may I aggregate all folds an then calculate my quality measure, hence getting only one instead of k values? This question requires two perspect...
null
CC BY-SA 2.5
null
2010-11-24T10:43:38.363
2010-11-24T12:48:29.310
2010-11-24T12:48:29.310
null
264
null
4872
1
null
null
2
331
what is the minimum entry degree to be employed as a statistician
degree to become a statistician
CC BY-SA 2.5
null
2010-11-24T10:56:16.390
2010-11-24T10:56:16.390
null
null
null
[ "careers" ]
4873
2
null
4830
8
null
In unbalanced datasets such as this, you can usually improve classification performance by moving away from using a fitted probability of .5 as your cutpoint for classifying cases into defaulters and non-defaulters. For example, I get correct classification rates of .88 and .58 with a cutpoint of .4 for a glm with all ...
null
CC BY-SA 2.5
null
2010-11-24T11:43:04.703
2010-11-24T11:43:04.703
null
null
1979
null
4874
2
null
4868
1
null
Yes it is; and while this is a very reliable way of reporting error, I would say it is even encouraged.
null
CC BY-SA 2.5
null
2010-11-24T12:43:13.730
2010-11-24T12:43:13.730
null
null
null
null
4875
2
null
4856
4
null
Another good book that covers this is [Time Series Analysis by State Space Methods](http://rads.stackoverflow.com/amzn/click/0198523548) by Durbin and Koopman (pp 46-49.)
null
CC BY-SA 2.5
null
2010-11-24T12:49:59.810
2010-11-24T12:49:59.810
null
null
439
null
4876
1
null
null
0
75
I am trying to track the performance of a set of homogeneous subsystems vs the system as a whole. The performance metric is measured by a mean value based on a set of tasks performed by a the subsystem, for example, the mean wait time before scheduling task. Each subsystem may be responsible for varying numbers of task...
Comparing and visualizing rates of subsystems
CC BY-SA 2.5
null
2010-11-24T13:20:08.147
2010-11-24T16:15:31.593
null
null
2122
[ "data-visualization", "mean" ]
4877
1
4879
null
3
13448
I have imported a datafile in R. It has different columns. There is one column that has the name of Operating System belonging to that row information. I wanted to get the percentage share of each unique OS (windows, linux, ios etc) from this column and plot it. I am very new to R and would like to know if there is any...
Creating plots for String type columns in R
CC BY-SA 2.5
null
2010-11-24T14:15:28.017
2010-11-24T20:49:04.323
2010-11-24T14:56:18.557
2101
2101
[ "r", "data-visualization" ]
4878
1
null
null
2
4190
We're using Excel Solver to model a DEA problem. We've worked with a few resources and feel confident that the model is returning correct results but I need some help interpreting them. When solver completes its analysis, it provides an answer report that gives the slack found in some of the constraints -- which are b...
Slack values in Data Envelopment Analysis
CC BY-SA 2.5
null
2010-11-24T14:21:34.157
2010-11-24T15:44:21.667
2010-11-24T15:16:06.487
null
1256
[ "econometrics", "excel" ]
4879
2
null
4877
2
null
It seems the `barplot()` will be your friend in that case, e.g. ``` x <- sample(c("Win","Linux","Mac"), 100, replace=TRUE) barplot(table(x)) ``` This will work for variables of type `character` or `factor`. Another option is to use Cleveland's [dotplot](http://www.b-eye-network.com/view/2468), see `dotchart()` (or `do...
null
CC BY-SA 2.5
null
2010-11-24T14:29:50.333
2010-11-24T15:04:50.940
2010-11-24T15:04:50.940
930
930
null
4880
2
null
4877
4
null
Simulating some data for a good start ``` x<-sample(c("Win","Linux","Mac"),721,replace=TRUE) ``` The good practice is to hold such categorical variables as factors; one can convert character vector to factor with `factor` function: ``` x<-factor(x) ``` Then, `plot` called on it will make a barplot with counts; to con...
null
CC BY-SA 2.5
null
2010-11-24T15:06:04.903
2010-11-24T20:49:04.323
2010-11-24T20:49:04.323
930
null
null
4881
2
null
4878
3
null
As I understand data envelopment analysis, you optimize efficiency of the decision making unit (DMU) subject to a set of constraints on input availability and output requirements. Since you have identified the maximum efficiency the non-binding input constraints indicate that the amount of slack in inputs is unnecessa...
null
CC BY-SA 2.5
null
2010-11-24T15:30:23.087
2010-11-24T15:30:23.087
null
null
null
null
4882
2
null
4878
3
null
> Is it correct to assert that those inputs found to be binding could not be further optimized but those that contained slack are where the inefficiencies are found? First of all, this is a multivariate problem, so it is really hard to conclude anything about individual inputs/outputs. However I would rather say the...
null
CC BY-SA 2.5
null
2010-11-24T15:44:21.667
2010-11-24T15:44:21.667
null
null
279
null
4883
2
null
4876
2
null
It sounds like you should lookup the topic of [statistical process control](http://en.wikipedia.org/wiki/Statistical_process_control). Its origins lie in manufacturing where deviations from expected process output are used to raise flags to ensure that quality of manufactured items is as per pre-established norms. In p...
null
CC BY-SA 2.5
null
2010-11-24T16:15:31.593
2010-11-24T16:15:31.593
null
null
null
null
4884
1
9742
null
5
2212
Hello fellow number crunchers I hope this a valid question for this forum. I am a lonesome quarter-statistician and have trouble finding someone to ask. Introduction: - Wikipedia Explanation of AB-Tests - A ton of examples for typical use of AB-Tests The AB-Test has become really popular since it is so easy to impl...
Aggregation-Level in AB-Tests
CC BY-SA 2.5
null
2010-11-24T16:23:43.947
2022-02-04T12:00:11.743
2011-05-09T17:54:04.670
1036
264
[ "hypothesis-testing", "aggregation", "ab-test" ]
4885
2
null
4810
19
null
It's partly a matter of taste and convention, but theory, attention to your objectives, and a smidgen of cognitive neuroscience [see the references] can provide some guidance. Because a pdf and a cdf convey the same information, the distinction between them arises from how they do it: a pdf represents probability with...
null
CC BY-SA 3.0
null
2010-11-24T16:29:10.620
2012-05-01T19:32:12.390
2012-05-01T19:32:12.390
919
919
null
4886
1
4888
null
3
292
I have a data set that I need to analyze in R. A simplified version of it would be like this ``` SessionNo. Objects OtherColumns A 2 . A 3 B 4 C 1 D 2 D 1 D 2 D 3 E 5 ``` here each ...
Getting aggregated share in R
CC BY-SA 2.5
null
2010-11-24T17:33:01.623
2010-11-25T13:46:52.060
null
null
2101
[ "r", "aggregation" ]
4887
2
null
4886
2
null
If I am reading your question correctly, something like the following should do it: `aggregate(x$Objects,by=list(x$SessionNo.),sum)` where `x` is the data frame containing your data. This will give you, for each unique session number, the sum of the object counts. You can of course substitute other functions (including...
null
CC BY-SA 2.5
null
2010-11-24T17:45:13.697
2010-11-25T07:42:10.487
2010-11-25T07:42:10.487
439
439
null
4888
2
null
4886
3
null
Perhaps this might help: ``` tapply(df$Objects, df$SessionNo., sum) ```
null
CC BY-SA 2.5
null
2010-11-24T17:48:57.147
2010-11-25T10:31:03.683
2010-11-25T10:31:03.683
1050
1050
null
4889
2
null
4886
1
null
I personally like using the plyr and or reshape packages for tasks like this. If you're just starting with R, I would highly recommend getting to know them well. They've solved nearly all of my data manipulation tasks. ``` ddply(df, .(sessionNo.) function(x) data.frame( obj.count=sum(Objects) )) ``` OR, cast ``` colna...
null
CC BY-SA 2.5
null
2010-11-24T17:53:47.613
2010-11-25T02:08:57.187
2010-11-25T02:08:57.187
776
776
null
4890
2
null
4884
1
null
The right level of aggregation depends on the time period over which you wish to generalize. For example, you want to deploy A during nights across several sites but are unsure about its effectiveness relative to the existing option B. Thus, you may deploy A over a small number of sites and see its effects relative to...
null
CC BY-SA 2.5
null
2010-11-24T18:09:45.540
2010-11-24T18:09:45.540
null
null
null
null
4891
2
null
4810
8
null
I agree with whuber's answer, but have one additional minor point: The CDF has a simple non-parametric estimator that needs no choices to be made: the [empirical distribution function](http://en.wikipedia.org/wiki/Empirical_distribution_function). It's not quite so simple to estimate a PDF. If you use a histogram you n...
null
CC BY-SA 2.5
null
2010-11-24T18:41:20.210
2010-11-24T18:41:20.210
null
null
449
null
4892
1
5052
null
7
6672
What is the [VC dimension](http://en.wikipedia.org/wiki/VC_dimension) of [SVM](http://en.wikipedia.org/wiki/Support_vector_machine) with the polynomial kernel $k(x,x')=(1+<x,x'>_{\mathbb{R^{2}}})^{2}$ for binary classification in $\mathbb{R^{2}}$? It would be equal or more than v iff there exists a set of v points such...
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$
CC BY-SA 2.5
null
2010-11-24T18:47:26.677
2017-05-23T17:29:05.427
2015-09-30T03:42:36.400
12359
1351
[ "self-study", "classification", "svm", "kernel-trick", "vc-dimension" ]
4893
2
null
4892
4
null
If I'm not mistaken: $[1 + \langle x,y\rangle]^2$ = $\langle[1, \sqrt{2}y_1, y_1^2, \sqrt{2}y_2, y_2^2, \sqrt{2}y_1y_2], [1, \sqrt{2}x_1, x_1^2, \sqrt{2}x_2, x_2^2, \sqrt{2}x_1x_2]^T\rangle$ So the separating rule is linear in $R^6$. Consequently, VC-dim is 7.
null
CC BY-SA 3.0
null
2010-11-24T20:21:22.247
2017-05-23T17:29:05.427
2017-05-23T17:29:05.427
86522
1725
null
4894
2
null
4858
11
null
(I would post this as a comment to the previous answer by 'chi', but don't see that that is possible here.) Be very careful with `intervals()` and `anova()` from the `nlme` package, these have exactly the flaws that @fabians points out above -- they rely on the standard chi-squared distribution applied to a quadratic a...
null
CC BY-SA 2.5
null
2010-11-24T20:48:13.937
2010-11-24T20:48:13.937
null
null
2126
null
4895
2
null
118
30
null
The answer that best satisfied me is that it falls out naturally from the generalization of a sample to n-dimensional euclidean space. It's certainly debatable whether that's something that should be done, but in any case: Assume your $n$ measurements $X_i$ are each an axis in $\mathbb R^n$. Then your data $x_i$ define...
null
CC BY-SA 2.5
null
2010-11-24T20:49:39.210
2010-11-24T20:49:39.210
null
null
2456
null
4896
2
null
4886
2
null
The function that is specifically designed for this task is ave(). By default it returned the mean within a group and returns a vector of the same length as the two input arguments. It is designed to fill in columns of either means or deviations from means. If this is in a dataframe with name "tst": ``` > tst$tmn <- wi...
null
CC BY-SA 2.5
null
2010-11-25T00:00:21.353
2010-11-25T00:00:21.353
null
null
2129
null
4897
2
null
4663
10
null
LASSO is not an algorithm per se, but an operator. There are many different ways to derive efficient algorithms for $\ell_1$ regularized problems. For instance, one can use quadratic programming to them tackle directly. I guess this is what you refer to as LASSO. Another one is LARS, very popular because of its simpl...
null
CC BY-SA 2.5
null
2010-11-25T00:29:06.963
2010-11-25T00:29:06.963
null
null
358
null
4898
1
4917
null
12
4150
If you choose to analyse a pre-post treatment-control design with a continuous dependent variable using a mixed ANOVA, there are various ways of quantifying the effect of being in the treatment group. The interaction effect is one main option. In general, I particularly like Cohen's d type measures (i.e., ${\frac{\mu_1...
Effect size for interaction effect in pre-post treatment-control design
CC BY-SA 2.5
null
2010-11-25T01:33:26.563
2011-04-19T02:15:25.713
null
null
183
[ "anova", "mixed-model", "effect-size", "cohens-d" ]
4899
2
null
118
11
null
Estimating the standard deviation of a distribution requires to choose a distance. Any of the following distance can be used: $$d_n((X)_{i=1,\ldots,I},\mu)=\left(\sum | X-\mu|^n\right)^{1/n}$$ We usually use the natural euclidean distance ($n=2$), which is the one everybody uses in daily life. The distance that you pro...
null
CC BY-SA 3.0
null
2010-11-25T03:01:40.620
2014-07-31T17:00:06.640
2014-07-31T17:00:06.640
5176
1709
null
4900
2
null
4898
3
null
I believe that generalized eta-square ([Olejnik & Algena, 2003](http://www.ncbi.nlm.nih.gov/pubmed/14664681); [Bakeman, 2005](http://brm.psychonomic-journals.org/content/37/3/379)) provides a reasonable solution to the quantification of effect size that generalizes across between-Ss and within-Ss designs. If I read tho...
null
CC BY-SA 2.5
null
2010-11-25T03:49:17.473
2010-11-25T03:49:17.473
null
null
364
null
4901
1
4940
null
44
36762
Other than literally testing each possible combination of variable(s) in a model (`x1:x2` or `x1*x2 ... xn-1 * xn`). How do you identify if an interaction SHOULD or COULD exist between your independent (hopefully) variables? What are best practices in attempting to identify interactions? Is there a graphical technique...
What are best practices in identifying interaction effects?
CC BY-SA 3.0
null
2010-11-25T05:32:53.903
2020-08-14T22:49:38.713
2011-09-27T05:28:07.813
183
776
[ "regression", "modeling", "interaction" ]
4902
2
null
4901
8
null
How large is $n$ ? how many observations do you have ? this is crucial ... Sobol indices will tell you the proportion of variance explained by interaction if you have a lot of observations and a few $n$, otherwise you will have to do modelling (linear to start with). You have a nice R package for that called sensitivi...
null
CC BY-SA 3.0
null
2010-11-25T07:07:59.057
2016-04-21T09:55:28.640
2016-04-21T09:55:28.640
17230
223
null
4903
2
null
4901
17
null
My best practice would be to think about the problem to hand before fitting the model. What is a plausible model given the phenomenon you are studying? Fitting all possible combinations of variables and interactions sounds like data dredging to me.
null
CC BY-SA 2.5
null
2010-11-25T07:50:59.160
2010-11-25T07:50:59.160
null
null
1390
null
4904
1
4905
null
6
1636
I'm searching for a statistical method to determine if a player is cheating in an online game. The game is a Quake3 like game (ego-shooter). Given a number of positive points and a number of negative points per player (score) and given n players (n<=64). The score comes together like this (positive/negative seen from ...
Method to reliably determine abnormal statistical values
CC BY-SA 2.5
null
2010-11-25T11:16:41.540
2010-12-03T04:58:22.370
2010-11-25T11:21:15.593
2132
2132
[ "outliers" ]
4905
2
null
4904
11
null
Your use of the stddev indicates you look at every variable seperately. If you look at them together, you might have more chance. An outlier in one dimension can be coincidence, an outlier in more dimensions is more surely an anomaly. I don't know much about games, but I reckon that you could use find extra variables l...
null
CC BY-SA 2.5
null
2010-11-25T12:01:24.780
2010-11-25T12:46:04.647
2010-11-25T12:46:04.647
1124
1124
null
4906
2
null
4886
1
null
I often use `by`, which is a wrapper around `tapply`. Result is a list with a weee different print method compared to `tapply`. ``` df <- data.frame(SessionNo. = sample(x = c("A", "B", "C", "D", "E"), size = 20, replace = TRUE, prob = c(0.05, 0.1, 0.4, 0.4, 0.05)), Objects = samp...
null
CC BY-SA 2.5
null
2010-11-25T13:46:52.060
2010-11-25T13:46:52.060
null
null
144
null
4907
2
null
4901
17
null
Fitting a tree model (i.e. using R), will help you identify complex interactions between the explanatory variables. Read the example on page 30 [here](http://www.math.chs.nihon-u.ac.jp/%7Etanaka/files/kenkyuu/MultipleRegression.pdf).
null
CC BY-SA 4.0
null
2010-11-25T13:51:42.120
2020-08-14T18:30:10.400
2020-08-14T18:30:10.400
93702
339
null
4908
1
null
null
5
272
Lets imagine that we have some experiments. Each experiment may result in one of the outcomes: A, B, C. So we have probabilities distribution for each experiment $P_A, P_B, P_C$ which is context-dependent. E.g.: - $Context_1 \Rightarrow \{P_A^1, P_B^1, P_C^1\},$ experimental outcome is A - $Context_2 \Rightarrow \{...
Chi-square analog for context-dependent distributions
CC BY-SA 2.5
null
2010-11-25T13:55:10.873
2010-11-28T23:09:43.057
2010-11-26T08:27:35.030
1314
1314
[ "distributions", "probability", "chi-squared-test", "predictor" ]
4909
1
null
null
6
3776
The empirical cumulative distribution function of a random variable, given observations $x_\left( k \right) > x_\left( k-1 \right)$, $k \in \mathbb N$, $k \le n$, is defined as $F_{emp}(x_\left( k \right) > X \ge x_\left( k-1 \right)) = \frac k {n+1}$ and $F_{emp}(X \ge x_\left(n\right))=1$. Why? As long as we're inter...
Interpolating the empirical cumulative function
CC BY-SA 2.5
null
2010-11-25T14:13:31.967
2019-09-27T16:39:20.190
2017-09-28T18:27:46.007
60613
2456
[ "estimation", "random-variable", "interpolation" ]
4910
2
null
4909
4
null
The EDF is the CDF of the population constituted by the data themselves. This is exactly what you need to describe and analyze any resampling process from the dataset, including nonparametric bootstrapping, jackknifing, cross-validation, etc. Not only that, it's perfectly general: any kind of interpolation would be i...
null
CC BY-SA 2.5
null
2010-11-25T14:34:31.573
2010-11-25T14:34:31.573
null
null
919
null
4911
2
null
4360
2
null
For the Bayesian explanation, you need a prior probability distribution on the reported results by a lying coin flipper, as well as a prior probability of lying. When you see a value that is much more likely under the lying distribution than the random flips one, that makes your posterior probability of lying much high...
null
CC BY-SA 2.5
null
2010-11-25T15:18:15.367
2010-11-25T15:18:15.367
null
null
2134
null
4912
1
4948
null
4
11715
Suppose my sample comprises 350 instances. Each instance has two independent binary (`pos` and `neg`) evaluations, A and B. If my alternative hypothesis is that A is more often positive than B, how would I express whether the difference is statistically significant? --- To be more precise on the data: This question ...
Calculating significance of difference between two binary values on one dataset
CC BY-SA 2.5
null
2010-11-25T16:32:33.287
2010-11-28T19:19:27.373
2010-11-25T20:28:48.560
1785
1785
[ "hypothesis-testing", "statistical-significance", "sample", "binary-data" ]
4913
2
null
4912
5
null
Your addendum suggests that A and B are dependent samples since they come from the same "instance", i.e., patient. In that case, I propose the McNemar-Test which tests for a (two-sided) hypothesis of unequal proportions: ``` > N <- 350 > A <- factor(rbinom(N, size=1, p=0.6), labels=c("pos", "neg")) > B <- fact...
null
CC BY-SA 2.5
null
2010-11-25T17:16:36.760
2010-11-25T20:10:00.573
2010-11-25T20:10:00.573
1909
1909
null
4914
1
null
null
5
528
In a data set with thousands of data points, I am testing different short-term and longer term data outputs based on 5 rolling data points all the way to 100 rolling data points (which each value being a separate column in excel: 5, 6,..., 100). The test I developed (with rudimentary knowledge of the whole thing) is t...
Developing a statistical test to ascertain better "fit"
CC BY-SA 2.5
null
2010-11-25T17:26:03.753
2010-11-27T18:30:58.310
2010-11-25T22:44:35.630
null
2137
[ "time-series", "standard-deviation", "goodness-of-fit" ]
4915
2
null
4914
3
null
Based on the information given, I think that you could consider AIC, a measure of likelihood that is penalized by degrees of freedom.
null
CC BY-SA 2.5
null
2010-11-25T19:49:13.047
2010-11-25T21:41:36.517
2010-11-25T21:41:36.517
930
1381
null
4916
2
null
4360
6
null
I think your intuition is flawed. It seems you are implicitly comparing a single, "very special" result (exactly 10000 heads) with a set of many results (all "non-special" numbers of heads close to 10000). However, the definition of "special" is an arbitrary choice based on our psychology. How about binary 100000000000...
null
CC BY-SA 2.5
null
2010-11-25T20:33:30.693
2010-11-25T23:48:14.830
2010-11-25T23:48:14.830
1909
1909
null
4917
2
null
4898
7
null
Yes, what you are suggesting is exactly what has been suggested in the literature. See, for example: Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386 ([link](http://orm.sagepub.com/cgi/content/abstract/11/2/364), but unfortunately...
null
CC BY-SA 2.5
null
2010-11-25T23:37:14.657
2010-11-25T23:37:14.657
null
null
1934
null
4918
1
null
null
-3
166
The input is a bunch of numbers. How can I calculate a threshold that there are 10% of the totally amount of numbers are above this threshold. I think this is equally as to calculate the distribution function, but what I need is the threshold number, not the
How to get the required data?
CC BY-SA 2.5
0
2010-11-26T00:46:30.300
2010-11-27T11:49:30.547
2010-11-27T11:49:30.547
930
2141
[ "distributions" ]
4919
2
null
4918
0
null
My understanding of the question is that given a series of numbers, which is the number that has 10% of all the given numbers larger than this number and 90% smaller? If this understanding is correct, a software percentile function [(see here)](http://en.wikipedia.org/wiki/Percentile) or a decile function [(see here)](...
null
CC BY-SA 2.5
null
2010-11-26T00:51:35.250
2010-11-27T11:47:55.777
2010-11-27T11:47:55.777
930
226
null
4920
1
4926
null
21
33440
Using Pearson's Correlation Coefficient, I have several variables that are highly correlated ($\rho = 0.978$ and $\rho = 0.989$ for 2 pairs of variables that are in my model). The reason some of the variables are highly correlated is because one variable is used in the calculation for another variable. Example: $B = V ...
Can I simply remove one of two predictor variables that are highly linearly correlated?
CC BY-SA 2.5
null
2010-11-26T00:58:39.783
2014-04-16T22:07:23.160
2010-11-26T01:03:50.200
1894
1894
[ "regression", "correlation", "modeling" ]
4921
2
null
4920
0
null
If D is not a constant, then B and E are effectively two different variables because of the variations in D. The high correlation indicates that D is practically constant throughout the training data. If that is the case, then you can discard either B or E.
null
CC BY-SA 2.5
null
2010-11-26T01:17:49.297
2010-11-26T01:17:49.297
null
null
2071
null