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
9033
1
null
null
2
136
Going through some old notes of mine, I found a formula whose purpose seemed statistical, but whose provenance and use I have dumbly forgotten to write. I am asking if anybody might remember this one: \begin{align*} -N-\frac1{N}\sum_{j=1}^N (2j-1)(A_j+B_j), \end{align*} where \begin{align*} A_j=\ln\left(\frac{1}{2}+\in...
Identifying a statistical formula
CC BY-SA 2.5
null
2011-04-01T09:19:56.027
2011-04-01T18:11:38.237
2011-04-01T11:46:09.357
null
null
[ "normal-distribution" ]
9034
2
null
7166
4
null
Predicting hourly data has become my main interest. This problem arises normally in Call Center Forecasting. One needs to be concerned with hourly patterns within the day , different daily patterns across the week and seasonal patterns across the year ( Monthly indicators/Weekly Indicators. In addition there can be and...
null
CC BY-SA 2.5
null
2011-04-01T10:57:40.617
2011-04-01T10:57:40.617
null
null
3382
null
9035
2
null
8800
2
null
Ok, as far as I see your central question can be summarized in the following way: > I transform one feature F in my dataset, but only for those rows where the label is "flower", the rest of the rows remain unchanged. I evaluate NB,C4.5 and Logistic Regression before and after the transformation. The results ...
null
CC BY-SA 2.5
null
2011-04-01T11:26:39.950
2011-04-01T11:26:39.950
null
null
264
null
9036
1
9037
null
4
2440
Using R, I noticed that I get different results if I use `fisher.test()` with raw data (as factors) versus a contingency table. The documentation states that `fisher.test(x,y)` will compute a contingency table from `x, y` by treating them as factors. My example is a baseline statistics exercise: comparing the gender s...
In R, fisher.test returns different results if I use vectors vs contingency table
CC BY-SA 3.0
null
2011-04-01T11:31:34.533
2013-07-22T16:41:54.237
2013-07-22T16:41:54.237
7290
1138
[ "r", "hypothesis-testing", "p-value", "contingency-tables", "fishers-exact-test" ]
9037
2
null
9036
5
null
The first test should read ``` > fisher.test(expData[,1], expData[,2]) Fisher's Exact Test for Count Data data: expData[, 1] and expData[, 2] p-value = 0.4857 alternative hypothesis: true odds ratio is not equal to 1 95 percent confidence interval: 0.001607888 4.722931239 sample estimates: odds ratio 0.15...
null
CC BY-SA 2.5
null
2011-04-01T11:39:40.613
2011-04-01T11:39:40.613
null
null
930
null
9038
1
9051
null
2
155
I'm using [ENSO dataset](http://www.itl.nist.gov/div898/strd/nls/data/LINKS/DATA/ENSO.dat) from the NIST Statistical Reference Datasets as a test for nonlinear regression code. The data are monthly averaged atmospheric pressure differences between Easter Island and Darwin, called [Southern Oscillation](http://en.wikip...
The source of ENSO data from NIST
CC BY-SA 2.5
null
2011-04-01T11:40:34.837
2011-04-01T14:50:47.687
2011-04-01T11:44:21.793
null
3981
[ "dataset", "nonlinear-regression" ]
9039
2
null
8567
-2
null
From wiki "Given a data set, several candidate models may be ranked according to their AIC values. From the AIC values one may also infer that e.g. the top two models are roughly in a tie and the rest are far worse. Thus, AIC provides a means for comparison among models—a tool for model selection. AIC does not provide ...
null
CC BY-SA 2.5
null
2011-04-01T11:45:03.477
2011-04-01T11:45:03.477
null
null
3382
null
9040
1
9048
null
7
1061
First off, I'm a programmer but my experience with true statistics ended at A-Level so I'm looking to all of you for help with a little side project I've been tinkering with. At home I use Plex Media Center to display all of my movies. I built an export tool for this to generate a HTML file containing information on yo...
Visualize movie/actor relationships
CC BY-SA 2.5
null
2011-04-01T11:54:19.400
2011-05-04T13:50:39.353
null
null
3988
[ "data-visualization" ]
9041
2
null
9040
3
null
Graphviz can optimise the layout, see something similar [here](http://www.graphviz.org/content/siblings).
null
CC BY-SA 2.5
null
2011-04-01T12:10:43.893
2011-04-01T12:10:43.893
null
null
3911
null
9042
2
null
9020
2
null
Hi Take a look at the varclus function in the Frank Harrel's Hmisc package. ``` require(Hmisc) ? varclus ```
null
CC BY-SA 2.5
null
2011-04-01T12:48:36.933
2011-04-01T12:48:36.933
null
null
2028
null
9043
1
9044
null
1
387
I'm helping my father to translate a text from my own native Latvian language to English. Even though I'm a fair English speaker and have a bit of mathematics in my past, I never did have a firm grasp of statistics. :( The term I'm looking for has something to do with error calculation. A GPS device is measuring coordi...
What is the English name for a statistics term that I'm looking for?
CC BY-SA 2.5
null
2011-04-01T08:53:26.107
2011-04-01T13:10:24.590
null
null
2590
[ "terminology" ]
9044
2
null
9043
3
null
Google translate gives ["rms error of assessment"](http://translate.google.co.uk/?hl=en&tab=wT#lv%7Cen%7Cvid%C4%93jo%20kvadr%C4%81tisko%20k%C4%BC%C5%ABdu%20nov%C4%93rt%C4%93jums) which (as root mean square error) seems to be the intended meaning. The difference between mean square error and root mean square error is...
null
CC BY-SA 2.5
null
2011-04-01T09:51:37.740
2011-04-01T09:51:37.740
null
null
2958
null
9045
2
null
9043
0
null
I would guess, it is a Least Mean Squared Error (LMSE) estimator. [publication1](http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=5090171) [publication2](http://web.cecs.pdx.edu/~ssp/Reports/2006/Monaghan.pdf) [wikipedia](http://en.wikipedia.org/wiki/Mean_squared_error) the GPS is trying to estimate coordinates,...
null
CC BY-SA 2.5
null
2011-04-01T12:21:40.590
2011-04-01T12:29:20.880
null
null
4060
null
9048
2
null
9040
6
null
N.B.: This was previously a (long) comment that I've converted to an answer. Hopefully I'll be able to post an example of what I describe below within a day or two. Why not try something like a heatmap? Have movies as rows and actors as columns. Maybe sort each of them in terms of the number of actors in the movie and...
null
CC BY-SA 2.5
null
2011-04-01T13:58:06.120
2011-04-01T13:58:06.120
null
null
2970
null
9049
2
null
9040
1
null
I wouldn't know how you'd go about constructing this but I liked the method using hyperbolic geometry [http://www.newscientist.com/data/images/ns/cms/dn19420/dn19420-1_800.jpg](http://www.newscientist.com/data/images/ns/cms/dn19420/dn19420-1_800.jpg) [http://www.newscientist.com/article/dn19420-escherlike-internet-map-...
null
CC BY-SA 2.5
null
2011-04-01T14:30:18.650
2011-04-01T14:30:18.650
null
null
null
null
9050
1
null
null
11
4650
I'd like to obtain a graphic representation of the correlations in articles I have gathered so far to easily explore the relationships between variables. I used to draw a (messy) graph but I have too much data now. Basically, I have a table with: - [0]: name of variable 1 - [1]: name of variable 2 - [2]: correlatio...
How to display a matrix of correlations with missing entries?
CC BY-SA 2.5
null
2011-04-01T14:40:54.433
2011-04-01T17:02:00.770
2011-04-01T16:27:54.967
3827
3827
[ "r", "data-visualization", "correlation" ]
9051
2
null
9038
3
null
You would not expect your two sets of numbers to be the same: the NIST numbers seem to be have been published to [test statistical software](http://www.itl.nist.gov/div898/strd/general/bkground.html) while the Australian BOM numbers are designed to [identify whether the ENSO cycle is above or below average](http://www....
null
CC BY-SA 2.5
null
2011-04-01T14:50:47.687
2011-04-01T14:50:47.687
null
null
2958
null
9052
2
null
9050
5
null
Your data may be like ``` name1 name2 correlation 1 V1 V2 0.2 2 V2 V3 0.4 ``` You can rearrange your long table into a wide one with the following R code ``` d = structure(list(name1 = c("V1", "V2"), name2 = c("V2", "V3"), correlation = c(0.2, 0.4)), .Names = c("name1", "name2", ...
null
CC BY-SA 2.5
null
2011-04-01T15:10:47.950
2011-04-01T15:10:47.950
null
null
3911
null
9053
1
9055
null
45
54369
Why does a cross-validation procedure overcome the problem of overfitting a model?
How does cross-validation overcome the overfitting problem?
CC BY-SA 2.5
null
2011-04-01T16:26:57.173
2020-07-19T23:07:44.370
2020-07-19T23:07:44.370
12359
3269
[ "regression", "cross-validation", "model-selection", "overfitting" ]
9054
2
null
9050
12
null
Building upon @GaBorgulya's response, I would suggest trying fluctuation or level plot (aka heatmap displays). For example, using [ggplot2](http://had.co.nz/ggplot2/): ``` library(ggplot2, quietly=TRUE) k <- 100 rvals <- sample(seq(-1,1,by=.001), k, replace=TRUE) rvals[sample(1:k, 10)] <- NA cc <- matrix(rvals, nr=10) ...
null
CC BY-SA 2.5
null
2011-04-01T16:38:04.397
2011-04-01T17:02:00.770
2011-04-01T17:02:00.770
930
930
null
9055
2
null
9053
35
null
I can't think of a sufficiently clear explanation just at the moment, so I'll leave that to someone else; however cross-validation does not completely overcome the over-fitting problem in model selection, it just reduces it. The cross-validation error does not have a negligible variance, especially if the size of the ...
null
CC BY-SA 3.0
null
2011-04-01T16:51:53.760
2015-12-10T17:36:21.880
2015-12-10T17:36:21.880
887
887
null
9056
2
null
9050
3
null
The `corrplot` package is a useful function for visualizing correlation matrices. It accepts a correlation matrix as the input object and has several options for displaying the matrix itself. A nice feature is that it can reorder your variables using hierarchical clustering or PCA methods. See the accepted answer in [t...
null
CC BY-SA 2.5
null
2011-04-01T16:52:54.727
2011-04-01T16:52:54.727
2017-04-13T12:44:25.283
-1
3309
null
9057
2
null
9029
6
null
Agresti 2007 discusses them. They're in chapter 9 and 10. The 2002 edition probably discusses them too, as @suncoolsu mentioned. Agresti refers to the group of response variables as a cluster and discusses according analysis with marginal models, conditional models and generalized estimating equations.
null
CC BY-SA 3.0
null
2011-04-01T16:57:26.190
2014-10-18T17:16:56.540
2014-10-18T17:16:56.540
3874
3874
null
9058
2
null
9033
4
null
When correctly rewritten (as indicated in a comment), it will be the [Anderson-Darling](http://en.wikipedia.org/wiki/Anderson%E2%80%93Darling_test) statistic (for a normality test).
null
CC BY-SA 2.5
null
2011-04-01T18:11:38.237
2011-04-01T18:11:38.237
null
null
919
null
9059
2
null
9053
18
null
My answer is more intuitive than rigorous, but maybe it will help... As I understand it, overfitting is the result of model selection based on training and testing using the same data, where you have a flexible fitting mechanism: you fit your sample of data so closely that you're fitting the noise, outliers, and all th...
null
CC BY-SA 2.5
null
2011-04-01T18:23:29.910
2011-04-01T18:23:29.910
null
null
1764
null
9060
2
null
9030
2
null
Some people have started to look at this issue in the chemometrics literature. For instance, about 20 years ago Robert Gibbons started to do statistical analyses suggesting instrument responses (for low-level measurement of chemicals) were nonlinear, heteroscedastic, and had non-normal (perhaps lognormal) error distri...
null
CC BY-SA 4.0
null
2011-04-01T20:39:18.377
2022-06-20T12:23:38.553
2022-06-20T12:23:38.553
919
919
null
9061
2
null
8911
0
null
R would be my first vote. Another free option would be gretl. If you happen to know BUGS, JAGS makes sense and is free. And I really don't like its syntax, but if you have some knowledge of Matlab, the free alternative Octave runs on MacOS X as well.
null
CC BY-SA 2.5
null
2011-04-01T21:35:45.077
2011-04-01T21:35:45.077
null
null
1764
null
9062
1
9096
null
6
8032
I have a 2x3 contingency table - the row variable is a factor, the column variable is an ordered factor (ordinal level). I'd like to apply either symmetrical or asymmetrical association technique. What do you recommend me to do? Which technique do you find the most appropriate?
Measure of association for 2x3 contingency table
CC BY-SA 2.5
null
2011-04-01T21:45:15.740
2011-04-02T16:46:40.420
null
null
1356
[ "correlation", "categorical-data", "contingency-tables", "association-measure" ]
9063
2
null
9062
3
null
On a 2x3 contingency table where the three-level factor is ordered you may use rank correlation (Spearman or Kendall) to assess association between the two variables. You may also think about the data as an ordered variable observed in two groups. A corresponding significance test could be the Mann-Whitney test (with m...
null
CC BY-SA 2.5
null
2011-04-01T22:39:37.960
2011-04-01T22:39:37.960
null
null
3911
null
9064
1
9084
null
6
2376
I've heard a bit about the 'kernel trick' for support vector machines, and I was wondering: - How do you identify problems that might benefit from the kernel trick? - How to implement it in R? Thank you
Implementing the 'kernel trick' for a support vector machine in R
CC BY-SA 2.5
null
2011-04-01T23:15:45.397
2015-04-19T20:48:43.750
2015-04-19T20:48:43.750
9964
2817
[ "r", "machine-learning", "svm", "kernel-trick" ]
9065
5
null
null
0
null
Overview From The Discipline of Machine Learning by Tom Mitchell: > The field of Machine Learning seeks to answer the question "How can we build computer systems that automatically improve with experience, and what are the fundamental laws that govern all learning processes?" This question covers a broad range of lear...
null
CC BY-SA 3.0
null
2011-04-01T23:43:56.183
2017-08-30T17:14:06.607
2017-08-30T17:14:06.607
171895
7365
null
9066
4
null
null
0
null
Machine learning algorithms build a model of the training data. The term "machine learning" is vaguely defined; it includes what is also called statistical learning, reinforcement learning, unsupervised learning, etc. ALWAYS ADD A MORE SPECIFIC TAG.
null
CC BY-SA 4.0
null
2011-04-01T23:43:56.183
2019-04-08T14:17:29.407
2019-04-08T14:17:29.407
28666
7365
null
9067
1
9088
null
1
9404
I am taking a class in data mining and I am working on a term project using the [BRFSS](http://www.cdc.gov/brfss/) dataset. I have a huge dataset with 405 columns and 12,000 rows. There are many columns which are completely empty. I was trying to remove empty columns using SAS, R or Excel but it doesn't work. Could you...
Removing empty columns from a dataset
CC BY-SA 2.5
null
2011-04-02T00:07:35.167
2012-12-14T15:19:22.137
2011-04-02T13:09:16.883
null
3897
[ "excel" ]
9068
1
9090
null
12
13951
I am having a problem computing the pearson correlation coefficient of data sets with possibly zero standard deviation (i.e. all data has the same value). Suppose that I have the following two data sets: ``` float x[] = {2, 2, 2, 3, 2}; float y[] = {2, 2, 2, 2, 2}; ``` The correlation coefficient "r", would be compute...
Pearson correlation of data sets with possibly zero standard deviation?
CC BY-SA 2.5
null
2011-04-01T14:57:10.287
2011-04-29T01:08:20.040
2011-04-29T01:08:20.040
3911
3993
[ "correlation" ]
9069
2
null
9062
2
null
One way to incorporate the ordering of the column factor into your analysis is to use the cumulative frequencies instead of the cell frequencies. So in your table you have: $$f_{ij}=\frac{n_{ij}}{n_{\bullet\bullet}}\;\;\;\; i=1,2\;\;j=1,2,3$$ where a "$\bullet$" indicates sum over that index. So I suggesting modeling...
null
CC BY-SA 2.5
null
2011-04-02T00:25:13.240
2011-04-02T00:25:13.240
null
null
2392
null
9070
2
null
9062
1
null
You could use the Jonckheere Terpstra test. In SAS, you can get this in PROC FREQ with the /JT option on the tables statement. I didn't see a function for it in R, but there may be one out there.
null
CC BY-SA 2.5
null
2011-04-02T01:14:14.767
2011-04-02T01:14:14.767
null
null
686
null
9071
1
9073
null
18
6714
If I have two normally distributed independent random variables $X$ and $Y$ with means $\mu_X$ and $\mu_Y$ and standard deviations $\sigma_X$ and $\sigma_Y$ and I discover that $X+Y=c$, then (assuming I have not made any errors) the conditional distribution of $X$ and $Y$ given $c$ are also normally distributed with me...
Intuitive explanation of contribution to sum of two normally distributed random variables
CC BY-SA 2.5
null
2011-04-02T01:28:12.757
2011-04-02T03:05:20.290
2017-04-13T12:19:38.800
-1
2958
[ "normal-distribution", "conditional-probability" ]
9072
2
null
9068
0
null
The correlation is undefined in that case. If you must define it, I would define it as 0, but consider a simple mean absolute difference instead.
null
CC BY-SA 2.5
null
2011-04-02T02:07:54.087
2011-04-02T02:07:54.087
null
null
2456
null
9073
2
null
9071
17
null
The question readily reduces to the case $\mu_X = \mu_Y = 0$ by looking at $X-\mu_X$ and $Y-\mu_Y$. Clearly the conditional distributions are Normal. Thus, the mean, median, and mode of each are coincident. The modes will occur at the coordinates of a local maximum of the bivariate PDF of $X$ and $Y$ constrained to t...
null
CC BY-SA 2.5
null
2011-04-02T03:05:20.290
2011-04-02T03:05:20.290
null
null
919
null
9074
1
9082
null
7
11660
I'm wondering how to implement two-way clustering, as explained in [Statistica documentation](http://www.statsoft.com/textbook/cluster-analysis/#twotwo) in R. Any help in this regard will be highly appreciated. Thanks
Two-way clustering in R
CC BY-SA 2.5
null
2011-04-02T05:39:09.150
2011-04-02T13:07:14.437
2011-04-02T13:07:14.437
null
3903
[ "r", "clustering", "multivariate-analysis" ]
9075
2
null
9064
3
null
you should take a look at kernlab R package. They even have a very nice [vignette](http://cran.r-project.org/web/packages/kernlab/vignettes/kernlab.pdf).
null
CC BY-SA 2.5
null
2011-04-02T06:08:42.183
2011-04-02T06:08:42.183
null
null
223
null
9076
1
9078
null
2
547
I am trying to programmatically identify an ARIMA model for a series of data and forecast values. Currently the problem i am facing is to find a way to evaluate partial autocorrelation. I have been looking for methods to calculate PACF for quite a long time now but in vain. Please provide some online resources which ...
Methods for evaluating partial autocorrelation for identification of ARIMA models
CC BY-SA 2.5
null
2011-04-02T06:29:34.960
2011-04-04T18:01:02.420
2011-04-02T10:22:43.337
930
3972
[ "autocorrelation", "arima" ]
9077
2
null
9067
2
null
If they really are just completely blank columns then in R... ``` read.table( 'myBigFile', strip.white = TRUE) ``` might do what you want. You will have to set other arguments of the read.table() command as needed. It's best to use this when specifying the specific column delimiter you have.
null
CC BY-SA 2.5
null
2011-04-02T07:11:25.833
2011-04-02T07:24:39.017
2011-04-02T07:24:39.017
601
601
null
9078
2
null
9076
3
null
Use the Durbin-Levinson algorithm. It will be explained in any good time series book such as [Brockwell and Davis](http://rads.stackoverflow.com/amzn/click/0387953515). Here are some online explanations: - http://www.stat.ufl.edu/~berg/sta4853/files/sta4853-4.pdf - http://amath.colorado.edu/courses/4540/2008Spr/HandO...
null
CC BY-SA 2.5
null
2011-04-02T07:12:52.580
2011-04-02T07:12:52.580
null
null
159
null
9079
2
null
9068
6
null
I agree with sesqu that the correlation is undefined in this case. Depending on your type of application you could e.g. calculate the Gower Similarity between both vectors, which is: $gower(v1,v2)=\frac{\sum_{i=1}^{n}\delta(v1_i,v2_i)}{n}$ where $\delta$ represents the [kronecker-delta](http://en.wikipedia.org/wiki/Kro...
null
CC BY-SA 2.5
null
2011-04-02T08:31:46.503
2011-04-02T08:31:46.503
null
null
264
null
9080
1
null
null
1
304
The objective of this research was to investigate the long-term effects of irrigation with treated waste water on some chemical soil properties. The investigation was carried out by comparison of soil properties in two different fields: one irrigated with the effluent from Parkan Waste water Treatment Plant over a per...
How to do a linear model in R?
CC BY-SA 2.5
null
2011-04-02T09:09:33.990
2011-04-02T12:45:38.977
2011-04-02T10:36:18.717
930
3996
[ "r", "regression" ]
9081
2
null
9080
5
null
The syntax is actually absurdly simple: ``` mymodel <- lm(dependentvariable ~ continuousvariable + categoricalvariable, data=yourdata). ``` You can then call `summary()` to get the coefficients, and `plot()` to examine the residuals. HTH.
null
CC BY-SA 2.5
null
2011-04-02T09:16:40.097
2011-04-02T10:37:25.003
2011-04-02T10:37:25.003
930
656
null
9082
2
null
9074
9
null
Generally speaking, you should always find useful pointers by looking at the relevant CRAN TAsk Views, in this case the one that deals with [Cluster](http://cran.r-project.org/web/views/Cluster.html) packages, or maybe [Quick-R](http://www.statmethods.net/). It's not clear to me whether the link you gave referenced sta...
null
CC BY-SA 2.5
null
2011-04-02T10:20:17.737
2011-04-02T10:27:54.797
2017-04-13T12:44:21.160
-1
930
null
9083
2
null
9080
2
null
First you have to enter your data into R, see [this class note](http://www.ats.ucla.edu/stat/r/notes/entering.htm). You can follow the steps of [this tutorial](http://data.princeton.edu/R/linearModels.html) in the analysis, section 4.4 has a very similar example. In visualization you could do something similar as the `...
null
CC BY-SA 2.5
null
2011-04-02T11:24:37.767
2011-04-02T12:45:38.977
2011-04-02T12:45:38.977
3911
3911
null
9084
2
null
9064
9
null
- Basically anything what is not separable with a line (ok, hyperplane), for instance 2D data like this: kernel trick will effectively project this situation into a (higher-dim) space in which linear separation is possible; see this movie for an effect of a gaussian kernel on similar data. - Look for a kernel argume...
null
CC BY-SA 2.5
null
2011-04-02T13:21:19.140
2011-04-02T13:21:19.140
null
null
null
null
9085
1
9146
null
20
3156
In my attempts to fight spreadsheet mayhem, I am often evangelical in pushing for more robust tools such as true statistics software (R, Stata, and the like). Recently, I was challenged on this view by someone who stated flat out that they simply will not learn to program. I would like to provide them with data analy...
Software for easy-yet-robust data exploration
CC BY-SA 2.5
null
2011-04-02T13:32:36.553
2015-07-06T00:51:14.617
null
null
3488
[ "data-visualization", "software" ]
9086
2
null
9085
3
null
A new software system that looks promising for this purpose is [Deducer](http://www.r-bloggers.com/r-ready-to-deduce-you/), built on top of R. Unfortunately, being new, I suspect it does not yet cover the breadth of questions that people might ask, but it does meet the toe-in-the-water criterion of leading people towa...
null
CC BY-SA 3.0
null
2011-04-02T13:35:47.410
2012-07-29T00:03:30.923
2012-07-29T00:03:30.923
3488
3488
null
9087
1
9091
null
7
277
Let $X = N(0,\frac{1}{\alpha})$, $Y = 2X + 8 + N_{y}$, and $N_{y}$ be a noise $N_{y} = N(0,1)$. Then, $P(y|x) = \frac{1}{\sqrt{2\pi}}exp\{ -\frac{1}{2}(y - 2x - 8)^{2} \}$ and $P(x) = \sqrt{\frac{\alpha}{2\pi}}exp\{-\frac{\alpha x^{2}}{2}\} $. The mean vector is: $$\mathbf{\mu} = \left( \begin{array}{c} \mu_{x}\\ ...
Inference with Gaussian Random Variable
CC BY-SA 2.5
null
2011-04-02T13:49:55.227
2011-04-29T00:42:48.390
2011-04-29T00:42:48.390
3911
1371
[ "normal-distribution", "variance", "random-variable", "inference" ]
9088
2
null
9067
3
null
Empty columns contain `NA`s only or `""`s only, they have has no variability. This code removes all columns without variability (which is probably a plus in this case). ``` d=data.frame(r=seq(1, 5), a=rep('a', 5), n=rep(NA, 5), n1=c(NA, NA, 3, 3, 3)) homogenous = apply(d, 2, function(var) length(unique(var)) == 1) d[,...
null
CC BY-SA 2.5
null
2011-04-02T14:05:43.993
2011-04-02T14:05:43.993
null
null
3911
null
9089
2
null
9087
6
null
Solution to this homework is straightforward application of simple algebra and independence of $X$ and $N_y$: $\mathbb{E} (2 X + N_y)^2 = 4 \mathbb{E} X^2 + 4 \mathbb{E} X \mathbb{E} N_y + \mathbb{E} N_y^2 = 4 Var X + 0 + Var N_y = \frac{4}{\alpha} + 1$.
null
CC BY-SA 2.5
null
2011-04-02T14:05:58.993
2011-04-02T16:02:38.683
2011-04-02T16:02:38.683
2645
2645
null
9090
2
null
9068
9
null
The "sampling theory" people will tell you that no such estimate exists. But you can get one, you just need to be reasonable about your prior information, and do a lot harder mathematical work. If you specified a Bayesian method of estimation, and the posterior is the same as the prior, then you can say the data say n...
null
CC BY-SA 2.5
null
2011-04-02T14:06:14.687
2011-04-02T14:06:14.687
null
null
2392
null
9091
2
null
9087
8
null
The law of iterated expectations can help here. We have: $$Var[Y]=E(Var[Y|X])+Var[E(Y|X)]$$ Now conditional on $X$ the expected value of $Y$ is $2X+8$, and its variance is $1$. So we have: $$Var[Y]=E(1)+Var[2X+8]=1+4 Var[X]=1+\frac{4}{\alpha}$$
null
CC BY-SA 2.5
null
2011-04-02T14:25:22.247
2011-04-02T14:25:22.247
null
null
2392
null
9092
2
null
9068
0
null
This question is coming from programmers, so I'd suggest plugging in zero. There's no evidence of a correlation, and the null hypothesis would be zero (no correlation). There might be other context knowledge that would provide a "typical" correlation in one context, but the code might be re-used in another context.
null
CC BY-SA 2.5
null
2011-04-02T15:04:59.187
2011-04-02T15:04:59.187
null
null
3919
null
9093
2
null
9085
8
null
Some people think of programming as simply entering a command line statement. At that point then perhaps you are a bit lost in encouraging them. However, if they are using spreadsheets already then they already have to enter formulas. These are akin to command line statements. If they really mean they don't want to...
null
CC BY-SA 2.5
null
2011-04-02T15:11:16.043
2011-04-04T17:09:56.883
2011-04-04T17:09:56.883
601
601
null
9094
2
null
9085
8
null
As far as exploratory (possibly interactive) data analysis is concerned, I would suggest to take a look at: - Weka, originally targets data-mining applications, but can be used for data summaries. - Mondrian, for interactive data visualization. - KNIME, which relies on the idea of building data flows and is compatib...
null
CC BY-SA 2.5
null
2011-04-02T15:11:34.827
2011-04-02T15:11:34.827
null
null
930
null
9096
2
null
9062
5
null
Linear or monotonic trend tests--$M^2$ association measure, WMW test cited by @GaBorgulya, or the Cochran-Armitage trend test--can also be used, and they are well explained in Agresti ([CDA](http://www.stat.ufl.edu/~aa/cda/cda.html), 2002, §3.4.6, p. 90). The latter is actually equivalent to a score test for testing $...
null
CC BY-SA 2.5
null
2011-04-02T16:46:40.420
2011-04-02T16:46:40.420
2017-04-13T12:44:46.083
-1
930
null
9097
2
null
5690
6
null
One thing to keep in mind with the Kaplan-Meier survival curve is that it is basically descriptive and not inferential. It is just a function of the data, with an incredibly flexible model that lies behind it. This is a strength because this means there is virtually no assumptions that might be broken, but a weakness...
null
CC BY-SA 2.5
null
2011-04-02T16:47:55.793
2011-04-02T23:46:01.627
2011-04-02T23:46:01.627
2392
2392
null
9098
2
null
5690
3
null
First I would visualize the data: calculate confidence intervals and standard errors for the median survivals in each state and show CIs on a forest plot, medians and their SEs using a funnel plot. The “mean median survival all across the country” is a quantity that is estimated from the data and thus has uncertainty ...
null
CC BY-SA 2.5
null
2011-04-02T17:07:50.450
2011-04-03T01:21:43.877
2011-04-03T01:21:43.877
3911
3911
null
9099
1
52350
null
5
4778
Diallel Analysis using the Griffing and Hayman approach is so common in plant breeding and genetics. I'm wondering if someone can share R worked example on Diallel Analysis. Is there any good referenced book which covered worked examples? Thanks References: Griffing B (1956) Concept of general and specific combining ab...
How to perform diallel analysis in R?
CC BY-SA 3.0
null
2011-04-02T17:18:59.177
2013-12-03T09:22:09.447
2011-08-21T07:02:46.460
5862
3903
[ "r", "experiment-design", "genetics" ]
9100
2
null
9053
4
null
From a Bayesian perspective, I'm not so sure that cross validation does anything that a "proper" Bayesian analysis doesn't do for comparing models. But I am not 100% certain that it does. This is because if you are comparing models in a Bayesian way, then you are essentially already doing cross validation. This is be...
null
CC BY-SA 2.5
null
2011-04-02T17:40:55.537
2011-04-02T17:40:55.537
null
null
2392
null
9101
2
null
8567
1
null
I do not know the answer, so I can only offer some thoughts hoping that someone else can throw light on the issue. It seems to me that there is no problem in computing the likelihood. To compute the value of the AIC criterion (which may or may not make sense in this context), what would be required is the number of fit...
null
CC BY-SA 2.5
null
2011-04-02T17:53:53.967
2011-04-02T17:53:53.967
null
null
892
null
9102
2
null
8898
5
null
As it is described in the original post, the experiment is a randomized block. - Pathologist (4 levels) is a blocking factor; the experiment is repeated within each pathologist. - Instrument (3 levels) and the true result (2 levels) of the test are the two treatments, which I assume were assigned randomly. - Conside...
null
CC BY-SA 3.0
null
2011-04-02T19:09:55.037
2011-04-24T17:14:47.580
2011-04-24T17:14:47.580
3874
3874
null
9103
2
null
9067
0
null
Hard for me to think of this as a huge dataset, but these things are relative ;) To do this in excel (a version like 2007 or 2010 which has enough columns), you could insert two rows at the top. In the first row, just have consecutive integers: 1 in column A, 2 in column B, etc. You can do this with a function [I thi...
null
CC BY-SA 2.5
null
2011-04-02T20:36:24.113
2011-04-02T20:36:24.113
null
null
3919
null
9104
1
9161
null
12
19326
I have the following question for a course I'm working on: > Conduct a Monte Carlo study to estimate the coverage probabilities of the standard normal bootstrap confidence interval and the basic bootstrap confidence interval. Sample from a normal population and check the empirical coverage rates for the sample ...
Coverage probabilities of the basic bootstrap confidence Interval
CC BY-SA 3.0
null
2011-04-02T20:42:02.777
2015-12-15T23:32:22.733
2015-12-15T23:32:22.733
4253
1894
[ "r", "confidence-interval", "self-study", "bootstrap", "monte-carlo" ]
9105
1
null
null
16
1288
for the following 3 values 222,1122,45444 [WolframAlpha gives](http://www.wolframalpha.com/input/?i=skew+222%2C1122%2C45444+) 0.706 Excel, using `=SKEW(222,1122,45444)` gives 1.729 What explains the difference?
Why do Excel and WolframAlpha give different values for skewness
CC BY-SA 2.5
null
2011-04-02T21:57:45.523
2011-11-20T04:41:40.967
2011-11-20T04:41:40.967
1381
276
[ "excel", "software", "descriptive-statistics", "mathematica" ]
9106
2
null
9105
19
null
They are using different methods to compute the skew. Searching in the help pages for `skewness()` within the R package `e1071` yields: ``` Joanes and Gill (1998) discuss three methods for estimating skewness: Type 1: g_1 = m_3 / m_2^(3/2). This is the typical definition used in many older textbooks. Type 2: G_1 = g_1...
null
CC BY-SA 2.5
null
2011-04-02T22:07:09.333
2011-04-02T22:07:09.333
null
null
696
null
9107
1
9108
null
4
281
I would like to plot the attached [income distribution dataset](https://i.stack.imgur.com/acNhK.jpg) (rendered as an image) as an area chart. As you can see, personal income is divided into 26 intervals of varying width. I also have the average and mean income in the intervals. To convey a truthful area graphic of this...
Categorical or continuous scale for area chart?
CC BY-SA 2.5
null
2011-04-02T22:08:57.993
2011-04-03T12:15:46.313
2011-04-03T09:10:18.443
930
4003
[ "distributions", "data-visualization", "data-transformation", "categorical-data" ]
9108
2
null
9107
4
null
This is not exactly what you asked, but still may be helpful. You may rely on the `plot.histogram` command in R. The usual use is to run a `hist` command, which prepares an object of class `histogram` and passes it to `plot.histogram`. You may prepare a customized `histogram` object yourself and plot it with `plot.hist...
null
CC BY-SA 2.5
null
2011-04-02T22:43:06.963
2011-04-03T12:15:46.313
2011-04-03T12:15:46.313
3911
3911
null
9109
1
null
null
2
1700
I have finally been able to wrap my head around the mechanics of how to initialize and train a multivariate Gaussian mixture model using expectation maximization algorithm. So I wonder how difficult this GMM and EM task is in comparison to all other common algorithms and models in machine learning. I appreciate any fee...
How difficult is it to train a gaussian mixture model compared to other models?
CC BY-SA 2.5
null
2011-04-02T22:51:25.520
2011-04-04T06:35:27.023
2011-04-03T09:19:38.667
930
2729
[ "mixed-model", "normal-distribution", "maximum-likelihood" ]
9110
2
null
9085
2
null
Anyone who answers R, or any of it's "GUIs" didn't read the question. There is a program specifically designed for this and it's called JMP. Yes, it's expensive, though it has a free trial, and is incredibly cheap for students or college staff (like $50 cheap). There is also RapidMiner, which is a workflow-based GUI ...
null
CC BY-SA 2.5
null
2011-04-02T22:53:03.193
2011-04-02T22:53:03.193
null
null
74
null
9111
1
9112
null
9
27399
I am assuming R has this built-in. How do I reference it?
In R how do I reference\lookup in the cdf of standard normal distribution table?
CC BY-SA 2.5
null
2011-04-02T19:10:34.457
2011-04-08T20:42:13.073
2011-04-08T20:42:13.073
919
4008
[ "r", "normal-distribution" ]
9112
2
null
9111
13
null
The functions you are looking for are either `dnorm`, `pnorm` or `qnorm`, depending on exactly what you are looking for. `dnorm(x)` gives the density function at `x`. `pnorm(x)` gives the probability that a random value is less than `x`. `qnorm(p)` is the inverse of `pnorm`, giving the value of `x` for which getting a ...
null
CC BY-SA 2.5
null
2011-04-02T20:21:03.230
2011-04-03T01:43:38.397
2011-04-03T01:43:38.397
72
72
null
9114
2
null
9109
3
null
[this paper](http://www.uv.es/~bernardo/Kernel.pdf) is a small gem about fitting mixtures of gaussians to the data using Bayesian methods. Big plus: no maximising algorithms required, so should be quick compared to EM algorithm. Also paper has testing data, so you can test each method against this one if you want. An...
null
CC BY-SA 2.5
null
2011-04-03T01:42:41.927
2011-04-03T01:42:41.927
null
null
2392
null
9115
2
null
9107
3
null
A histogram with a continuous scale as described by GaBorgulya is clearly the way to go. When the blocks are wider, you need to adjust the density appropriately: the block 380-399 with 42246 people should be about 1.6 times the density of the block 400-499 with 132485 people. Except for the extremes of 0 and 1000+...
null
CC BY-SA 2.5
null
2011-04-03T01:51:49.713
2011-04-03T01:51:49.713
null
null
2958
null
9116
1
9118
null
0
4822
First off, be warned: I am a complete stats novice. I'd like to learn, but at the moment I have an intense business problem to solve that I think (hope?) is straightforward enough that it could be answered easily. I will try to explain as simply as I can so I don't muck it up. In short, i'm trying to find the right way...
How to properly weight contributing percentages?
CC BY-SA 2.5
null
2011-04-03T03:04:46.487
2011-04-03T03:18:51.280
2011-04-03T03:18:29.550
4004
4004
[ "pie-chart" ]
9117
2
null
9085
7
null
I can recommend Tableau as a good tool for data exploration and visualization, simply because of the different ways that you can explore and view the data, simply by dragging and dropping. The graphs are fairly sharp and you can easily output to PDF for presentation purposes. If you want you can extend it with some "p...
null
CC BY-SA 2.5
null
2011-04-03T03:07:13.240
2011-04-03T03:07:13.240
null
null
3489
null
9118
2
null
9116
1
null
It might be easier than I thought -- please let me know if this is correct or on the right path. Let's assume the following data: - Company A: 70 percentage of capture across 10 contracts - Company B: 60 percentage of capture across 100 contracts - Company C: 50 percentage of capture across 40 contracts First, I f...
null
CC BY-SA 2.5
null
2011-04-03T03:18:51.280
2011-04-03T03:18:51.280
null
null
4004
null
9119
2
null
8567
3
null
The dlmMLE function in the dlm package will compute the likelihood. Then AIC = -2 log(likelihood) + 2p where p is the number of parameters estimated. You might like to read the [vignette for the dlm package](http://cran.r-project.org/web/packages/dlm/vignettes/dlm.pdf) which contains a lot of helpful information and ...
null
CC BY-SA 2.5
null
2011-04-03T04:34:24.763
2011-04-03T04:34:24.763
null
null
159
null
9120
2
null
2504
6
null
In order to test such a vague hypothesis, you need to average out over all densities with finite variance, and all densities with infinite variance. This is likely to be impossible, you basically need to be more specific. One more specific version of this and have two hypothesis for a sample $D\equiv Y_{1},Y_{2},\dot...
null
CC BY-SA 2.5
null
2011-04-03T05:03:28.207
2011-04-03T22:43:02.550
2011-04-03T22:43:02.550
2392
2392
null
9121
1
11424
null
3
1675
I've seen couple of articles reporting individuals standard deviations and/or standard errors for groups even after implementing ANOVA. My understanding is that groups SE's should be based on experimental error mean square. Any comment?
Individuals standard deviations and/or standard errors for groups after implementing ANOVA?
CC BY-SA 2.5
null
2011-04-03T06:28:11.013
2011-06-01T10:11:22.020
2011-06-01T10:11:22.020
930
3903
[ "anova", "standard-deviation", "experiment-design", "standard-error" ]
9124
1
null
null
2
4679
In S-plus estimates of percentiles for a survival function can be obtained using the `qkaplanMeier` function (on the results of a call to kaplanMeier) like that: ``` kfit <-kaplanMeier(censor(TIME,STATUS)~1) qkaplanMeier(kfit, c(.25, .5, .75)) ``` How can I do this in R?. Those functions do not exist anymore. What if ...
Estimates and C.I. of percentiles for a survival function
CC BY-SA 2.5
null
2011-04-03T11:06:21.313
2023-04-29T06:23:20.560
2011-04-03T11:18:23.073
339
339
[ "r", "confidence-interval", "survival" ]
9125
2
null
9124
3
null
The [CRAN task view on survival analysis](http://cran.r-project.org/web/views/Survival.html) says: Kaplan-Meier: The `survfit` function from the [survival](http://cran.r-project.org/web/packages/survival/index.html) package computes the Kaplan-Meier estimator for truncated and/or censored data. [rms](http://cran.r-proj...
null
CC BY-SA 4.0
null
2011-04-03T11:40:56.150
2023-04-29T06:23:20.560
2023-04-29T06:23:20.560
362671
2958
null
9126
2
null
9124
2
null
The `bootkm()` function in [Hmisc](http://cran.r-project.org/web/packages/Hmisc/index.html) provides bootstraped estimate of the probability of survival, as well as the estimate of the quantile of the survival distribution (through either `describe` or `quantile` applied onto the result of `bootkm`).
null
CC BY-SA 2.5
null
2011-04-03T12:44:55.260
2011-04-03T12:44:55.260
null
null
930
null
9127
1
null
null
3
2684
Where can I obtain all hourly weather data available? Notes: - Ideally, this would include the history of all data currently published at: here here here - I've obtained 10 years of METAR data from wunderground.com like this: curl -H 'Cookie: Prefs=|SHOWMETAR:1|;' -o data.txt 'http://www.wunderground.com/histor...
How to fetch all historically available hourly weather data?
CC BY-SA 4.0
null
2011-04-03T14:27:58.373
2022-11-22T02:20:05.457
2022-11-22T02:20:05.457
362671
null
[ "time-series", "dataset" ]
9128
2
null
9085
4
null
As John said, data exploration doesn't require much programming in R. Here's a list of data exploration commands you can give people. (I just came up with this; you can surely expand it.) Export the data from whatever package it's in. (Exporting numerical data without quotation marks is convenient.) Then read the data ...
null
CC BY-SA 2.5
null
2011-04-03T14:49:47.713
2011-04-03T14:55:02.353
2011-04-03T14:55:02.353
3874
3874
null
9129
1
null
null
5
1303
I am currently looking for some Information Retrieval techniques. I have a SQL database table containing strings. It has 1000 records, each being a random sentence I picked from random web sites. I need to get the term frequency and represent each string into a vector. I also need to cluster the records, e.g. using k-m...
How to compute term frequency and find clusters in a dataset composed of strings?
CC BY-SA 2.5
null
2011-04-03T15:33:54.147
2011-09-02T12:37:19.820
2011-04-03T16:26:29.463
930
4020
[ "clustering", "information-retrieval" ]
9130
2
null
9127
3
null
This may be simplistic, but if you have a consistent directory structure on the NOAA site (they usually are), you can recursive wget the entire thing, then sort through it at your leisure. ``` wget -r http://weather.noaa.gov/pub/SL.us008001/DF.an/ ``` This will grab everything recursively from that URL and deeper. It...
null
CC BY-SA 2.5
null
2011-04-03T15:41:42.047
2011-04-03T15:41:42.047
null
null
781
null
9131
1
9144
null
22
10010
Let's take the following example: ``` set.seed(342) x1 <- runif(100) x2 <- runif(100) y <- x1+x2 + 2*x1*x2 + rnorm(100) fit <- lm(y~x1*x2) ``` This creates a model of y based on x1 and x2, using a OLS regression. If we wish to predict y for a given x_vec we could simply use the formula we get from the `summary(fit)`....
Obtaining a formula for prediction limits in a linear model (i.e.: prediction intervals)
CC BY-SA 4.0
null
2011-04-03T18:24:49.593
2021-09-27T14:11:17.713
2019-04-15T11:33:54.723
253
253
[ "r", "regression", "predictive-models", "prediction-interval" ]
9132
1
9133
null
2
2798
We are trying to predict values of variable A having N other variables. What we do, we calculate Pearson correlation between A and each of the other N variables, for last M values, using fixed M. We use variable with largest correlation coefficient as predictor. This scheme works fine when analyzing N variables during ...
Alternatives to Pearson correlation
CC BY-SA 2.5
null
2011-04-03T20:02:37.747
2011-04-03T20:47:44.887
2011-04-03T20:39:22.490
null
4010
[ "correlation" ]
9133
2
null
9132
3
null
This is generally hard to tell without knowing what the problem exactly is, but I would advise you to try some machine learning methods. For start you may try random forest, which is almost trivial to apply and quite probably will achieve better accuracy than just using one, best-correlated variable. Also, it will prod...
null
CC BY-SA 2.5
null
2011-04-03T20:47:44.887
2011-04-03T20:47:44.887
null
null
null
null
9134
2
null
9131
9
null
Are you by chance after the different types of prediction intervals? The `predict.lm` manual page has ``` ## S3 method for class 'lm' predict(object, newdata, se.fit = FALSE, scale = NULL, df = Inf, interval = c("none", "confidence", "prediction"), level = 0.95, type = c("response", "terms"), ...
null
CC BY-SA 2.5
null
2011-04-03T21:04:33.583
2011-04-03T21:04:33.583
null
null
334
null
9135
1
null
null
4
205
Given two point sets, $B$ consisting of blue points, and $R$ of red points, on the plane. The problem is to formulate a theoretical model to compare the average runtime of the Computational Geometric (CG) Algorithm and the [ Perceptron Learning (PL) ](http://en.wikipedia.org/wiki/Perceptron#Learning_algorithm) for shat...
Computational geometry vs perceptron for shattering
CC BY-SA 2.5
null
2011-04-03T21:12:07.560
2021-05-22T00:59:36.957
2021-05-22T00:59:36.957
11887
4011
[ "neural-networks", "algorithms", "geometry" ]
9136
2
null
8911
0
null
Try [http://tukhi.com](http://tukhi.com). It is not clear whether or not they have a Mac OS X Excel version, but they have contact info on that site. It is pretty amazing. Heh, you could always run Window in a VM.
null
CC BY-SA 2.5
null
2011-04-03T21:31:49.947
2011-04-03T21:31:49.947
null
null
null
null
9137
1
9139
null
8
2923
Say there are 3 companies A, B and C. Each company has a quality rating from 0 to 100 and a price in USD. ``` Company Quality Price A 80 7.9 B 70 8.0 C 75 8.1 ``` How do I determine the best quality-price trade-off? What kind of analysis should I use?
Quality-price trade-off
CC BY-SA 2.5
null
2011-04-03T22:17:08.980
2013-06-28T13:24:24.787
2013-06-28T13:24:24.787
919
4013
[ "valuation" ]
9139
2
null
9137
11
null
The [Keeney-Raiffa approach to Multi-attribute valuation theory](http://rads.stackoverflow.com/amzn/click/0521438837) is well-grounded practically and theoretically, has been successfully applied to many problems, and--when applied to problems with just two attributes--is particularly simple. It proceeds by systematic...
null
CC BY-SA 2.5
null
2011-04-03T23:04:03.450
2011-04-03T23:04:03.450
null
null
919
null