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
11578
1
null
null
1
1130
I'm a bit stuck on the general concept and calculations of  iterated expectations. A simple example: $$E[E[Y|X]] = E[Y]$$ I'm not sure how or why this is the case? I have a 3 line proof in my notes using densities and stuff but is there no 'quicker' way. Especially in longer cases like (below) writing everything out is...
Iterated expectations theory
CC BY-SA 3.0
null
2011-06-04T22:39:01.103
2014-07-08T05:37:38.360
2011-06-14T02:20:12.470
2392
4624
[ "self-study" ]
11579
2
null
11568
1
null
Let's take an extreme example where you have just one value in your sample. Then you have no information about the dispersion of $X$ either from your knowledge of the distribution or from your sample and so no way of testing your hypotheses. It does not take much to change this: for example if you know that $X$ is a...
null
CC BY-SA 3.0
null
2011-06-04T23:59:57.423
2011-06-04T23:59:57.423
null
null
2958
null
11580
1
null
null
3
2682
Recently, I read [an article regarding the association between age and lymph node metastases](http://jco.ascopubs.org/content/27/18/2931.long). The authors stated that: > "Because a nonlinear relationship between age and lymph node involvement was expected based on existing literature, lymph node involvement was...
What is nonparametric logistic regression based on locally weighted scatterplot smoothing?
CC BY-SA 3.0
null
2011-06-05T02:55:53.457
2022-09-20T01:25:29.720
2011-07-16T21:19:21.113
930
4887
[ "logistic", "loess" ]
11581
2
null
11553
7
null
I confirmed @caracal's answer with a Monte Carlo experiment. I generated random instances from a linear model (with the size random), computed the F-statistic and computed the p-value using the non-centrality parameter $$ \delta^2 = \frac{||X\beta_1 - X\beta_2||^2}{\sigma^2}, $$ Then I plotted the empirical cdf of the...
null
CC BY-SA 3.0
null
2011-06-05T03:41:28.607
2011-06-05T03:41:28.607
null
null
795
null
11582
1
null
null
1
126
![enter image description here](https://i.stack.imgur.com/HlAfJ.jpg) The above image represents an article's page views over time. X axis is days with 9 being the most recent day. The y-axis is number of pageviews. I'm looking for a decent, not to complex either physics or statistical calculation that would be able to ...
How can I get a velocity of how much this link is trending?
CC BY-SA 3.0
0
2011-06-05T03:42:30.270
2011-06-06T18:39:55.273
null
null
4875
[ "time-series", "statistical-significance", "mathematical-statistics", "trend" ]
11583
1
null
null
1
3311
Does any know the reference/link where i can find the MATLAB implementation of gap statistics for clustering as mentioned in [this](http://gremlin1.gdcb.iastate.edu/MIP/gene/MicroarrayData/gapstatistics.pdf) paper?
Gap statistics MATLAB implementation
CC BY-SA 3.0
null
2011-06-05T05:32:14.513
2014-04-28T19:32:37.817
2011-06-05T12:11:37.537
null
4290
[ "clustering", "matlab", "mathematical-statistics" ]
11584
2
null
11519
1
null
I have noticed there is a data format [GTFS](http://code.google.com/intl/fr-FR/transit/spec/transit_feed_specification.html) created by Google for public transportation data. There is an [interesting repository](http://www.gtfs-data-exchange.com/) with public data all around the world. The only thing that is missing is...
null
CC BY-SA 3.0
null
2011-06-05T06:18:46.220
2011-06-05T06:18:46.220
null
null
223
null
11585
1
null
null
3
354
I took some measurements of some data (code run time measurements, for those curious) of which I have no idea what the expected value is. The data is discrete, and I have no idea what type of properties it has or distribution it follows. The only thing that is known is that the values are more or less independent of ea...
How can I statistically determine if my data on code run time measurements is "good"?
CC BY-SA 3.0
null
2011-06-05T06:45:27.440
2011-08-05T08:39:00.227
2011-06-06T07:44:00.090
183
4888
[ "confidence-interval" ]
11586
2
null
11444
4
null
My answer: I assume $(X,Y)$ is abs cont, i.e. has a density $f_{(X,Y)}$ with respect to Lebesgue measure in $\mathbb{R}^2$. Everything can be done by using parameter "weights" of function density in R, i.e. with a call to $$\text{density}\left ((Y_1,\dots,Y_n),\; \text{ weights}=(e^{|x-X_i|^2/h^2})_{i=1,\dots,n}\right...
null
CC BY-SA 3.0
null
2011-06-05T07:11:22.583
2011-06-05T11:20:23.733
2011-06-05T11:20:23.733
930
223
null
11587
2
null
11578
3
null
This is a simple, but not so simple concept to understand. I personally find using the example of a table to illustrate what is going on. So we have a $2\times 2$ table with counts in each cell. To keep from the "abstract" nature of the concept, I'll use real numbers instead of letters. So we have a table of "being...
null
CC BY-SA 3.0
null
2011-06-05T08:20:21.983
2011-06-05T08:20:21.983
null
null
2392
null
11588
2
null
11562
4
null
### Overview Usually when I think of multiple raters assessing multiple objects, I think of "bias" as a mean difference in expected rating of a particular judge from the mean of a hypothetical population of judges. This is a rather statistical definition of bias, which does not necessarily correspond to everyday def...
null
CC BY-SA 3.0
null
2011-06-05T10:49:37.833
2011-06-05T15:40:09.920
2011-06-05T15:40:09.920
183
183
null
11589
2
null
11494
5
null
If I understand your question correctly, you are wondering why you got different p-values from your t-tests when they are carried out as post-hoc tests or as separate tests. But did you control the [FWER](http://www.utdallas.edu/~herve/Abdi-Bonferroni2007-pretty.pdf) in the second case (because this is what id done wit...
null
CC BY-SA 3.0
null
2011-06-05T11:03:53.713
2011-06-05T11:03:53.713
null
null
930
null
11590
1
null
null
4
2053
I am searching for a good criterion to measure the "goodness of fit" in generalized linear models. To make clear: I am not searching for a criterion which gives me an answer to the question "does overdispersion occur?". What do you think about Nagelkerke's pseudo R-squared? Any thought would be appreciated!
Goodness of fit in GLMs
CC BY-SA 3.0
null
2011-06-05T11:51:37.503
2012-01-06T16:08:13.557
2011-06-05T15:27:10.857
919
4496
[ "r", "regression", "generalized-linear-model", "goodness-of-fit" ]
11592
1
null
null
9
2103
Can anyone tell me the factors that affect the memory requirements of $k$-means clustering with a bit of explanation?
Memory requirements of $k$-means clustering
CC BY-SA 3.0
null
2011-06-05T13:37:48.747
2014-10-03T14:51:07.120
2013-11-24T15:21:13.467
7290
4879
[ "clustering", "k-means" ]
11593
2
null
6794
2
null
RStudio (rstudio.org) makes things quite easy assuming LaTeX is already installed on your system. There is a PDF button that runs the code through Sweave then runs it through pdflatex and launches a pdf viewer.
null
CC BY-SA 3.0
null
2011-06-05T14:07:24.403
2011-06-05T14:07:24.403
null
null
4253
null
11594
1
null
null
3
724
Lets say i want to calculate the information content of a particular message.What apart from the message itself has to be taken into account in doing so, and what data would i need to collect to perform my action?
Calculating the information contained in a message
CC BY-SA 3.0
null
2011-06-05T14:20:57.853
2011-07-07T04:27:11.073
null
null
4879
[ "machine-learning" ]
11595
1
11777
null
9
9861
I've got a question concerning wheter or not to use an offset. Assume a very easy model, where you want to describe the (overall)number of goals in hockey. So you have goals, number of games played and a dummy variable "striker" which is equal to 1 if the player is a striker and 0 otherwise. So which of the following m...
Whether to use an offset in a Poisson regression when predicting total career goals scored by hockey players
CC BY-SA 3.0
null
2011-06-05T14:26:51.900
2014-08-31T21:32:50.907
2017-04-13T12:44:33.237
-1
4496
[ "r", "regression", "poisson-distribution", "generalized-linear-model", "count-data" ]
11596
1
11601
null
10
3049
Especially in the computer-science oriented side of the machine learning literature, AUC (area under the receiver operator characteristic curve) is a popular criterion for evaluating classifiers. What are the justifications for using the AUC? E.g. is there a particular loss function for which the optimal decision is ...
Rationale of using AUC?
CC BY-SA 3.0
null
2011-06-05T14:52:53.700
2019-10-10T04:25:54.453
2011-06-05T20:50:52.817
null
3567
[ "machine-learning", "roc" ]
11597
2
null
6538
3
null
Regarding the measurement of your knowledge: You could attend some data mining / data analysis competitions, such as [1](http://www.kdnuggets.com/datasets/competitions.html), [2](http://www.kaggle.com), [3](http://www.research-garden.de), [4](http://www.innocentive.com/), and see how you score compared to others. There...
null
CC BY-SA 3.0
null
2011-06-05T14:57:27.867
2011-06-05T14:57:27.867
null
null
573
null
11598
2
null
11595
1
null
A few simple points not directly addressing your question about offsets: - I'd have a look at whether number of games is correlated with mean goals scored. In many elite goal scoring sports that I can think of (e.g., soccer, Australian rules football, etc.) I would predict that longevity of a career is related to the ...
null
CC BY-SA 3.0
null
2011-06-05T15:14:42.277
2011-06-05T15:14:42.277
null
null
183
null
11599
2
null
11568
2
null
The problem with allowing any distribution is that it could have a tiny chance of yielding a huge value. That eliminates any possibility of testing the mean with satisfactory confidence. Here are the details. Choose a unit of measurement in which $y$ is hugely greater than $1$. Let $\alpha$ be the desired significa...
null
CC BY-SA 3.0
null
2011-06-05T15:18:15.483
2011-06-05T15:18:15.483
null
null
919
null
11600
2
null
11551
3
null
Recently I started to keep the data in a sqlite database, access the database directly from R using sqldf and view / edit with a database tool named [tksqlite](http://wiki.tcl.tk/17603) Another option is to export the data and view / edit with [Google Refine](http://code.google.com/p/google-refine/)
null
CC BY-SA 3.0
null
2011-06-05T16:28:49.587
2011-06-05T16:28:49.587
null
null
573
null
11601
2
null
11596
15
null
For binary classifiers $C$ used for ranking (i.e. for each example $e$ we have $C(e)$ in the interval $[0, 1]$) from which the AUC is measured the AUC is equivalent to the probability that $C(e_1) > C(e_0)$ where $e_1$ is a true positive example and $e_0$ is a true negative example. Thus, choosing a model with the maxi...
null
CC BY-SA 3.0
null
2011-06-05T16:43:27.907
2011-06-05T16:43:27.907
null
null
3232
null
11602
1
26535
null
193
69786
TL:DR: Is it ever a good idea to train an ML model on all the data available before shipping it to production? Put another way, is it ever ok to train on all data available and not check if the model overfits, or get a final read of the expected performance of the model? --- Say I have a family of models parametrize...
Training on the full dataset after cross-validation?
CC BY-SA 4.0
null
2011-06-05T16:50:50.747
2020-05-31T14:38:02.733
2020-05-31T14:38:02.733
2798
2798
[ "machine-learning", "cross-validation", "model-selection" ]
11604
2
null
11548
2
null
Simply build an ARIMA MODEL that separate signal from noise incorporating any identifiable deterministic structure such as changes in levels/trends/seaonal pulses/parameter or variance change over time. Develop a prediction for the next 5 days and use the uncertainty in that sum to create possible bounds. Compare the a...
null
CC BY-SA 3.0
null
2011-06-05T17:20:43.337
2011-06-06T18:39:55.273
2011-06-06T18:39:55.273
3382
3382
null
11605
2
null
11602
18
null
I believe that Frank Harrell would recommend bootstrap validation rather than cross validation. Bootstrap validation would allow you to validate the model fitted on the full data set, and is more stable than cross validation. You can do it in R using `validate` in Harrell's `rms` package. See the book "Regression Model...
null
CC BY-SA 3.0
null
2011-06-05T19:13:10.803
2011-06-05T19:13:10.803
null
null
3835
null
11606
2
null
11602
6
null
What you do is not a cross validation, rather some kind of stochastic optimization. The idea of CV is to simulate a performance on unseen data by performing several rounds of building the model on a subset of objects and testing on the remaining ones. The somewhat averaged results of all rounds are the approximation o...
null
CC BY-SA 3.0
null
2011-06-05T20:49:08.340
2011-06-05T20:49:08.340
null
null
null
null
11607
1
11608
null
4
2211
I'm trying to fit two equations with nls() function in R. The two functions are: $f(x) = c_{1} \exp\left(-\left(\frac{x-\mu}{\sigma_{(x)}}\right)^2\right)$ where $\sigma_{(x)} = \sigma_{11}$ if $x \le \mu$ and $\sigma_{(x)} = \sigma_{12}$ if $x > \mu$ and $f(x) = a K \exp\left(- \frac{a}{b} \exp\left(-b x\right) -...
Fitting conditional functions in nls
CC BY-SA 3.0
null
2011-06-05T20:57:37.040
2011-06-05T22:07:13.627
2011-06-05T21:47:17.080
null
3903
[ "r", "modeling", "nonlinear-regression", "nls" ]
11608
2
null
11607
4
null
In the first case, nls will not digest any `if`s or other higher expressions... you may use `ifelse`, however this may make this function too complex to effectively fit it -- `nls` is not a magic wand. In the second case, the standard algorithm dies on numerical error -- the usual approach in this case is to alter star...
null
CC BY-SA 3.0
null
2011-06-05T22:07:13.627
2011-06-05T22:07:13.627
null
null
null
null
11609
1
11727
null
49
6577
My current understanding of the notion "confidence interval with confidence level $1 - \alpha$" is that if we tried to calculate the confidence interval many times (each time with a fresh sample), it would contain the correct parameter $1 - \alpha$ of the time. Though I realize that this is not the same as "probabilit...
Clarification on interpreting confidence intervals?
CC BY-SA 3.0
null
2011-06-05T22:41:40.083
2019-10-21T16:33:13.347
2017-04-13T12:44:51.217
-1
4895
[ "confidence-interval" ]
11610
2
null
11585
1
null
I'm focussing on your second last para and the fact that you haven't taken a stats class, and assuming you're mainly interested in saying something about the average runtime of your code? The following is the simplest possible approach - I suspect that this is something you already know but it's not entirely clear to m...
null
CC BY-SA 3.0
null
2011-06-05T22:59:38.190
2011-06-05T23:06:31.350
2011-06-05T23:06:31.350
3248
3248
null
11611
1
null
null
9
383
If there are 0's in the contingency table and we're fitting nested poisson/loglinear models (using R's `glm` function) for a likelihood ratio test, do we need to adjust the data prior to fitting the glm models (e.g. add 1/2 to all the counts)? Obviously some parameters cannot be estimated without some adjustment, but h...
Do zero counts need to be adjusted for a likelihood ratio test of poisson/loglinear models?
CC BY-SA 3.0
null
2011-06-06T00:31:48.050
2012-05-02T01:58:45.313
2011-06-06T05:40:21.567
2116
4896
[ "regression", "poisson-distribution", "generalized-linear-model", "likelihood-ratio", "log-linear" ]
11612
2
null
11590
1
null
It will depend on what kind of GLM you're using and your data. For example, the Wald chi-square and likelihood test are good statistics for categorical data.
null
CC BY-SA 3.0
null
2011-06-06T03:13:05.647
2011-06-06T03:13:05.647
null
null
4897
null
11613
2
null
11609
4
null
The reason that the confidence interval doesn't specify "the probability that the true parameter lies in the interval" is because once the interval is specified, the paramater either lies in it or it doesn't. However, for a 95% confidence interval for example, you have a 95% chance of creating a confidence interval tha...
null
CC BY-SA 3.0
null
2011-06-06T03:21:50.793
2011-06-06T03:21:50.793
null
null
4897
null
11615
1
null
null
1
1206
My research design is as follows: I have these Between Subjects IVs: - Experiment Condition - 5 levels - Facebook User status - 2 levels (yes/no) My supervisor also wants me to see if there are significant effects of: - Gender - 2 levels - Relationship Status - 2 levels - Relationship Satisfaction - 2 levels A...
How to describe a design with a mix of experimental conditions, predictor variables, and multiple outcome variables?
CC BY-SA 3.0
null
2011-06-06T04:33:01.347
2011-06-06T08:48:43.040
2011-06-06T06:17:50.237
183
4899
[ "mixed-model", "experiment-design", "manova" ]
11616
1
null
null
5
956
### Context I was talking to a researcher in the following situation. - Participants (n = 500) were sampled from schools. - Participants came from around 50 different schools. - The number of participants per school varied with some schools supplying 20 or 30 participants, but a few schools only supplying 3 or 4 ...
Assessing independence of observations using intraclass correlation when some groups have small group sample sizes
CC BY-SA 3.0
null
2011-06-06T04:38:14.590
2011-06-07T16:24:48.803
2011-06-07T14:20:50.933
183
183
[ "independence", "intraclass-correlation" ]
11617
2
null
4600
1
null
- Stepwise regression: I generally would not use stepwise regression to analyse experimental data. Generally you are wanting to test quite specific hypotheses based on the factors that you have manipulated. Also, sample sizes are often smaller in experiments. If you do use stepwise regression, you should at least ensu...
null
CC BY-SA 3.0
null
2011-06-06T04:49:38.850
2011-06-06T04:49:38.850
null
null
183
null
11618
2
null
11594
2
null
May be, one needs to estimate the frequency $p(m)$ of occurrence of the message $m$. Then $\log \frac{1}{p(m)}$ is the information content of the message $m$.
null
CC BY-SA 3.0
null
2011-06-06T05:45:31.373
2011-06-06T05:45:31.373
null
null
3485
null
11619
2
null
11615
1
null
- There is a difference between the design and a statistical test. Your design presumably incorporates random assignment of participants to one of five conditions, actively sampling (perhaps an even number?) of facebook and non-facebook users, and to some extent the study of time. - You might describe your design as ...
null
CC BY-SA 3.0
null
2011-06-06T06:15:20.720
2011-06-06T08:48:43.040
2011-06-06T08:48:43.040
183
183
null
11620
1
null
null
7
1522
One of the data sets I deal with is quite strange. The datawarehouse I downloaded the data from has a lot 999999999 values in one of the variables. Apparently the computer system on which the datawarehouse sits on does not support storing of null values. So they use 999999999 as the "null" value. Now if I just run `pre...
Is there an R package with a pretty function that can deal effectively with outliers?
CC BY-SA 3.0
null
2011-06-06T06:57:07.203
2011-06-07T07:37:50.610
2011-06-06T15:46:01.280
919
1126
[ "r", "outliers", "missing-data" ]
11621
2
null
10787
5
null
If you don't like those options, have you considered using a boosting method instead? Given an appropriate loss function, boosting automatically recalibrates the weights as it goes along. If the stochastic nature of random forests appeals to you, stochastic gradient boosting builds that in as well.
null
CC BY-SA 3.0
null
2011-06-06T09:25:21.090
2011-06-06T09:25:21.090
null
null
4862
null
11622
1
11625
null
13
2099
I am following a course on Bayesian statistics using BUGS and R. Now, I already know BUGS, it's great but I am not really fond of using a separate program rather than just R. I have read that there are a lot of new Bayesian packages in R. Is there a list or reference on which packages there are for Bayesian statistics ...
R only alternatives to BUGS
CC BY-SA 3.0
null
2011-06-06T09:44:31.190
2011-06-06T18:20:56.943
null
null
3094
[ "r", "bayesian", "bugs" ]
11623
1
null
null
3
180
I have a set $E_{1}$, with a finite cardinality $n$ of rectangular matrices which contains the useful MFCC coefficients generated from $n$ speech signals. Similary I have a set $E_{2}$ of same cardinality as that of $E_{1}$ which is a collection of vectors of finite dimension containing the LPC of the same set of speec...
A best measure for speaker recognition
CC BY-SA 3.0
null
2011-06-06T09:51:29.607
2018-03-02T09:19:29.267
2013-06-14T14:23:51.110
3826
4900
[ "distance-functions", "signal-processing", "mfcc" ]
11624
2
null
11622
9
null
[Bayesian CRAN task view](http://cran.r-project.org/web/views/Bayesian.html)
null
CC BY-SA 3.0
null
2011-06-06T10:14:28.820
2011-06-06T10:14:28.820
null
null
375
null
11625
2
null
11622
8
null
You can take a look at the [MCMCglmm](http://cran.r-project.org/web/packages/MCMCglmm/index.html) package that comes with very nice vignettes. There's a also a `bayesglm()` function for fitting Bayesian generalized linear models in the [arm](http://cran.r-project.org/web/packages/arm/index.html) package, by Andrew Gelm...
null
CC BY-SA 3.0
null
2011-06-06T10:29:06.210
2011-06-06T10:29:06.210
null
null
930
null
11626
2
null
11622
6
null
A few people I know have been using [JAGS](http://calvin.iarc.fr/~martyn/software/jags/). The JAGS syntax is similar to BUGS.
null
CC BY-SA 3.0
null
2011-06-06T10:42:47.093
2011-06-06T10:42:47.093
null
null
8
null
11627
2
null
11620
18
null
If you're importing your data with a command like, say, ``` read.table('yourfile.txt', header=TRUE, ...) ``` you can indicate what values are to be considered as "null" or `NA` values, by specifying `na.strings = "999999999"`. We can also consider different values for indicating `NA` values. Consider the following fil...
null
CC BY-SA 3.0
null
2011-06-06T10:51:04.233
2011-06-07T07:37:50.610
2011-06-07T07:37:50.610
930
930
null
11628
1
null
null
17
7735
I am analyzing scores given by participants attending an experiment. I want to estimate the reliability of my questionnaire which is composed of 6 items aimed at estimating the attitude of the participants towards a product. I computed Cronbach's alpha treating all items as a single scale (alpha was about 0.6) and de...
Assessing reliability of a questionnaire: dimensionality, problematic items, and whether to use alpha, lambda6 or some other index?
CC BY-SA 3.0
null
2011-06-06T12:32:07.103
2016-05-04T06:34:51.360
2016-05-04T06:34:51.360
1352
4903
[ "pca", "reliability", "scales", "psychometrics", "cronbachs-alpha" ]
11629
2
null
11622
0
null
Performance is the main reason people use WinBUGS / OpenBUGS /JAGS vs. packages like MCMglmm. It is very hard not practical to write an efficient Gibbs sampler in native R. There are packages that let you run BUGS models from an R script, notably [RBUGS](http://cran.r-project.org/web/packages/rbugs/index.html) and [B...
null
CC BY-SA 3.0
null
2011-06-06T12:37:53.140
2011-06-06T12:37:53.140
null
null
4904
null
11630
2
null
11628
8
null
Here are some general comments: - PCA: The PCA analysis does not "reveal that there are three principal components". You chose to extract three dimensions, or you relied on some default rule of thumb (typically eigenvalues over 1) to decide how many dimensions to extract. In addition eigenvalues over one often extract...
null
CC BY-SA 3.0
null
2011-06-06T13:31:05.527
2011-06-06T13:38:52.477
2011-06-06T13:38:52.477
183
183
null
11632
1
11640
null
11
9835
Does anybody know what the formula for Cook's distance is? The original Cook's distance formula uses studentized residuals, but why is R using std. Pearson residuals when computing the Cook's distance plot for a GLM. I know that studentized residuals are not defined for GLMs, but how does the formula to compute Cook's ...
What kind of residuals and Cook's distance are used for GLM?
CC BY-SA 3.0
null
2011-06-06T15:02:09.953
2017-03-04T13:19:06.257
2017-03-04T13:19:06.257
101426
4496
[ "r", "regression", "generalized-linear-model", "residuals", "cooks-distance" ]
11633
2
null
11622
5
null
Second the Bayesian task view. I'd just add a vote for [MCMCpack](http://cran.r-project.org/web/packages/MCMCpack/index.html), a mature package which offers a variety of models. For the most part it's pretty well-documented too.
null
CC BY-SA 3.0
null
2011-06-06T15:03:15.590
2011-06-06T18:20:56.943
2011-06-06T18:20:56.943
26
26
null
11634
1
11775
null
6
2430
I am calculating the age of lake sediments at the base of a sediment core by dividing the total sediment mass of the core ($\mathrm{mg} \ \mathrm{cm}^{-2}$) by the sediment accumulation rate ($\mathrm{mg} \ \mathrm{cm}^{-2}\ \mathrm{y}^{-1}$). Both the sediment mass and the accumulation rate have variation associate...
How do I calculate error propagation with different measures of error?
CC BY-SA 3.0
null
2011-06-06T15:08:15.090
2013-02-27T21:26:49.387
2012-12-01T08:42:40.557
17230
4048
[ "error", "error-propagation" ]
11636
1
null
null
12
43189
i was wondering what is the differences between Mean Squared Error (MSE) and Mean Absolute Percentage Error (MAPE) in determining the accuracy of a forecast? Which one is better? Thanks
The difference between MSE and MAPE
CC BY-SA 3.0
null
2011-06-06T16:24:10.950
2017-03-24T17:36:03.393
2016-04-15T09:15:40.360
1352
4906
[ "time-series", "mse", "mape" ]
11637
2
null
10787
0
null
Instead of sampling large classes you can expand small classes ! If large classes have many times more observation then small, then biase will be small. I do hope you can handle that supersized dataset. You may also identify subsets of observations which handle the most information about large classes, there are many ...
null
CC BY-SA 3.0
null
2011-06-06T17:17:44.910
2011-06-07T22:57:09.510
2011-06-07T22:57:09.510
4908
4908
null
11638
2
null
11568
2
null
Intervals between things like requests are often modeled well with exponential, gamma, and Weibull distributions. These can have pretty fat tails, so @whuber's concern is already accounted for, to some extent, when you calculate your confidence intervals.
null
CC BY-SA 3.0
null
2011-06-06T17:19:51.677
2011-06-06T17:19:51.677
null
null
4862
null
11640
2
null
11632
15
null
If you take a look at the code (simple type `plot.lm`, without parenthesis, or `edit(plot.lm)` at the R prompt), you'll see that [Cook's distances](http://en.wikipedia.org/wiki/Cook%27s_distance) are defined line 44, with the `cooks.distance()` function. To see what it does, type `stats:::cooks.distance.glm` at the R p...
null
CC BY-SA 3.0
null
2011-06-06T19:04:56.220
2011-06-06T19:11:28.970
2011-06-06T19:11:28.970
930
930
null
11641
2
null
11620
1
null
I encounter this quite frequently when dealing with customer daily time series data. It appears that many accounting systems IGNORE daily data that didn't occur i.e. no transactions were recorded for that day (time interval/bucket) and don't fill in a '0" number . Since time series analysis require a reading for every ...
null
CC BY-SA 3.0
null
2011-06-06T19:23:01.337
2011-06-06T19:23:01.337
null
null
3382
null
11642
2
null
11372
12
null
To sum up, with n=45 subjects you're left with correlation-based and multivariate descriptive approaches. However, since this questionnaire is supposed to be unidimensional, this always is a good start. What I would do: - Compute pairwise correlations for your 22 items; report the range and the median -- this will giv...
null
CC BY-SA 4.0
null
2011-06-06T20:03:18.063
2021-03-24T12:47:04.527
2021-03-24T12:47:04.527
53690
930
null
11643
1
11644
null
4
1137
Using Zelig in R I fitted a negative binomial model to my data. The psychology APA standard demands to report the overall R squared, F-Value and p-value for the whole model. I looked at the formula for R square and it is using sum of squares. Since the negative binomial model is not using least square method assuming ...
Zelig reports $R^2$ of a negative binomial regression - nonsense?
CC BY-SA 3.0
null
2011-06-06T22:04:52.133
2011-09-05T22:20:47.027
2011-06-06T22:19:43.483
null
4679
[ "r", "negative-binomial-distribution", "r-squared" ]
11644
2
null
11643
5
null
Incidentally, F values also assume normal errors. I don't think these requirements were made with count data in mind. I'm not sure what to tell you. If apa requirements weren't an issue, I'd report something like proportion of explained deviance instead of R2, along with my regression coefficients and overdispersion pa...
null
CC BY-SA 3.0
null
2011-06-06T22:32:26.490
2011-06-06T22:32:26.490
null
null
4862
null
11645
1
12102
null
9
3301
So our data is structured as follows: We have $M$ participants, each participant can be categorized into 3 groups (G $\in {A,B,C}$), and for each participant we have $N$ samples of a continuous variable. And we are trying to predict values that are either 0 or 1. How would we use matlab to test for an interaction betw...
Coding an interaction between a nominal and a continuous predictor for logistic regression in MATLAB
CC BY-SA 3.0
null
2011-06-06T23:05:34.870
2011-06-22T21:04:41.400
2011-06-22T21:04:41.400
930
2800
[ "logistic", "matlab", "interaction" ]
11646
1
null
null
18
6777
Choosing to parameterize the gamma distribution $\Gamma(b,c)$ by the pdf $g(x;b,c) = \frac{1}{\Gamma(c)}\frac{x^{c-1}}{b^c}e^{-x/b}$ The Kullback-Leibler divergence between $\Gamma(b_q,c_q)$ and $\Gamma(b_p,c_p)$ is given by [1] as \begin{align} KL_{Ga}(b_q,c_q;b_p,c_p) &= (c_q-1)\Psi(c_q) - \log b_q - c_q - \log\Gamma...
Kullback–Leibler divergence between two gamma distributions
CC BY-SA 3.0
null
2011-06-06T23:39:37.377
2021-10-11T15:36:07.050
2012-02-29T20:30:00.747
858
2952
[ "kullback-leibler", "gamma-distribution", "exponential-family" ]
11647
2
null
4603
4
null
[lasso4j](http://code.google.com/p/lasso4j/) is an open source Java implementation of Lasso for linear regression.
null
CC BY-SA 3.0
null
2011-06-07T00:09:52.463
2011-06-07T00:09:52.463
null
null
4912
null
11648
2
null
4980
2
null
You can also take a look at [lasso4j](http://code.google.com/p/lasso4j/) which is an open source Java implementation of Lasso for linear regression. It is a port of the glmnet package to pure Java.
null
CC BY-SA 3.0
null
2011-06-07T00:12:46.673
2011-06-07T00:12:46.673
null
null
4912
null
11649
2
null
11636
31
null
MSE is scale-dependent, MAPE is not. So if you are comparing accuracy across time series with different scales, you can't use MSE. For business use, MAPE is often preferred because apparently managers understand percentages better than squared errors. MAPE can't be used when percentages make no sense. For example, the ...
null
CC BY-SA 3.0
null
2011-06-07T01:30:10.137
2011-06-07T01:30:10.137
null
null
159
null
11650
1
11651
null
11
3874
I'm using latent semantic indexing to find similarities between documents ([thanks, JMS!](https://stats.stackexchange.com/q/11102/1977)) After dimension reduction, I've tried k-means clustering to group the documents into clusters, which works very well. But I'd like to go a bit further, and visualize the documents as...
Visualizing multi-dimensional data (LSI) in 2D
CC BY-SA 4.0
null
2011-06-07T03:17:45.697
2018-05-24T07:02:27.237
2018-05-24T07:02:27.237
128677
1977
[ "data-visualization", "clustering", "python", "multidimensional-scaling" ]
11651
2
null
11650
7
null
This is what MDS (multidimensional scaling) is designed for. In short, if you're given a similarity matrix M, you want to find the closest approximation $S = X X^\top$ where $S$ has rank 2. This can be done by computing the SVD of $M = V \Lambda V^\top = X X^\top$ where $X = V \Lambda^{1/2}$. Now, assuming that $\Lamb...
null
CC BY-SA 3.0
null
2011-06-07T04:15:34.467
2011-06-07T04:15:34.467
null
null
139
null
11653
1
null
null
5
2917
### Context This came up recently in a consulting context. A researcher was performing repeated measures t-tests based on experimental data. Some of the analyses involved comparing one condition with another. Other analyses involved performing contrasts comparing one or more conditions with one or more other conditi...
Recommended effect size measure for repeated measures t-tests and repeated measures contrasts on experimental data
CC BY-SA 3.0
null
2011-06-07T04:18:23.313
2015-08-19T20:39:49.890
2011-06-07T15:46:48.813
183
183
[ "repeated-measures", "effect-size", "contrasts" ]
11654
2
null
11594
3
null
Using notions like entropy (like in Ashok's answer) only work if you believe the message is coming from a specific distribution. If all you have a single message, then the only measure of complexity that's meaningful is the [Kolmogorov complexity](http://en.wikipedia.org/wiki/Kolmogorov_complexity) of the message, whic...
null
CC BY-SA 3.0
null
2011-06-07T04:18:42.860
2011-06-07T04:18:42.860
null
null
139
null
11655
2
null
9425
11
null
In addition to the useful [link](http://itl.nist.gov/div898/handbook/prc/section4/prc473.htm) mentioned in the comments by @schenectady. I would also add the point that Bonferroni correction applies to a broader class of problems. As far as I'm aware Tukey's HSD is only applied to situations where you want to examine ...
null
CC BY-SA 3.0
null
2011-06-07T04:36:19.457
2011-06-07T04:36:19.457
null
null
183
null
11656
2
null
11653
4
null
The answer here depends on your situation. Dunlap, Cortina, Vaslow, and Burke (1996) argued that the effect size should be calculated using a SD based on pooled variance from separate conditions, as is typical in independent groups studies, even with repeated measurements. Their argument was that the study may be rep...
null
CC BY-SA 3.0
null
2011-06-07T05:33:05.100
2015-08-19T20:39:49.890
2015-08-19T20:39:49.890
601
601
null
11657
1
null
null
3
1348
I am working on understanding various document ranking algorithms like (TF-IDF, LSI, language models, etc) by actually implementing them. I want to understand LDA and using various resources to understand the algorithm. What I don't understand is how we come up with the latent (hidden) variables/topics. Can someone ple...
Using latent Dirichlet allocation for information retrieval
CC BY-SA 3.0
null
2011-06-07T07:20:47.107
2011-09-08T01:35:56.557
2011-06-07T07:27:05.123
null
4915
[ "information-retrieval" ]
11658
2
null
9306
3
null
I think the use of the spectrogram is visually interesting but not that obvious to exploit because of information redundency along frequencies. What we can see is that the changes between period are obvious. Also I would go back to the initial problem where you have for 3 different time periods indexed by $k=1,2,3$ a s...
null
CC BY-SA 3.0
null
2011-06-07T07:38:54.357
2011-06-07T07:38:54.357
null
null
223
null
11659
1
11669
null
95
7919
In my job role I often work with other people's datasets, non-experts bring me clinical data and I help them to summarise it and perform statistical tests. The problem I am having is that the datasets I am brought are almost always riddled with typos, inconsistencies, and all sorts of other problems. I am interested to...
Essential data checking tests
CC BY-SA 3.0
null
2011-06-07T08:19:22.500
2016-03-31T15:43:46.780
2011-06-07T08:43:56.070
223
199
[ "dataset", "outliers", "checking" ]
11660
2
null
11659
10
null
When you have measures along time ("longitudinal data") it is often useful to check the gradients as well as the marginal distributions. This gradient can be calculated at different scales. More generally you can do meaningful transformations on your data (fourier, wavelet) and check the distributions of the marginals ...
null
CC BY-SA 3.0
null
2011-06-07T08:42:59.473
2011-06-07T14:33:13.617
2011-06-07T14:33:13.617
919
223
null
11661
1
11663
null
5
6442
I have two groups (experimental, N=6, and control group, N=20). For each participant I measured a score (let say mean reaction time) 4 times. I would like to check: - whether these groups differed in the beginning (Time 1) - whether the score changes in time (for control group) - compare the change in time for both ...
Comparing means across two groups and over four time points when group sample sizes are very small
CC BY-SA 3.0
null
2011-06-07T09:21:37.127
2011-06-08T03:33:07.030
2011-06-08T03:33:07.030
183
427
[ "r", "hypothesis-testing", "small-sample" ]
11662
1
11665
null
3
2633
How can I call residuals out from function `cv.lm`? `cv.lm$ss` gives me the cross validation sum of squares, but I need individual residuals from each fold. Is it possible to call out?
How to extract residuals from function cv.lm in R?
CC BY-SA 3.0
null
2011-06-07T09:25:49.823
2013-08-05T14:09:10.330
2011-06-07T09:56:43.830
183
4917
[ "r", "cross-validation" ]
11663
2
null
11661
5
null
### Your analyses One strategy is to use the same techniques as you would with larger sample sizes. - You could do a 2 by 4 mixed ANOVA with appropriate contrasts to test your effects of interest. Or you could split your analyses up into discrete tests - T-test for group differences at time 1 - Repeated measure...
null
CC BY-SA 3.0
null
2011-06-07T09:39:56.610
2011-06-08T03:29:39.307
2011-06-08T03:29:39.307
183
183
null
11664
1
null
null
3
1059
I am looking to compare individual likert scale items. I measured respondent's level of agreement (in a 5 point-scale) for several items (e.g. from 1 to 5 how much is A competent to treat your condition? how much is B? C? and so on..- 11 items in total). I want to analyse if the scores for each statement are significan...
How do I compare individual likert scale items
CC BY-SA 3.0
null
2011-06-07T10:39:11.050
2019-05-01T14:02:00.333
2018-08-15T07:55:53.553
11887
4919
[ "likert", "ranking", "kendall-tau", "agreement-statistics" ]
11665
2
null
11662
3
null
Looking at the R code, computation for individual fold are done in the inner loop, starting with ``` for (i in sort(unique(rand))) { # line 37 ``` but results are just returned with a `print` statement (line 67-68), if `printit=TRUE` (which is the default). So, you can use what I suggested for a [related question](htt...
null
CC BY-SA 3.0
null
2011-06-07T12:11:32.447
2011-06-07T12:25:43.350
2017-04-13T12:44:20.840
-1
930
null
11666
2
null
3911
5
null
This is a great discussion. I feel that Bayesian credible intervals and likelihood support intervals are the way to go, as well as Bayesian posterior probabilities of events of interest (e.g., a drug is efficacious). But supplanting P-values with confidence intervals is a major gain. Virtually every issue of the fin...
null
CC BY-SA 3.0
null
2011-06-07T12:24:47.820
2011-06-07T12:24:47.820
null
null
4253
null
11667
2
null
100
2
null
The main aim of windowing in spectral analysis is the ability of zooming into the finer details of the signal rather than looking the whole signal as such. Short Time Fourier Transforms(STFT) are of prime importance in case of speech signal processing where the information like pitch or the formant frequencies are extr...
null
CC BY-SA 3.0
null
2011-06-07T12:25:23.473
2011-06-07T12:25:23.473
null
null
4900
null
11668
2
null
11646
16
null
The KL divergence is a difference of integrals of the form $$\begin{aligned} I(a,b,c,d)&=\int_0^{\infty} \log\left(\frac{e^{-x/a}x^{b-1}}{a^b\Gamma(b)}\right) \frac{e^{-x/c}x^{d-1}}{c^d \Gamma(d)}\, \mathrm dx \\ &=-\frac{1}{a}\int_0^\infty \frac{x^d e^{-x/c}}{c^d\Gamma(d)}\, \mathrm dx - \log(a^b\Gamma(b))\int_0^\...
null
CC BY-SA 4.0
null
2011-06-07T13:48:30.880
2021-10-11T15:36:07.050
2021-10-11T15:36:07.050
919
919
null
11669
2
null
11659
79
null
It helps to understand how the data were recorded. Let me share a story. Once, long ago, many datasets were stored only in fading hardcopy. In those dark days I contracted with an organization (of great pedigree and size; many of you probably own its stock) to computerize about 10^5 records of environmental monitorin...
null
CC BY-SA 3.0
null
2011-06-07T14:30:49.173
2011-06-07T14:30:49.173
2020-06-11T14:32:37.003
-1
919
null
11671
2
null
11616
2
null
I'm not sure about the metric of the ICC itself (I have never seen anyone report this metric for inferential purposes, only for description), but I do not believe many modelling strategies will be greatly impacted by the instance of many small groups. This is because random effects modelling takes into account the samp...
null
CC BY-SA 3.0
null
2011-06-07T16:24:48.803
2011-06-07T16:24:48.803
null
null
1036
null
11672
1
null
null
6
506
I am doing a project on sexual selection (male-male competition) in the turquoise killifish Nothobranchius furzeri. There are two morphs of male in the population from which my fish are obtained from- one has a red tail and the other has a yellow tail. My null hypothesis is: Tail colour is not related to dominance/co...
Which statistical test should I use for my experiment on aggressive interactions in killifish?
CC BY-SA 3.0
null
2011-06-07T16:52:36.367
2011-06-16T16:38:20.713
2011-06-16T15:57:02.420
82
4923
[ "experiment-design", "categorical-data", "small-sample", "biostatistics", "multiple-comparisons" ]
11673
2
null
11659
25
null
@whuber makes great suggestions; I would only add this: Plots, plots, plots, plots. Scatterplots, histograms, boxplots, lineplots, heatmaps and anything else you can think of. Of course, as you've found there are errors that won't be apparent on any plots but they're a good place to start. Just make sure you're clear o...
null
CC BY-SA 3.0
null
2011-06-07T17:04:52.570
2011-06-07T17:04:52.570
null
null
26
null
11674
1
null
null
8
3782
How does a computer algorithm set up to take as input an arbirary bivariate probability density function, generate pairs of numbers from that distribution? I have found a routine called simcontour that is part of LearnBayes in R that performs that operation.
Generating random samples from a density function
CC BY-SA 3.0
null
2011-06-07T17:24:13.797
2012-02-02T09:38:46.240
2011-06-07T19:00:42.393
930
3805
[ "algorithms", "random-generation", "density-function" ]
11675
2
null
11548
2
null
Jeromy Anglim and IrishStat both give great answers, but they sound maybe a little more complex than what you're looking for. - A simpler method could could be to perform a linear regression on your data, to get PageViews = a * Date + b for some constants a and b; the constant a is then a measure of the linear "slope"...
null
CC BY-SA 3.0
null
2011-06-07T17:31:27.397
2011-06-07T17:31:27.397
null
null
1106
null
11676
1
null
null
29
72533
I found a formula for pseudo $R^2$ in the book [Extending the Linear Model with R, Julian J. Faraway](http://www.maths.bath.ac.uk/~jjf23/ELM/) (p. 59). $$1-\frac{\text{ResidualDeviance}}{\text{NullDeviance}}$$. Is this a common formula for pseudo $R^2$ for GLMs?
Pseudo R squared formula for GLMs
CC BY-SA 3.0
null
2011-06-07T17:34:41.347
2020-04-08T23:13:12.077
2014-01-11T22:39:22.300
7290
4496
[ "r", "regression", "generalized-linear-model", "r-squared" ]
11677
1
null
null
12
30270
I am having trouble understanding the different estimators that can be used in an impact evaluation. I know that the intention-to-treat (ITT) estimator compares differences between eligible individuals without the program, and eligible individuals with the program, regardless of compliance. However, I thought the avera...
What is the difference between ITT and ATE?
CC BY-SA 3.0
null
2011-06-07T17:56:29.180
2019-11-09T00:54:24.183
2011-06-07T19:29:13.750
930
834
[ "experiment-design", "epidemiology" ]
11678
1
null
null
8
256
I would like to find a reference, preferably free on the internet, where I can read about the theoretical or practical justification for the use of parametric / analytic probability distributions. By parametric distributions I mean the named ones like Normal, Weibull, etc.
Where can I read about the justification for the use of parametric probability distributions?
CC BY-SA 3.0
null
2011-06-07T17:56:43.910
2013-09-04T15:06:03.857
2013-09-04T15:06:03.857
27581
74
[ "probability", "distributions", "references" ]
11679
1
13093
null
6
220
I have a nested-case control study that I have been using for analysis. At the end of my work I have deduced a set of variables that I use later to to classify new cases. One example of a simple classifier I am using is a naive Bayes, which will output simply a probability. So here is my question: Could I make my prob...
Probabilities in case-controlled studies
CC BY-SA 3.0
null
2011-06-07T19:14:29.673
2011-09-13T14:52:37.710
2011-06-08T08:38:14.803
null
4673
[ "r", "probability", "case-control-study" ]
11680
1
null
null
5
1295
I'd like to hear your opinions on the following: - What parameters would you report when estimating different likelihood based regression? AIC, BIC, Pseudo $R^2$? - What is the standard to report? It should be a parameter which answers the question of how good the specified model is.
Which measure of model fit to report when performing likelihood based regression: AIC, BIC, Pseudo R-square?
CC BY-SA 3.0
null
2011-06-07T19:38:25.840
2012-02-20T01:03:10.477
2012-02-20T01:03:10.477
4856
4496
[ "regression", "maximum-likelihood", "aic", "bic" ]
11681
2
null
11573
2
null
What you are talking about is called [Conjoint Analysis](http://en.wikipedia.org/wiki/Conjoint_analysis_%28marketing%29) . "Multivariate Data Analysis" by Hair has a good chapter on this. [[Discrete] Choice Modeling](http://en.wikipedia.org/wiki/Choice_modelling) is when you have the user compare two (or three) images...
null
CC BY-SA 3.0
null
2011-06-07T20:09:17.800
2011-06-07T20:09:17.800
null
null
74
null
11682
1
12307
null
8
6481
I have a multitree that represents the lineages of all the fishgroups in a breeding program. It's stored as a double adjacency table with `fish_id`, `sire_id` and `dam_id`. This means a particular fishgroup is only directly aware of its parents (if any) and knows nothing about descendents. I can conveniently output th...
How to visualize a GraphML multitree?
CC BY-SA 3.0
null
2011-06-07T20:23:14.947
2012-06-19T14:27:31.653
2011-06-07T21:01:09.653
930
1079
[ "data-visualization", "software", "graph-theory" ]
11683
2
null
155
19
null
A p value is a measure of how embarrassing the data are to the null hypothesis Nicholas Maxwell, Data Matters: Conceptual Statistics for a Random World Emeryville CA: Key College Publishing, 2004.
null
CC BY-SA 3.0
null
2011-06-07T20:26:43.583
2011-06-07T20:26:43.583
null
null
4253
null
11684
2
null
11678
4
null
Nice question. I like Ben Bolker's descriptions from his book, [Ecological Models and Data in R](http://www.math.mcmaster.ca/~bolker/emdbook/index.html) ([preprint of the relevant chapter](http://www.math.mcmaster.ca/~bolker/emdbook/chap4A.pdf); the bestiary of distributions starts on page 19). For each distribution, ...
null
CC BY-SA 3.0
null
2011-06-07T20:58:32.590
2011-06-07T20:58:32.590
null
null
4862
null
11687
1
11710
null
13
786
There are different methods for prediction of ordinal and categorical variables. What I do not understand, is how this distinction matters. Is there a simple example which can make clear what goes wrong if I drop the order? Under what circumstances does it not matter? For instance, if the independent variables are all ...
What do I gain if I consider the outcome as ordinal instead of categorical?
CC BY-SA 3.0
null
2011-06-07T22:31:07.243
2017-05-05T12:33:07.403
2017-05-05T12:33:07.403
101426
573
[ "logistic", "multinomial-distribution", "ordered-logit" ]