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
2941
2
null
2938
1
null
I would say that the more or less canonical way to compare two distributions would be a chi-squared test. The statistic is not normalized, though, and it depends on how you choose the bins. The last point can of course be seen as a feature, not a bug: choosing bins appropriately allows you to look more closely for simi...
null
CC BY-SA 2.5
null
2010-09-21T07:46:52.397
2010-09-21T07:46:52.397
null
null
1352
null
2942
2
null
2917
7
null
I can only agree with John. Furthermore, perhaps [this](http://eskes.psychiatry.dal.ca/Files/2003_-_Saville_-_Basic_statistics_and_the_inconsistency_of_m.pdf) paper by David Saville helps you with some formula to recalculate variability measures from LSDs et al.: Saville D.J. (2003). [Basic statistics and the inconsist...
null
CC BY-SA 2.5
null
2010-09-21T08:55:35.920
2010-09-23T16:56:50.490
2010-09-23T16:56:50.490
442
442
null
2944
2
null
2860
3
null
Following the comments exchange with Ebony (see Whuber's answer). I gather that in Ebony's application, $p$ is much larger than $n$ which is itself very large. In this case the complexity of computing the eigen decomposition is in the order of $O(n^3)$. Two solutions spring to mind: - partial decomposition: assuming $...
null
CC BY-SA 2.5
null
2010-09-21T11:45:56.080
2010-09-22T00:35:28.130
2010-09-22T00:35:28.130
603
603
null
2945
2
null
2828
1
null
From Yaroslav's comments to Henrik's answer: but cross-validation seems to just postpone the task of assessing complexity. If you use data to pick your parameters and your model as in cross-validation, the relevant question becomes how estimate the amount of data needed for this "meta"-fitter to perform well I wonder ...
null
CC BY-SA 2.5
null
2010-09-21T12:08:33.850
2010-09-21T12:35:49.923
2010-09-21T12:35:49.923
603
603
null
2946
2
null
2932
4
null
Interesting reference. Its value for me lies in questioning the ability of measure theoretic probability to capture an "intuition" about probability (whatever that might mean) and going on to propose an intriguing distinction; namely, between a set of measure zero having a measure zero neighborhood and a set of measur...
null
CC BY-SA 3.0
null
2010-09-21T14:28:05.750
2012-01-08T17:18:07.957
2012-01-08T17:18:07.957
919
919
null
2947
2
null
2938
2
null
I [recently](http://www.thinkingaboutthinking.org/wp-content/uploads/2010/05/Lawrence_BRM_in_press.pdf) used the correlation between the empirical CDF and the fitted CDF to quantify goodness-of-fit, and I wonder if this approach might also be useful in the current case, which as I understand it involves comparing two e...
null
CC BY-SA 2.5
null
2010-09-21T15:15:12.333
2010-09-21T15:15:12.333
null
null
364
null
2948
1
2951
null
47
28131
I'm wondering if someone could suggest what are good starting points when it comes to performing community detection/graph partitioning/clustering on a graph that has weighted, undirected edges. The graph in question has approximately 3 million edges and each edge expresses the degree of similarity between the two vert...
How to do community detection in a weighted social network/graph?
CC BY-SA 3.0
null
2010-09-21T15:50:45.697
2018-01-15T12:14:55.440
2016-05-18T16:29:25.253
7290
1007
[ "clustering", "data-visualization", "networks", "partitioning", "modularity" ]
2950
1
null
null
3
3178
I am trying to determine significant differences between groups of data using a k-nearest neighbor randomization test in R. This test basically looks for similarity amongst homogenous groups and separates them out using random clustering. In the literature, this test is called a "K-nearest neighbor (kNN) randomization ...
kNN randomization test in R?
CC BY-SA 2.5
null
2010-09-21T17:19:53.943
2012-05-16T06:19:59.067
2011-01-18T00:37:31.553
null
null
[ "r", "k-nearest-neighbour" ]
2951
2
null
2948
23
null
igraph implementation of Newman's modularity clustering (fastgreedy function) can be used with weighted edges as well. Just add weight attribute to the edges and analyse as usual. In my experience, it run even faster with weights as there are less ties.
null
CC BY-SA 2.5
null
2010-09-21T17:20:48.360
2010-09-21T17:20:48.360
null
null
1387
null
2952
2
null
2948
10
null
I know that [Gephi](http://gephi.org/) can process undirected weighted graph, but I seem to remember it has to be stored in [GDF](http://gephi.org/users/supported-graph-formats/gdf-format/), which is pretty close to CSV, or Ucinet [DL](http://gephi.org/users/supported-graph-formats/ucinet-dl-format/). Be aware that it'...
null
CC BY-SA 2.5
null
2010-09-21T17:45:48.903
2010-09-21T21:07:25.300
2010-09-21T21:07:25.300
930
930
null
2953
2
null
2950
3
null
kmeans() (you can find it by typing `??` followed by the name of what you want as in `??kmean`). In general, a good trick is to first look it up on a R specific search [engine](http://rseek.org/)
null
CC BY-SA 2.5
null
2010-09-21T18:13:57.677
2010-09-21T18:44:13.107
2010-09-21T18:44:13.107
603
603
null
2954
2
null
2950
3
null
You appear to have confused "cluster analysis" with "classification". The former is where you don't know the groupings and wish to determine them from the training data to hand. Classification is where you know the groups and want to predict them. There are a few packages in R that do this. For example, look at the res...
null
CC BY-SA 2.5
null
2010-09-21T21:34:04.403
2010-09-21T22:20:21.663
2010-09-21T22:20:21.663
1390
1390
null
2955
2
null
2950
3
null
I am not sure to understand your question since you talk about k-means, which is basically an unsupervised method (i.e. where classes are not known a priori), while at the same time you are saying that you already identified groups of individuals. So I would suggest to look at classification methods, or other supervise...
null
CC BY-SA 2.5
null
2010-09-21T21:45:12.007
2010-09-21T22:05:16.047
2010-09-21T22:05:16.047
930
930
null
2956
1
null
null
18
616
I'm the author of the [ez package](http://cran.r-project.org/package=ez) for R, and I'm working on an update to include automatic computation of likelihood ratios (LRs) in the output of ANOVAs. The idea is to provide a LR for each effect that is analogous to the test of that effect that the ANOVA achieves. For example,...
Have I computed these likelihood ratios correctly?
CC BY-SA 2.5
null
2010-09-21T23:40:39.317
2018-08-27T16:09:42.907
2018-08-27T16:09:42.907
11887
364
[ "r", "anova", "likelihood-ratio" ]
2957
1
7716
null
20
3140
The Gauss-Markov theorem tells us that the OLS estimator is the best linear unbiased estimator for the linear regression model. But suppose I don't care about linearity and unbiasedness. Then is there some other (possible nonlinear/biased) estimator for the linear regression model which is the most efficient under the...
OLS is BLUE. But what if I don't care about unbiasedness and linearity?
CC BY-SA 2.5
null
2010-09-22T01:15:49.873
2022-09-17T16:31:59.187
2010-10-19T07:20:15.037
449
1393
[ "regression", "unbiased-estimator" ]
2958
1
null
null
2
776
I know the value for the 16% quartile, so I know the additive deviation for the given distribution. How do I find the deviation of the log of the given distribution on a multiplicative scale?
How do you calculate the standard deviation on a multiplicative scale for a distribution that has been transformed logarithmically?
CC BY-SA 2.5
null
2010-09-22T01:21:15.247
2010-09-22T08:22:25.940
null
null
null
[ "distributions", "standard-deviation", "logarithm" ]
2959
2
null
2957
9
null
I don't know if you are OK with the Bayes Estimate? If yes, then depending on the Loss function you can obtain different Bayes Estimates. A theorem by Blackwell states that Bayes Estimates are never unbiased. A decision theoretic argument states that every admissible rule ((i.e. or every other rule against which it is ...
null
CC BY-SA 2.5
null
2010-09-22T01:47:20.280
2011-02-28T16:24:13.567
2011-02-28T16:24:13.567
1307
1307
null
2960
2
null
2925
0
null
an easy way to generate symmetric bernoulli trials is to flip a coin twice. if the first toss is H and the second is T, say X = 1. if it's the other way round, say X = 0. if the two tosses match [2H or 2T], discard the outcome and continue. no matter what the bias of the coin, X will be symmetric bernoulli.
null
CC BY-SA 2.5
null
2010-09-22T03:42:41.153
2010-09-22T03:42:41.153
null
null
1112
null
2961
2
null
2957
5
null
There is a nice review paper by [Kay and Eldar](http://webee.technion.ac.il/Sites/People/YoninaEldar/Download/67j-04490210.pdf) on biased estimation for the purpose of finding estimators with minimum mean square error.
null
CC BY-SA 2.5
null
2010-09-22T04:00:30.520
2010-09-22T04:00:30.520
null
null
352
null
2962
1
125649
null
11
12982
The statistics book I am reading recommends omega squared to measure the effects of my experiments. I have already proven using a split plot design (mix of within-subjects and between-subjects design) that my within-subjects factors are statistically significant with p<0.001 and F=17. Now I'm looking to see how big is ...
Omega squared for measure of effect in R?
CC BY-SA 2.5
null
2010-09-22T04:38:22.253
2019-01-27T17:08:35.430
2011-01-14T19:31:12.340
449
1320
[ "r", "anova", "effect-size", "split-plot" ]
2963
2
null
2925
7
null
Just as another source of verifiable randomness: random.org generates random numbers from atmospheric noise. They publish [a daily file (most days) of random bits](http://www.random.org/files/); the first digit of each day's file might prove suitably verifiable to your parties. --- Update 2013-11-12: Access to thes...
null
CC BY-SA 3.0
null
2010-09-22T05:25:07.513
2013-11-12T19:18:29.360
2013-11-12T19:18:29.360
71
71
null
2965
2
null
2958
2
null
I assume you are referring to something like the estimated coefficients in a logistic regression. These are the log-odds. The estimates usually have a standard error and symmetrical confidence interval. For example lets say an estimated log odds is 2 with an SE of 0.5 and 95% CI of 1.02 to 2.98. The odds ratio you cal...
null
CC BY-SA 2.5
null
2010-09-22T08:22:25.940
2010-09-22T08:22:25.940
null
null
521
null
2966
1
2967
null
9
214
Context - you have 200 observations of an individual's running time for the 100 metres measured once a day for 200 days. - Assume the individual was not a runner before commencement of practice - Based on the observed data and the 199 other observations, you want to estimate the latent time it would take the individ...
Estimating latent performance potential based on a sequence of observations
CC BY-SA 2.5
null
2010-09-22T10:32:51.633
2021-03-21T17:39:32.187
2015-08-31T19:19:04.880
11887
183
[ "time-series", "bayesian", "latent-variable", "isotonic" ]
2967
2
null
2966
7
null
You need to perform an isotonic (i.e. monotonic non decreasing) nonparametric regression (see page 6 of [this](https://www.semanticscholar.org/paper/%E2%80%98monoProc%E2%80%99-Version-1.0-5-Strictly-monotone-and-in-R-Scheder/196e7585c8a525c6feaac27147b29bebc0f9b43b) document for an example), then use $\hat{E}(y|x)+ \de...
null
CC BY-SA 4.0
null
2010-09-22T11:01:39.503
2021-03-21T17:39:32.187
2021-03-21T17:39:32.187
603
603
null
2968
2
null
2925
6
null
Many countries have state lottery which is regularly audited, and whose results are announced online: e.g. [UK national lottery](https://www.national-lottery.co.uk/player/p/results/lotto.ftl). You just need to construct an appropriate function which maps this output space to your desired output. A continuous distribut...
null
CC BY-SA 2.5
null
2010-09-22T11:53:01.753
2010-09-22T11:53:01.753
null
null
495
null
2969
2
null
2962
1
null
I'd suggest that generalized eta square is considered ([ref](http://www.ncbi.nlm.nih.gov/pubmed/14664681), [ref](http://brm.psychonomic-journals.org/content/37/3/379.short)) a more appropriate measure of effect size. It is included in the ANOVA output in the [ez package](http://cran.r-project.org/package=ez) for R.
null
CC BY-SA 2.5
null
2010-09-22T12:32:55.730
2010-09-22T12:32:55.730
null
null
364
null
2970
2
null
2966
2
null
Just a guess. First I would explore transformations of the data, such as converting time to speed or acceleration. Then I would consider the log of that, since it obviously won't be negative. Then, since you are interested in the asymptote, I would try fitting (by least squares) a simple exponential to the transformed ...
null
CC BY-SA 2.5
null
2010-09-22T12:36:38.767
2010-09-22T13:28:08.330
2010-09-22T13:28:08.330
1270
1270
null
2971
1
2985
null
17
1551
If you fit a non linear function to a set of points (assuming there is only one ordinate for each abscissa) the result can either be: - a very complex function with small residuals - a very simple function with large residuals Cross validation is commonly used to find the "best" compromise between these two extrem...
What is the definition of "best" as used in the term "best fit" and cross validation?
CC BY-SA 2.5
null
2010-09-22T14:11:12.697
2013-02-11T12:23:57.870
2010-09-23T10:54:12.720
null
1134
[ "model-selection", "cross-validation" ]
2972
1
2989
null
7
1503
A little while back, J.M. [suggested](https://stats.stackexchange.com/questions/2746/how-to-efficiently-generate-positive-semi-definite-correlation-matrices/2786#2786) using the [Stewart](http://www.jstor.org/stable/2156882) algorithm for generating $n$ by $n$ pseudo random orthogonal matrices in $O(n^2)$ time. He furt...
Pseudo-random orthogonal matrix generation
CC BY-SA 2.5
null
2010-09-22T14:25:01.887
2010-09-23T10:45:55.277
2017-04-13T12:44:26.710
-1
603
[ "random-generation", "matrix" ]
2973
2
null
665
3
null
Statistics is the pursuit of truth in the face of uncertainty. Probability is the tool that allows us to quantify uncertainty. (I have provided another, longer, answer that assumed that what was being asked was something along the lines of "how would you explain it to your grandmother?")
null
CC BY-SA 2.5
null
2010-09-22T14:31:43.833
2010-09-22T14:31:43.833
null
null
666
null
2975
1
2978
null
5
2290
How do I detrend or normalize multiple series of data so that I can inter-compare between the series? --- Specifics below may not be appropriate for this forum. Please let me know and I can remove or re-phrase, but I think it might be helpful to fully understand the generic question above. I have a data set that I ...
Normalizing or detrending groups of samples
CC BY-SA 2.5
null
2010-09-22T16:35:45.250
2010-09-26T07:45:00.947
2017-04-13T12:33:47.693
-1
957
[ "time-series", "data-visualization", "variance", "normalization" ]
2976
1
2998
null
31
31330
Questions: - I have a large correlation matrix. Instead of clustering individual correlations, I want to cluster variables based on their correlations to each other, ie if variable A and variable B have similar correlations to variables C to Z, then A and B should be part of the same cluster. A good real life example ...
Clustering variables based on correlations between them
CC BY-SA 2.5
null
2010-09-22T17:01:37.580
2017-04-06T14:04:02.507
2015-11-24T10:38:37.860
28666
1250
[ "correlation", "clustering", "correlation-matrix" ]
2977
2
null
2971
9
null
I will offer a brief intuitive answer (at a fairly abstract level) till a better answer is offered by someone else: First, note that complex functions/models achieve better fit (i.e., have lower residuals) as they exploit some local features (think noise) of the dataset that are not present globally (think systematic ...
null
CC BY-SA 2.5
null
2010-09-22T17:04:06.030
2010-09-22T17:19:31.487
2010-09-22T17:19:31.487
null
null
null
2978
2
null
2975
5
null
Multi-level modelling where your data are grouped by flight as a random variable sounds like a good analysis method for this problem. In R the code might be ``` library(lme4) #load the package) lmer(temp ~ region + (1|flight)) ``` This is doable in a variety of statistics packages. If region is simply in region or o...
null
CC BY-SA 2.5
null
2010-09-22T17:21:32.487
2010-09-26T07:45:00.947
2010-09-26T07:45:00.947
601
601
null
2979
2
null
2904
0
null
You could avoid the problem altogether by simply estimating W = alphaH * H + alphaM * M + alphaL * L + X * beta using 2sls. The fact that H,M, and L are discrete doesn't violate any of the assumptions of 2sls. Of course, using maximum likelihood will produce more efficient estimates, but it relies on more assumptions. ...
null
CC BY-SA 2.5
null
2010-09-22T17:41:07.970
2010-09-22T17:41:07.970
null
null
1229
null
2980
2
null
2925
1
null
I didn't quite understand what you meant by "on the basis of an external event." But you can certainly flip a fair coin in a manner that a remote user can cryptographically verify. Consider this algorithm: - Bob picks a uniformly random boolean value, TRUE or FALSE. He also chooses a large random number. He sends Alic...
null
CC BY-SA 2.5
null
2010-09-22T18:26:26.657
2010-09-23T02:54:38.517
2010-09-23T02:54:38.517
1122
1122
null
2981
1
2986
null
7
3553
With the help of several people in this community I have been wetting my feet in clustering some social network data using [igraph's implementation of modularity-based clustering](http://igraph.sourceforge.net/doc/R/fastgreedy.community.html). I am having some trouble interpreting the output of this routine and how to ...
Interpreting output of igraph's fastgreedy.community clustering method
CC BY-SA 3.0
null
2010-09-22T18:49:28.433
2016-05-20T16:38:16.397
2020-06-11T14:32:37.003
-1
1007
[ "clustering", "networks", "partitioning", "igraph", "modularity" ]
2982
1
3005
null
12
3582
I am trying to summarize what I understood so far in penalized multivariate analysis with high-dimensional data sets, and I still struggle through getting a proper definition of soft-thresholding vs. Lasso (or $L_1$) penalization. More precisely, I used sparse PLS regression to analyze 2-block data structure including ...
Soft-thresholding vs. Lasso penalization
CC BY-SA 2.5
null
2010-09-22T20:53:20.303
2010-12-21T15:30:40.507
2010-12-21T15:30:40.507
930
930
[ "multivariate-analysis", "lasso", "feature-selection", "genetics" ]
2983
2
null
2971
1
null
The error function is the error of your model (function) on the training data. The complexity is some norm (e.g., squared l2 norm) of the function you are trying to learn. Minimizing the complexity term essentially favors smooth functions, which do well not just on the training data but also on the test data. If you re...
null
CC BY-SA 2.5
null
2010-09-22T20:59:33.923
2010-09-22T21:05:22.323
2010-09-22T21:05:22.323
881
881
null
2984
2
null
2971
1
null
From an optimization point of view, the problem (with $(p,q)\geq 1,\;\lambda>0$), $(1)\;\underset{\beta|\lambda,x,y}{Arg\min.}||y-m(x,\beta)||_p+\lambda||\beta||_q$ is equivalent to $(2)\;\underset{\beta|\lambda,x,y}{Arg\min.}||y-m(x,\beta)||_p$ $s.t.$ $||\beta||_q\leq\lambda$ Which simply incorporates unto the obj...
null
CC BY-SA 2.5
null
2010-09-22T21:47:06.203
2010-09-23T00:56:12.477
2010-09-23T00:56:12.477
603
603
null
2985
2
null
2971
7
null
I think this is an excellent question. I am going to paraphase it just to be sure I have got it right: > It would seem that there are lots of ways to choose the complexity penalty function $c$ and error penalty function $e$. Which choice is `best'. What should best even mean? I think the answer (if there is...
null
CC BY-SA 2.5
null
2010-09-22T22:11:42.100
2010-09-22T23:28:21.123
2010-09-22T23:28:21.123
352
352
null
2986
2
null
2981
3
null
The function which is used for this purpose: community.to.membership(graph, merges, steps, membership=TRUE, csize=TRUE) this can be used to extract membership based on the fastgreedy.community function results. You have to provide number of steps - how many merges should be performed. The optimal number of steps(merg...
null
CC BY-SA 2.5
null
2010-09-22T23:05:26.657
2010-09-22T23:05:26.657
null
null
1396
null
2987
2
null
7
2
null
This is probably the most complete list you'll find: [Some Datasets Available on the Web](http://www.datawrangling.com/some-datasets-available-on-the-web)
null
CC BY-SA 2.5
null
2010-09-22T23:57:02.360
2010-09-22T23:57:02.360
null
null
635
null
2988
1
null
null
12
8192
How does one calculate the sample size needed for a study in which a cohort of subjects will have a single continuous variable measured at the time of a surgery and then two years later they will be classified as functional outcome or impaired outcome. We would like to see if that measurement could have predicted the b...
Sample size calculation for univariate logistic regression
CC BY-SA 2.5
null
2010-09-23T00:12:51.567
2010-12-03T11:40:53.517
null
null
104
[ "logistic", "sample-size" ]
2989
2
null
2972
9
null
It's in the Test Matrix Toolbox, not the Matrix Computation Toolbox. The M-file `qmult.m` (premultiplication by a Haar-distributed pseudorandom orthogonal matrix) can be found [here](http://www.netlib.org/toms/694) or [here](http://people.sc.fsu.edu/~jburkardt/m_src/test_matrix/qmult.m).
null
CC BY-SA 2.5
null
2010-09-23T00:22:16.190
2010-09-23T00:22:16.190
null
null
830
null
2998
2
null
2976
16
null
Here's a simple example in R using the `bfi` dataset: bfi is a dataset of 25 personality test items organised around 5 factors. ``` library(psych) data(bfi) x <- bfi ``` A hiearchical cluster analysis using the euclidan distance between variables based on the absolute correlation between variables can be obtained lik...
null
CC BY-SA 2.5
null
2010-09-23T01:38:24.977
2010-10-29T11:20:13.590
2010-10-29T11:20:13.590
183
183
null
2999
2
null
2988
7
null
Sample size calculations for logistic regression are complex. I wont attempt to summarise it here. Reasonably accessible solutions to this problem are found in: [Hsieh FY. Sample size tables for logistic regression. Statistics in Medicine. 1989 Jul;8(7):795-802.](http://onlinelibrary.wiley.com/doi/10.1002/sim.478008070...
null
CC BY-SA 2.5
null
2010-09-23T01:56:37.513
2010-09-23T01:56:37.513
null
null
521
null
3000
2
null
2988
3
null
a simple question about sample size is: how large a sample is needed to get a 95% confidence interval no longer than 2d for the [unknown] mean of the data distribution. another variant is: how large a sample is needed to have power 0.9 at $\theta = 1$ when testing H$_0: \theta = 0$. you don't seem to specify any criter...
null
CC BY-SA 2.5
null
2010-09-23T02:13:36.460
2010-09-26T01:42:35.190
2010-09-26T01:42:35.190
1112
1112
null
3001
1
3002
null
7
339
So let's say you have a distribution where X is the 16% quantile. Then you take the log of all the values of the distribution. Would log(X) still be the 16% quantile in the log distribution?
Log graph question
CC BY-SA 2.5
null
2010-09-23T03:57:03.107
2010-11-02T13:51:35.310
2010-11-02T13:51:35.310
8
1395
[ "standard-deviation", "logarithm", "quantiles", "self-study" ]
3002
2
null
3001
10
null
Yes. Quantiles can be transformed under any monotonically increasing transformation. To see this, suppose $Y$ is the random variable and $q_{0.16}$ is the 16% quantile. Then $$ \text{Pr}(Y\le q_{0.16}) = \text{Pr}(\log(Y)\le\log(q_{0.16})) = 0.16. $$ Generally, if $f$ is monotonic and increasing then $$ \text{Pr}(Y\le...
null
CC BY-SA 2.5
null
2010-09-23T04:30:57.217
2010-09-24T03:06:00.800
2010-09-24T03:06:00.800
159
159
null
3003
2
null
7
2
null
Peter Skomoroch maintains a list of datasets at [http://www.datawrangling.com/some-datasets-available-on-the-web](http://www.datawrangling.com/some-datasets-available-on-the-web). Many of the links provided as to places that list datasets.
null
CC BY-SA 2.5
null
2010-09-23T06:10:48.023
2010-09-23T06:10:48.023
null
null
1392
null
3004
2
null
2971
3
null
A lot of people have excellent answers, here is my $0.02. There are two ways to look at "best model", or "model selection", speaking statistically: 1 An explanation that is as simple as possible, but no simpler (Attrib. Einstein) ``` - This is also called Occam's Razor, as explanation applies here. - Have a conc...
null
CC BY-SA 2.5
null
2010-09-23T07:39:23.560
2010-09-23T07:39:23.560
null
null
1307
null
3005
2
null
2982
2
null
What i'll say holds for regression, but should be true for PLS also. So it's not a bijection because depeding on how much you enforce the constrained in the $l1$, you will have a variety of 'answers' while the second solution admits only $p$ possible answers (where $p$ is the number of variables) <-> there are more sol...
null
CC BY-SA 2.5
null
2010-09-23T07:51:46.680
2010-09-23T23:33:14.197
2010-09-23T23:33:14.197
603
603
null
3006
1
3010
null
9
1290
An anonymous reader posted [the following question on my blog](http://jeromyanglim.blogspot.com/2009/11/tips-for-writing-up-research-in.html?showComment=1285227037363#c3803430820186070755). Context: The reader wanted to run a factor analysis on scales from a questionnaire - but the data was from paired husbands and wi...
Factor analysis of dyadic data
CC BY-SA 2.5
null
2010-09-23T07:58:18.980
2020-07-13T03:26:44.700
2020-07-13T03:26:44.700
11887
183
[ "independence", "factor-analysis", "dyadic-data" ]
3008
2
null
2988
7
null
I usually find it easier and faster to run a simulation. Papers take a long time to read, to understand and finally come to the conclusion that they don't apply in the special case one is interested in. Therefore, I would just pick a number of subjects, simulate the covariate you are interested in (distributed as you b...
null
CC BY-SA 2.5
null
2010-09-23T08:16:37.353
2010-10-02T20:05:22.870
2010-10-02T20:05:22.870
1352
1352
null
3009
2
null
3006
6
null
Yes, s/he can run a factor analysis on dyadic data. I would start with Kenny et al.'s (2006) "[Dyadic Data Analysis](http://davidakenny.net/kkc/kkc.htm)". It is a great and extremly helpful book! Another option is "Modeling Dyadic and Interdependent Data in the Developmental and Behavioral Sciences" (Card et al. 2008)...
null
CC BY-SA 2.5
null
2010-09-23T09:07:55.583
2010-09-23T09:17:29.330
2010-09-23T09:17:29.330
307
307
null
3010
2
null
3006
7
null
Structural equation models are better suited for this kind of data, e.g. by introducing an extra factor for couple which allows to account for the dependence structure (paired responses). David A. Kenny reviewed the main points for [analysis dyadic data](http://davidakenny.net/dyad.htm); although it doesn't focus on qu...
null
CC BY-SA 2.5
null
2010-09-23T09:34:29.073
2010-09-23T09:42:17.033
2010-09-23T09:42:17.033
930
930
null
3011
2
null
2971
5
null
In a general machine-learning view the answer is fairly simple: we want to build model that will have the highest accuracy when predicting new data (unseen during training). Because we cannot directly test this (we don't have data from the future) we do Monte Carlo simulation of such a test -- and this is basically the...
null
CC BY-SA 2.5
null
2010-09-23T10:31:04.193
2010-09-23T10:31:04.193
null
null
null
null
3012
5
null
null
0
null
null
CC BY-SA 2.5
null
2010-09-23T10:59:13.660
2010-09-23T10:59:13.660
2010-09-23T10:59:13.660
null
null
null
3013
4
null
null
0
null
Model selection is a problem of judging which model from some set performs best. Popular methods include $R^2$, AIC and BIC criteria, test sets, and cross-validation. To some extent, feature selection is a subproblem of model selection.
null
CC BY-SA 3.0
null
2010-09-23T10:59:13.660
2011-06-15T03:58:08.313
2011-06-15T03:58:08.313
919
null
null
3014
5
null
null
0
null
Tag Usage Clustered-standard-errors and/or cluster-samples should be tagged as such; do not use the "clustering" tag for them. Both these methodologies take clusters as given, rather than discovered. Overview Clustering, or cluster analysis, is a statistical technique of uncovering groups of units in multivariate data....
null
CC BY-SA 4.0
null
2010-09-23T11:06:19.013
2020-12-08T14:26:18.850
2020-12-08T14:26:18.850
11887
null
null
3015
4
null
null
0
null
Cluster analysis is the task of partitioning data into subsets of objects according to their mutual "similarity," without using preexisting knowledge such as class labels. [Clustered-standard-errors and/or cluster-samples should be tagged as such; do NOT use the "clustering" tag for them.]
null
CC BY-SA 3.0
null
2010-09-23T11:06:19.013
2016-03-09T10:33:39.543
2016-03-09T10:33:39.543
3277
null
null
3016
5
null
null
0
null
Overview Time series are data observed over time (either in continuous time or at discrete time periods). Time series analysis includes trend identification, temporal pattern recognition, spectral analysis, and forecasting future values based on the past. The salient characteristic of methods of time series analysis (a...
null
CC BY-SA 4.0
null
2010-09-23T11:14:30.340
2020-11-02T13:57:35.530
2020-11-02T13:57:35.530
53690
null
null
3017
4
null
null
0
null
Time series are data observed over time (either in continuous time or at discrete time periods).
null
CC BY-SA 2.5
null
2010-09-23T11:14:30.340
2011-03-11T19:39:55.637
2011-03-11T19:39:55.637
919
null
null
3018
5
null
null
0
null
[Hypothesis testing](https://en.wikipedia.org/wiki/Statistical_hypothesis_testing) assesses whether data are inconsistent with a given hypothesis rather than being an effect of random fluctuations.
null
CC BY-SA 3.0
null
2010-09-23T11:28:36.817
2017-09-27T18:47:47.197
2017-09-27T18:47:47.197
7290
null
null
3019
4
null
null
0
null
Hypothesis testing assesses whether data are inconsistent with a given hypothesis rather than being an effect of random fluctuations.
null
CC BY-SA 3.0
null
2010-09-23T11:28:36.817
2017-09-27T18:47:47.197
2017-09-27T18:47:47.197
7290
null
null
3022
2
null
3001
1
null
Yes. When you say that "X is the 16% quantile", what it means is that 16% of the sample have a lower value than X. The log of any number smaller than X is smaller than log(X) and the log of any number greater than X is greater than log(X), so the ordering is not changed.
null
CC BY-SA 2.5
null
2010-09-23T18:45:20.550
2010-09-23T18:45:20.550
null
null
666
null
3023
2
null
2686
1
null
A simple solution that does not require the acquisition of specialized knowledge is to use [control charts](http://en.wikipedia.org/wiki/Control_chart). They're ridiculously easy to create and make it easy to tell special cause variation (such as when you are out of town) from common cause variation (such as when you h...
null
CC BY-SA 2.5
null
2010-09-23T19:16:36.727
2010-09-23T19:16:36.727
null
null
666
null
3024
1
3027
null
36
60577
I understand that for certain datasets such as voting it performs better. Why is Poisson regression used over ordinary linear regression or logistic regression? What is the mathematical motivation for it?
Why is Poisson regression used for count data?
CC BY-SA 2.5
null
2010-09-23T19:38:40.190
2022-08-22T00:39:09.940
2013-10-04T02:20:09.050
7290
1392
[ "count-data", "poisson-regression" ]
3025
2
null
2971
4
null
Great discussion here, but I think of cross-validation in a different way from the answers thus far (mbq and I are on the same page I think). So, I'll put in my two cents at the risk of muddying the waters... Cross-validation is a statistical technique for assessing the variability and bias, due to sampling error, in a...
null
CC BY-SA 2.5
null
2010-09-23T20:19:30.067
2010-09-23T20:19:30.067
null
null
1080
null
3026
2
null
3024
2
null
My understanding is primarily because counts are always positive and discrete, the Poisson can summarize such data with one parameter. The main catch being that the variance equals the mean.
null
CC BY-SA 2.5
null
2010-09-23T20:28:48.930
2010-09-23T20:28:48.930
null
null
null
null
3027
2
null
3024
59
null
[Poisson distributed](http://en.wikipedia.org/wiki/Poisson_distribution) data is intrinsically integer-valued, which makes sense for count data. Ordinary Least Squares (OLS, which you call "linear regression") assumes that true values are [normally distributed](http://en.wikipedia.org/wiki/Normal_distribution) around t...
null
CC BY-SA 2.5
null
2010-09-23T20:42:45.613
2010-09-23T20:42:45.613
null
null
1352
null
3028
2
null
3024
26
null
Essentially, it's because linear and logistic regression make the wrong kinds of assumptions about what count outcomes look like. Imagine your model as a very stupid robot that will relentlessly follow your orders, no matter how nonsensical those orders are; it completely lacks the ability to evaluate what you tell it...
null
CC BY-SA 2.5
null
2010-09-23T20:52:15.760
2010-09-23T20:52:15.760
null
null
71
null
3029
2
null
3024
3
null
Others have basically said the same thing I'm going to but I thought I'd add my take on it. It depends on what you're doing exactly but a lot of times we like to conceptualize the problem/data at hand. This is a slightly different approach compared to just building a model that predicts pretty well. If we are trying...
null
CC BY-SA 2.5
null
2010-09-23T23:10:50.283
2010-09-23T23:10:50.283
null
null
1028
null
3030
2
null
3024
5
null
Mathematically if you start with the simple assumption that the probability of an event occurring in a defined interval $T = 1$ is $\lambda$ you can show the expected number of events in the interval $T = t$ is is $\lambda.t$, the variance is also $\lambda.t$ and the [probability distribution ](http://www.umass.edu/wsp...
null
CC BY-SA 2.5
null
2010-09-23T23:28:22.660
2010-09-23T23:28:22.660
null
null
521
null
3031
1
null
null
3
1911
I just loaded a csv file in R. When I ran the `summary` command for one of the columns, I got the following: ``` > Error: unexpected symbol in "summary k_low" ``` I'm pretty sure I know what the 'unexpected symbol' is: for observations in which we had no reliable data for the variable `k_low`, we simply entered a per...
How to escape symbolic value in R
CC BY-SA 2.5
null
2010-09-24T02:56:56.010
2010-09-24T13:58:47.937
2010-09-24T13:58:47.937
930
1410
[ "r" ]
3032
2
null
3031
6
null
It looks like you just left out the parentheses. Try ``` summary(k_low) ```
null
CC BY-SA 2.5
null
2010-09-24T03:03:32.427
2010-09-24T03:03:32.427
null
null
159
null
3034
2
null
3031
4
null
Looks like Rob got it right but I'll illustrate how to fix the period problem. ``` > testdata <- c(1, 2, 3, ".") > testdata [1] "1" "2" "3" "." > summary(testdata) Length Class Mode 4 character character > #That's not what we want.... > cleandata <- as.numeric(testdata) Warning message: NAs introd...
null
CC BY-SA 2.5
null
2010-09-24T03:13:31.783
2010-09-24T03:13:31.783
null
null
1028
null
3035
2
null
423
142
null
I just came across this and loved it: ![alt text](https://i.stack.imgur.com/Vdqwt.png) ([http://xkcd.com/795/](http://xkcd.com/795/)).
null
CC BY-SA 3.0
null
2010-09-24T04:09:04.750
2012-12-15T20:29:26.853
2012-12-15T20:29:26.853
919
253
null
3036
2
null
423
102
null
this too: ![alt text](https://i.stack.imgur.com/6Z3QQ.png)
null
CC BY-SA 2.5
null
2010-09-24T04:13:25.630
2010-09-24T04:13:25.630
null
null
253
null
3037
2
null
3031
1
null
Another point is that when you read in the data, it sound as if your "." is really a missing value. So what you might wish to do when reading the data, is something like this: k_low <- read.date(..., na.strings = ".")
null
CC BY-SA 2.5
null
2010-09-24T04:16:19.980
2010-09-24T04:16:19.980
null
null
253
null
3038
1
null
null
41
23896
Imagine you have a study with two groups (e.g., males and females) looking at a numeric dependent variable (e.g., intelligence test scores) and you have the hypothesis that there are no group differences. Question: - What is a good way to test whether there are no group differences? - How would you determine the samp...
How to test hypothesis of no group differences?
CC BY-SA 3.0
null
2010-09-24T05:24:00.240
2016-10-21T14:44:52.830
2016-10-21T14:44:52.830
35989
183
[ "hypothesis-testing", "t-test", "equivalence", "tost" ]
3039
2
null
3031
2
null
When using [read.table, read.csv or read.delim](http://127.0.0.1:20298/library/utils/html/read.table.html) use: ``` read.table(file,..., na.strings = ".", ...) ``` na.strings - a character vector of strings which are to be interpreted as NA values. Blank fields are also considered to b...
null
CC BY-SA 2.5
null
2010-09-24T05:37:32.793
2010-09-24T05:37:32.793
null
null
521
null
3040
2
null
3038
21
null
I think you are asking about [testing for equivalence](http://web.archive.org/web/20120119090119/http://www.graphpad.com/library/BiostatsSpecial/article_182.htm). Essentially you need to decide how large a difference is acceptable for you to still conclude that the two groups are effectively equivalent. That decision d...
null
CC BY-SA 3.0
null
2010-09-24T05:50:39.257
2013-04-04T16:34:49.933
2017-04-13T12:44:41.967
-1
521
null
3044
2
null
3038
13
null
Following Thylacoleo's answer, I did a little research. The [equivalence](http://cran.r-project.org/web/packages/equivalence/equivalence.pdf) package in R has the `tost()` function. See Robinson and Frose (2004) "[Model validation using equivalence tests](http://research.eeescience.utoledo.edu/lees/papers_PDF/Robinson_...
null
CC BY-SA 2.5
null
2010-09-24T08:25:03.020
2010-09-24T08:25:03.020
null
null
183
null
3045
2
null
2746
0
null
A cheap and cheerful approach I've used for testing is to generate m N(0,1) n-vectors V[k] and then use P = d*I + Sum{ V[k]*V[k]'} as an nxn psd matrix. With m < n this will be singular for d=0, and for small d will have high condition number.
null
CC BY-SA 2.5
null
2010-09-24T09:19:30.617
2010-09-24T09:19:30.617
null
null
null
null
3046
2
null
3038
5
null
In the medical sciences, it is preferable to use a confidence interval approach as opposed to two one-sided tests (tost). I also recommend graphing the point estimates, CIs, and a priori-determined equivalence margins to make things very clear. Your question would likely be addressed by such an approach. The CONSORT gu...
null
CC BY-SA 2.5
null
2010-09-24T09:43:08.590
2010-09-24T09:43:08.590
null
null
561
null
3047
2
null
3038
16
null
Besides the already mentioned possibility of some kind of equivalence test, of which most of them, to the best of my knowledge, are mostly routed in the good old frequentist tradition, there is the possibility of conducting tests which really provide a quantification of evidence in favor of a null-hyptheses, namely bay...
null
CC BY-SA 3.0
null
2010-09-24T11:39:12.360
2013-06-05T18:31:14.217
2017-04-13T12:44:37.420
-1
442
null
3048
1
3066
null
29
12538
I have a matrix where a(i,j) tells me how many times individual i viewed page j. There are 27K individuals and 95K pages. I would like to have a handful of "dimensions" or "aspects" in the space of pages which would correspond to sets of pages which are often viewed together. My ultimate goal is to then be able to comp...
How to do dimensionality reduction in R
CC BY-SA 2.5
null
2010-09-24T11:44:24.637
2016-11-21T11:44:06.490
2010-09-24T13:19:19.210
930
1007
[ "r", "clustering", "dimensionality-reduction" ]
3049
2
null
3038
8
null
There are a few papers I know of that could be helpful to you: Tryon, W. W. (2001). [Evaluating statistical difference, equivalence, and indeterminacy using inferential confidence intervals: An integrated alternative method of conducting null hypothesis statistical tests.](http://dx.doi.org/10.1037//1082-989X.6.4.371) ...
null
CC BY-SA 2.5
null
2010-09-24T11:50:32.963
2010-09-24T11:57:15.200
2010-09-24T11:57:15.200
183
442
null
3050
2
null
3048
4
null
It is certainly a clustering problem. Check out Rs `cluster` package to get an overview of algorithm options (`pam` and `agnes` are the best options to start; they represent two main streams in clustering -- [centroids](http://en.wikipedia.org/wiki/K-means_clustering) and [hierarchical](http://en.wikipedia.org/wiki/Hie...
null
CC BY-SA 3.0
null
2010-09-24T12:37:53.703
2016-11-21T11:44:06.490
2016-11-21T11:44:06.490
20833
null
null
3051
1
3054
null
25
54995
I have a vector of values that I would like to report the average in windows along a smaller slide. For example, for a vector of the following values: ``` 4, 5, 7, 3, 9, 8 ``` A window size of 3 and a slide of 2 would do the following: ``` (4+5+7)/3 = 5.33 (7+3+9)/3 = 6.33 (9+8)/3 = 5.67 ``` And return a vector of th...
Mean of a sliding window in R
CC BY-SA 2.5
null
2010-09-24T14:41:31.997
2021-01-04T13:01:05.197
2010-09-24T17:17:56.337
null
1024
[ "r" ]
3052
1
3065
null
11
5479
I'm examining some genomic coverage data which is basically a long list (a few million values) of integers, each saying how well (or "deep") this position in the genome is covered. I would like to look for "valleys" in this data, that is, regions which are significantly "lower" than their surrounding environment. Note...
How to look for valleys in a graph?
CC BY-SA 2.5
null
2010-09-24T15:09:52.740
2010-09-26T20:15:09.507
2010-09-24T18:02:47.390
634
634
[ "r", "distributions", "statistical-significance", "data-visualization" ]
3053
2
null
3051
5
null
This simple line of code does the thing: ``` ((c(x,0,0) + c(0,x,0) + c(0,0,x))/3)[3:(length(x)-1)] ``` if `x` is the vector in question.
null
CC BY-SA 2.5
null
2010-09-24T15:27:13.803
2010-09-24T17:16:59.560
2010-09-24T17:16:59.560
null
1414
null
3054
2
null
3051
30
null
Function `rollapply` in package zoo gets you close: ``` > require(zoo) > TS <- zoo(c(4, 5, 7, 3, 9, 8)) > rollapply(TS, width = 3, by = 2, FUN = mean, align = "left") 1 3 5.333333 6.333333 ``` It just won't compute the last value for you as it doesn't contain 3 observations. Maybe this will be sufficien...
null
CC BY-SA 2.5
null
2010-09-24T15:36:42.200
2010-09-25T09:03:09.933
2010-09-25T09:03:09.933
1390
1390
null
3055
2
null
3052
2
null
There are many options for this, but one good one: you can use the `msExtrema` function in the [msProcess package](http://cran.r-project.org/web/packages/msProcess/index.html). Edit: In financial performance analysis, this kind of analysis is often performed using a "drawdown" concept. The `PerformanceAnalytics` packa...
null
CC BY-SA 2.5
null
2010-09-24T15:43:45.877
2010-09-24T16:36:44.277
2010-09-24T16:36:44.277
5
5
null
3056
2
null
2909
2
null
You might start by looking at the [drawdown distribution functions in fBasics](http://help.rmetrics.org/fBasics/html/stats-maxdd.html). So you could easily simulate the brownian motion with drift and apply these functions as a start.
null
CC BY-SA 2.5
null
2010-09-24T16:03:15.173
2010-10-28T16:01:23.113
2010-10-28T16:01:23.113
5
5
null
3057
2
null
3052
4
null
I'm completely ignorant of these data, but assuming the data are ordered (not in time, but by position?) it makes sense to make use of time series methods. There are lots of methods for identifying temporal clusters in data. Generally they are used to find high values but can be used for low values grouped together. I'...
null
CC BY-SA 2.5
null
2010-09-24T16:32:47.110
2010-09-24T16:32:47.110
null
null
null
null
3058
2
null
3051
1
null
This will get you the window means and the index of the first value of the window: ``` #The data x <- c(4, 5, 7, 3, 9, 8) #Set window size and slide win.size <- 3 slide <- 2 #Set up the table of results results <- data.frame(index = numeric(), win.mean = numeric()) #i indexes the first value of the window (the sill?...
null
CC BY-SA 2.5
null
2010-09-24T16:40:33.070
2010-09-24T16:40:33.070
null
null
71
null
3059
1
null
null
7
480
I'm investigating the effect of a continuous variable A on a measurement variable M stratified by another factor variable C in an observational dataset. Due to heteroscedasticity I decided to use a bootstrapped regression analysis. However looking at the data, the background set of variables are not evenly distributed...
Bootstrapped regression with total data or bootstrap with matched data?
CC BY-SA 2.5
null
2010-09-24T17:04:59.187
2010-09-27T00:25:43.633
2010-09-27T00:25:43.633
159
1291
[ "bootstrap" ]