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
9261
2
null
9240
10
null
This is essentially a variant of the coupon collector's problem. If there are $n$ items in total and you have taken a sample size $s$ with replacement then the probability of having identified $u$ unique items is $$ Pr(U=u|n,s) = \frac{S_2(s,u) n! }{ (n-u)! n^s }$$ where $ S_2(s,u)$ gives [Stirling numbers of the...
null
CC BY-SA 2.5
null
2011-04-06T11:14:25.150
2011-04-06T11:14:25.150
null
null
2958
null
9262
2
null
9233
3
null
I am not sure I understand this bit: "Unfortunately, since the response is the mean value (without looking at the mean, just regular inter-annual variation will swamp the signal)" With careful modelling, it seems to me you could gain a lot by modelling this as panel data. Depending on the spatial scope of your data, th...
null
CC BY-SA 2.5
null
2011-04-06T11:50:08.220
2011-04-06T11:50:08.220
null
null
2044
null
9263
1
9270
null
6
752
I am using SPSS and having some trouble with a research question which is analogous to the hypothetical question: Is there a longitudinal Relationship between Happiness and Chocolate Consumption? Let’s say I take a sample of people and contact them when they are aged 14 and aged 18 and ask them: a) What is your choco...
Longitudinal relationship between chocolate consumption and happiness: repeated measures ANOVA?
CC BY-SA 2.5
null
2011-04-06T12:20:49.227
2011-04-07T01:53:19.273
2011-04-06T14:27:19.523
183
4054
[ "anova", "spss", "ancova" ]
9264
2
null
9263
2
null
You may think about happiness as the dependent variable, and you could use logistic regression with chocolate consumption as a predictor. Some people may be generally happier or less happy independently from chocolate consumption. This can be modelled by including subject id as a random effect categorical predictor. Ag...
null
CC BY-SA 2.5
null
2011-04-06T13:03:53.853
2011-04-06T14:10:11.800
2011-04-06T14:10:11.800
3911
3911
null
9265
2
null
9260
3
null
A simple approach would be to assume that each shipment will meet the specification with $p = 1 - 20\% = 80\%$ probability. The number of shipments meeting the specification (k) will then follow a [binomial distribution](http://en.wikipedia.org/wiki/Binomial_distribution): k ~ B(15, 80%) and the expected value will be ...
null
CC BY-SA 2.5
null
2011-04-06T13:25:03.273
2011-04-06T13:25:03.273
null
null
3911
null
9266
1
null
null
3
270
Given a collections of sets, which have an inherent but unknown (at runtime) hierarchy, I would like to cluster them based on the sub/super-relationships with respect to their elements. Let me try and illustrate this with a overly simplified example: ``` Set 1 = {a, b, c, d, e, f} Set 2 = {a, b} Set 3 = {a, b, c ,d} S...
A smart way of clustering a collection of sets based on an inherent hierarchy
CC BY-SA 2.5
null
2011-04-06T13:52:40.207
2011-04-06T20:07:17.577
2011-04-06T18:37:19.810
3014
3014
[ "clustering", "algorithms" ]
9267
1
9274
null
7
4085
I'm in the process of running a repeated-measures ANOVA on two groups of participants from an experiment. In one group, there are 10 participants, and in the other group, there is only 1 participant. This is because the 1 participant is a patient who is being compared to the 10 other participants. Now, my question is: ...
What's the minimum number of individuals in a group for repeated-measures ANOVA?
CC BY-SA 2.5
null
2011-04-06T14:16:14.613
2013-06-22T08:48:34.200
2011-04-06T19:24:02.030
3911
4055
[ "anova", "small-sample" ]
9268
2
null
9240
4
null
I have already give a suggestion based on Stirling numbers of the second kind and Bayesian methods. For those who find Stirling numbers too large or Bayesian methods too difficult, a rougher method might be to use $$E[U|n,s] = n\left( 1- \left(1-\frac{1}{n}\right)^s\right)$$ $$var[U|n,s] = n\left(1-\frac{1}{n}\right...
null
CC BY-SA 2.5
null
2011-04-06T14:38:25.303
2011-04-06T14:38:25.303
null
null
2958
null
9269
1
9271
null
4
274
I can't seem to do a comparison with a sum of numbers and get the right answer (lines alternate between my input and R output): > (.6 + .3 + .1) == 1 [1] FALSE (.6 + .3 + .1) [1] 1 1 [1] 1 I've tried with and without parenthesis, tried comparing to 1.0, tried using as.numeric, but can't get it to work.
Why is R giving a bad result of addition?
CC BY-SA 2.5
null
2011-04-06T14:44:19.773
2011-04-06T15:24:10.977
2020-06-11T14:32:37.003
-1
null
[ "r" ]
9270
2
null
9263
5
null
You may need to clarify what you mean by > "accounting for the fact that I have taken repeated measures..." You say that > "I would like to know if the mean chocolate consumption per day is higher among happy people than those who are not happy..." This suggests to me that time is not really relevant to your ...
null
CC BY-SA 2.5
null
2011-04-06T14:47:31.160
2011-04-07T01:53:19.273
2011-04-07T01:53:19.273
183
183
null
9271
2
null
9269
9
null
You've fallen into the "Floating Point Trap." See the first chapter of the R Inferno: [http://www.burns-stat.com/pages/Tutor/R_inferno.pdf](http://www.burns-stat.com/pages/Tutor/R_inferno.pdf) You want to test floating point numbers with `all.equal` instead, like this: ``` > all.equal(.6+.3+.1, 1) [1] TRUE ```
null
CC BY-SA 2.5
null
2011-04-06T14:57:58.367
2011-04-06T14:57:58.367
null
null
3601
null
9272
2
null
9269
9
null
It is floating point rounding. You get ``` > round(.6 + .3 + .1, digits=16) == 1 [1] FALSE > round(.6 + .3 + .1, digits=15) == 1 [1] TRUE > (.6 + .3 + .1) - 1 [1] -1.11022302462516e-16 ```
null
CC BY-SA 2.5
null
2011-04-06T15:04:18.797
2011-04-06T15:04:18.797
null
null
2958
null
9273
2
null
9242
1
null
The issue here is that hypothesis testing involves a null AND an alternative hypotheis, and therefore; the rejection region is determined by both hypotheses. Consider a simpler example. If you are investigating a process that possibly has a MEAN of zero, but could not have a mean of less than zero, then you might be i...
null
CC BY-SA 2.5
null
2011-04-06T15:37:55.743
2011-04-06T15:43:48.640
2011-04-06T15:43:48.640
3805
3805
null
9274
2
null
9267
11
null
Performing the ANOVA assumes that the nature and amount of variation in the hypothetical population represented by the one patient are the same as the variation in the hypothetical population represented by the ten other patients, and that all were obtained randomly and independently from their populations. Under these...
null
CC BY-SA 2.5
null
2011-04-06T15:56:21.583
2011-04-06T15:56:21.583
null
null
919
null
9275
1
null
null
2
1128
I'm concerned about treating my data as gold, especially in areas of low data support, so I would like to apply [additive smoothing](http://en.wikipedia.org/wiki/Additive_smoothing). I'm then doing several things with this data, and one of them is [Pearson's chi-square test for independence](http://en.wikipedia.org/wi...
Is it OK to do additive smoothing before applying Pearson's chi-square test for independence?
CC BY-SA 4.0
null
2011-04-06T16:04:07.350
2023-02-05T05:16:27.797
2023-02-05T05:16:27.797
345611
2485
[ "bayesian", "chi-squared-test", "smoothing", "frequentist" ]
9276
1
null
null
12
4256
Background I am designing a Monte Carlo simulation that combines the outputs of series of models, and I want to be sure that the simulation will allow me to make reasonable claims about the probability of the simulated outcome and the precision of that probability estimate. The simulation will find the probability that...
Finding precision of Monte Carlo simulation estimate
CC BY-SA 2.5
null
2011-04-06T17:35:50.953
2011-04-11T16:37:21.353
null
null
4059
[ "confidence-interval", "monte-carlo", "standard-error", "simulation" ]
9277
1
9284
null
5
1088
I'm trying to use the `nnet` library in R, and can't seem to work out how to use the `reltol` parameter. It says in the docs: > Stop if the optimizer is unable to reduce the fit criterion by a factor of at least 1 - reltol. I assume this means that if `reltol = 0.5` then it will stop if it can't halve the error rate...
Meaning and use of `reltol` in `nnet` library in R
CC BY-SA 2.5
null
2011-04-06T18:41:33.737
2011-04-06T21:36:21.523
null
null
261
[ "r", "machine-learning", "neural-networks" ]
9278
1
null
null
4
414
Very basic question, I suspect. It's sort of the inverse of [this one](https://stats.stackexchange.com/questions/5092/representative-sampling), and the same disclaimers about my own ignorance apply, but here goes: I have a sampling technology. I know the total population, and I know the number of samples I've done. Wha...
How to check reliability of a given sampling technology?
CC BY-SA 3.0
null
2011-04-06T19:25:10.097
2011-08-24T12:45:53.140
2017-04-13T12:44:52.660
-1
1531
[ "sampling" ]
9279
2
null
9266
1
null
If I understood you correctly, you have a list of scores for subsets, and you want to identify the items that contribute most to a high score, but you cannot score arbitrary subsets. This corresponds to a high-dimensional binary regression problem with features $item\in Subset$. You can run a linear or logistic regress...
null
CC BY-SA 2.5
null
2011-04-06T20:01:32.527
2011-04-06T20:07:17.577
2011-04-06T20:07:17.577
2456
2456
null
9280
1
9669
null
4
812
I have a spatial error model that I have estimated and would like to create a figure with the prediction interval. By spatial error model, I mean that the errors are spatially correlated and thus OLS is unbiased but inefficient (not a spatially auto-regressive model). I used the geostatistical approach to spatial stati...
Formula for prediction interval for spatial regression
CC BY-SA 2.5
null
2011-04-06T20:54:39.407
2019-11-14T07:27:53.847
2017-04-13T12:44:20.840
-1
3713
[ "regression", "spatial", "prediction-interval" ]
9281
1
9293
null
13
7079
Hope this newbie question is the right question for this site: Suppose I would like to compare the composition of ecological communities at two sites A, B. I know all three sites have dogs, cats, cows, and birds, so I sample their abundances at each site (I don't really have an "expected" abundance for each animal at e...
What test to compare community composition?
CC BY-SA 3.0
null
2011-04-06T21:00:00.867
2017-01-02T16:44:46.163
2017-01-02T16:44:46.163
11887
2830
[ "hypothesis-testing", "distributions", "correlation", "multinomial-distribution", "compositional-data" ]
9282
2
null
9280
3
null
Assuming $\Omega$ has been estimated with no appreciable error--which is rarely the case--the correct formula is given by the equation for the [kriging prediction error](http://en.wikipedia.org/wiki/Kriging). It needs to replace everything under the square root sign. What is missing from the second formula you give i...
null
CC BY-SA 2.5
null
2011-04-06T21:13:52.667
2011-04-06T21:13:52.667
null
null
919
null
9283
1
9297
null
18
15588
Could you recommend an easy to use or comprehensive conjoint analysis package for R?
Conjoint Packages for R
CC BY-SA 2.5
null
2011-04-06T21:16:01.777
2017-05-19T09:42:06.330
2011-04-07T02:29:22.393
183
776
[ "r", "conjoint-analysis" ]
9284
2
null
9277
4
null
That is what it is supposed to mean. A `reltol` parameter is common in optimisation functions in R and other mathematical and statistical systems. In `nnet`, it has the default `reltol = 1.0e-8`. In the more often used `optim` in the `stats` library the statement is: > reltol Relative convergence tolerance. The ...
null
CC BY-SA 2.5
null
2011-04-06T21:36:21.523
2011-04-06T21:36:21.523
null
null
2958
null
9285
5
null
null
0
null
In [statistical hypothesis testing](http://en.wikipedia.org/wiki/Statistical_hypothesis_testing), the size is the largest chance of rejecting the null when the null is true (a "false positive" error). The power is the chance of not rejecting the null; it depends on the "effect size" (a measure of how far reality actua...
null
CC BY-SA 2.5
null
2011-04-06T21:41:34.313
2011-04-06T21:41:34.313
2011-04-06T21:41:34.313
919
919
null
9286
4
null
null
0
null
Signals situations where one is concerned about achieving intended power and size when more than one hypothesis test is performed.
null
CC BY-SA 2.5
null
2011-04-06T21:41:34.313
2011-04-06T21:41:34.313
2011-04-06T21:41:34.313
919
919
null
9287
2
null
9228
3
null
There are at least two possibilities for this data. One possibility is that your microarrays contain no disease markers whatsoever. But, they do contain information about age, and since in your case the sick and control populations are of different age, you get the illusion of good classification performance. Another p...
null
CC BY-SA 2.5
null
2011-04-06T22:15:08.573
2011-04-06T22:23:28.577
2011-04-06T22:23:28.577
3369
3369
null
9288
2
null
9237
1
null
maximum entropy is a good way to go here. With maximum entropy, you specify the "structure" that your model is to depend on, and it does the rest. It has a very similar form to a generalised estimating equation. So we have an unknown (or "random") variable $x$ that is the object of inference (may be a vector). It c...
null
CC BY-SA 2.5
null
2011-04-06T22:38:22.240
2011-04-06T22:38:22.240
null
null
2392
null
9289
2
null
9281
2
null
Since you mention Sorensen index, it seems you need a dissimilarity score rather than a dissimilarity test. (A score will give a numerical value indicating how different they are. A test will tell you whether the difference is significant with a given probability.) You can represent species abundance at each location b...
null
CC BY-SA 2.5
null
2011-04-06T22:54:23.313
2011-04-06T22:54:23.313
null
null
3369
null
9290
2
null
9278
1
null
This sounds like a simple case of hyper-geometric sampling. So you have a sampling distribution of: $$p(r_1,r_2,r_3|R_1,R_2,R_3,I)=\frac{{R_1 \choose r_1}{R_2 \choose r_2}{R_3 \choose r_3}}{{R_1+R_2+R_3 \choose r_1+r_2+r_3}}$$ Capitals letters denote population totals, and small letters denote sampled numbers. $I$ is...
null
CC BY-SA 3.0
null
2011-04-06T23:24:22.640
2011-04-10T01:58:04.600
2011-04-10T01:58:04.600
2392
2392
null
9291
2
null
9281
2
null
Bray-Curtis and other similar indices do incorporate differences in species abundance. In addition to Legendre and Legendre, I would also recommend Charles Krebs' book, Ecological Methology (1999).
null
CC BY-SA 2.5
null
2011-04-06T23:37:49.453
2011-04-07T03:14:05.010
2011-04-07T03:14:05.010
3774
3774
null
9292
1
null
null
5
267
What is a good book that covers mixed distributions? Most statistics books either only briefly mention them or do not cover the topic at all. I'd like to have a comprehensive resource covering issues of joint distributions with both discrete and continuous variables, conditional and marginal distributions in the mixe...
Books for mixed distributions (continuous and discrete)?
CC BY-SA 3.0
null
2011-04-06T23:49:38.163
2015-10-30T23:27:26.220
2015-10-30T23:27:26.220
22468
3280
[ "references", "continuous-data", "discrete-data", "joint-distribution", "marginal-distribution" ]
9293
2
null
9281
4
null
I will concur with what has been mentioned that Bray-Curtis can handle abundance as well as presence/absence, also to add another good book to the mix: Analysis of Ecological Communities by McCune and Grace. There are a lot of factors to consider as you compare ecological communities and I don't think there is a single...
null
CC BY-SA 2.5
null
2011-04-07T00:17:04.250
2011-04-07T11:42:05.100
2011-04-07T11:42:05.100
4048
4048
null
9295
1
9320
null
5
301
This is a more "statistical" version of my [ Math.SE problem ](https://math.stackexchange.com/questions/31267/mean-chord-length-in-a-convex-polygon). Question Let $\mathbf{P}$ be a convex polygon of $m$ sides. Pick two of its edges at random, and further pick a random point on each of these edges, and compute the le...
Monte-Carlo estimation of the mean chord length in a polygon
CC BY-SA 2.5
null
2011-04-07T01:50:31.040
2011-04-07T18:41:45.193
2017-04-13T12:19:38.800
-1
4011
[ "monte-carlo" ]
9296
2
null
9233
4
null
Modeling the data fundamentally (especially for time series) assumes that you have collected data at a sufficient enough frequency to capture the phenomena of interest. Simplest example is for a sine wave - if you are collecting data at a frequency of n*pi where n is an integer then you will not see anything but zeros ...
null
CC BY-SA 2.5
null
2011-04-07T02:04:49.847
2011-04-07T02:04:49.847
null
null
null
null
9297
2
null
9283
14
null
I've never used R for conjoint analysis, but here are a couple of things I found when I hunted around. - Aizaki and Nishimura (2008) have an article "Design and Analysis of Choice Experiments Using R: A brief introduction" (Free PDF available here). Perhaps check out the following packages: - AlgDesign for construc...
null
CC BY-SA 2.5
null
2011-04-07T02:21:47.643
2011-04-07T02:21:47.643
null
null
183
null
9298
1
9303
null
4
1441
a journal article has a method for designing experiments to be fit to a 4-parameter logistic model. The model used is $y= D + \frac{A - D}{1 + (\frac{x}{C}) ^ B}$ A = upper asymptote B = maximum slope C = x value when y = 50% of maximum (i.e. 1/2 of upper asymptote) D = lower asymptote Using pilot data, further experi...
Reconciling different parameterizations of the same nonlinear model
CC BY-SA 2.5
null
2011-04-07T02:42:00.870
2011-04-07T07:02:17.783
2011-04-07T07:02:17.783
null
2473
[ "nonlinear-regression" ]
9299
1
null
null
12
576
I'm given an $n\times n$ grid of positive integer values. These numbers represent an intensity that should correspond to the strength of belief of a person occupying that grid location (a higher value indicating a higher belief). A person will in general have an influence over multiple grid cells. I believe that the p...
Estimating parameters for a spatial process
CC BY-SA 2.5
null
2011-04-07T03:02:36.983
2011-05-11T03:57:17.720
null
null
139
[ "estimation", "normal-distribution", "spatial" ]
9301
1
9302
null
2
157
REF: [http://en.wikipedia.org/wiki/Order_of_integration](http://en.wikipedia.org/wiki/Order_of_integration) What is the interpretation/intuition behind a time series integrable of order 0? I am reading something on cointegration and this is not yet clear to me.
Interpretation of an integrable time series of an order zero
CC BY-SA 2.5
null
2011-04-07T04:00:19.483
2011-04-07T06:59:22.310
2011-04-07T06:59:22.310
null
862
[ "time-series", "cointegration" ]
9302
2
null
9301
2
null
Commonly, a time series is said to be $I(0)$ if the time series itself is stationary (no need to differentiate it to obtain stationarity). The Wikipedia page you mention says that not all $I(0)$ time series are stationary. I didn't know this and I think that indeed many authors do not make the difference. The paper fr...
null
CC BY-SA 2.5
null
2011-04-07T04:56:57.423
2011-04-07T06:24:38.387
2011-04-07T06:24:38.387
919
1709
null
9303
2
null
9298
5
null
These models are not the same, because the first is a rational function of $x$ and the second is an exponential function. The second one is truly a "logistic" model but the first is not. Moreover, the claims about $B$ and $C$ in the first model are not true. The maximum slope depends on $C$, which is a scale paramet...
null
CC BY-SA 2.5
null
2011-04-07T05:03:26.757
2011-04-07T06:18:15.007
2011-04-07T06:18:15.007
919
919
null
9304
1
9316
null
6
76
A colleague just asked me this question: ### Context: A psychological study had - 2 groups of participants (between subjects) - 4 contexts (within subjects)) - each participant provided a response in each of the four contexts - there were three categorically distinct response options (lets call them $A$, $B$, a...
Modelling the effect of a 2 by 4 mixed design on a three-level nominal dependent variable
CC BY-SA 2.5
null
2011-04-07T06:20:27.157
2011-04-07T15:20:29.337
null
null
183
[ "modeling" ]
9305
1
null
null
3
99
Consider a conjugate prior in the k-parameter canonical exponential family: $$p(w|n_0,y_0)=c(n_0,y_0) \exp(n_0(y_0 w'-b(w))) \, ,$$ where $n_0>0, y_0 \in Y$ is the pseudo observation vector, and $Y$ is an open subset of $\mathbb{R}^k$. I have to prove that the normalization constant $c(n_0,y_0)$ goes to zero when $y_0...
The boundary proprerty of conjugate exponential family
CC BY-SA 3.0
null
2011-04-07T07:38:02.097
2021-01-30T21:53:56.903
2021-01-30T21:53:56.903
11887
4065
[ "self-study", "normalization", "exponential-family" ]
9306
1
11658
null
9
971
I am using the `evolfft` function in the `RSEIS` R package to do a STFT analysis of a signal. The signal is one hour long and it was acquired during 3 different conditions, in particular 0-20' control, 20'-40' stimulus, 40'-60' after stimulus. Visually, I see a change in the spectrogram during these 3 periods, with hig...
STFT statistical analysis
CC BY-SA 3.0
null
2011-04-07T08:30:58.900
2011-06-07T07:40:36.277
2011-06-07T07:40:36.277
223
582
[ "time-series", "hypothesis-testing", "anova", "fourier-transform" ]
9307
1
9308
null
1
1099
What is a family of functions which goes from 0 to 1 and has one or more parameters that alters the rate at which a value of 1 is approached?
Family of functions ranging from zero to one with parameter influencing rate of approach to one
CC BY-SA 2.5
null
2011-04-07T10:56:48.250
2011-04-07T14:29:27.167
2011-04-07T14:29:27.167
183
333
[ "function" ]
9308
2
null
9307
2
null
How do you like the [Sigmoid Function](http://en.wikipedia.org/wiki/Sigmoid_function) ? By adding a parameter k one gets $f_k(x)=\frac{1}{1+exp(-k*x)}$. By setting k you can control how steep the function is and hence how fast it approaches 1.
null
CC BY-SA 2.5
null
2011-04-07T11:16:04.993
2011-04-07T11:16:04.993
null
null
264
null
9309
2
null
9307
1
null
There's an incredible amount of those functions... and it really depends on what you want to do with it. In general any function $f(x)$ with no infinite bounds can be limited to [0;1] by simply using $\frac{f(x)-min}{max-min}$ (where min and max are the minimum and maximum of the function). One commonly used function i...
null
CC BY-SA 2.5
null
2011-04-07T11:16:42.047
2011-04-07T11:16:42.047
null
null
582
null
9311
1
9338
null
57
17559
I can see that there are a lot of formal differences between Kullback–Leibler vs Kolmogorov-Smirnov distance measures. However, both are used to measure the distance between distributions. - Is there a typical situation where one should be used instead of the other? - What is the rationale to do so?
Kullback–Leibler vs Kolmogorov-Smirnov distance
CC BY-SA 2.5
null
2011-04-07T11:39:13.870
2022-11-17T20:38:49.603
2011-04-07T14:26:13.410
183
3592
[ "distributions", "distance-functions", "kolmogorov-smirnov-test", "kullback-leibler" ]
9312
1
null
null
3
35604
SPSS returns lower and upper bounds for Reliability. While calculating the Standard Error of Measurement, should we use the Lower and Upper bounds or continue using the Reliability estimate. I am using the formula : $$\text{SEM}\% =\left(\text{SD}\times\sqrt{1-R_1} \times 1/\text{mean}\right) × 100$$ where SD is the s...
How to compute the standard error of measurement (SEM) from a reliability estimate?
CC BY-SA 3.0
null
2011-04-07T12:36:40.230
2021-05-25T12:07:04.960
2011-04-08T01:15:46.230
930
null
[ "spss", "reliability" ]
9313
1
9366
null
6
702
Can you suggest a good review of case control matching algorithms? Algorithms that can be used to set up the matched pairs of one case and one control, or matched blocks of a case and multiple controls.(Preferably a paper, book chapter or website discussing recent developments.)
Review of case control matching algorithms?
CC BY-SA 3.0
null
2011-04-07T14:32:47.600
2011-11-01T13:42:38.983
2011-04-08T11:28:14.527
3911
3911
[ "experiment-design", "matching", "case-control-study" ]
9315
1
9479
null
19
11727
I have used LDA on a corpus of documents and found some topics. The output of my code is two matrices containing probabilities; one doc-topic probabilities and the other word-topic probabilities. But I actually don't know how to use these results to predict the topic of a new document. I am using Gibbs sampling. Does a...
Topic prediction using latent Dirichlet allocation
CC BY-SA 3.0
null
2011-04-07T14:42:24.517
2012-07-15T20:57:39.640
2012-07-15T20:57:39.640
8413
2986
[ "text-mining", "topic-models" ]
9316
2
null
9304
6
null
A log-linear model or any model that fails to model the dependence of responses could underestimate (or overestimate) standard errors because they do not take into account potential subject-level association of responses. For example, if some subjects are likely to have responses patterns like (A,A,A,A) and others like...
null
CC BY-SA 2.5
null
2011-04-07T15:20:29.337
2011-04-07T15:20:29.337
null
null
3432
null
9317
1
9319
null
5
445
I was reading a Wikipedia article on [the birthday paradox](http://en.wikipedia.org/wiki/Birthday_problem) and stumbled upon the following statement: > ...the pairings in a group of 23 people are not statistically equivalent to 253 pairs chosen independently... Could you explain what does it mean and why does it mat...
Statistical equivalence in the birthday paradox
CC BY-SA 2.5
null
2011-04-07T15:45:55.837
2016-09-23T19:26:36.780
2016-09-23T19:26:36.780
35989
4068
[ "probability", "birthday-paradox" ]
9318
1
null
null
5
3852
I am planning to write a program that performs MDS. Any pointers to where I can access the pseudo-code for MDS? Thanks!
Multidimensional scaling pseudo-code
CC BY-SA 2.5
null
2011-04-07T15:46:39.943
2011-04-07T21:28:15.390
2011-04-07T21:28:15.390
930
1417
[ "algorithms", "multidimensional-scaling" ]
9319
2
null
9317
9
null
In a group of 23 people, all pairs must involve just those 23 people: the pairs are thus mathematically (and statistically) dependent. On the other hand, 253 pairs chosen independently and randomly from the 366*365/2 possible pairs will typically involve around 100 separate people. This (strong) dependency means we c...
null
CC BY-SA 2.5
null
2011-04-07T16:25:28.517
2011-04-07T16:25:28.517
null
null
919
null
9320
2
null
9295
4
null
This is really a question about numerical integration because it reduces immediately to the problem of finding the mean distance between two line segments in the plane. Monte-Carlo integration would be wasteful and inefficient compared to other methods that are readily available, including - Direct analytic integratio...
null
CC BY-SA 2.5
null
2011-04-07T16:46:35.707
2011-04-07T18:41:45.193
2011-04-07T18:41:45.193
919
919
null
9321
2
null
9318
5
null
If you have the Statistics Toolbox in MATLAB you can read the source code of `mdscale.m`. While it's not pseudocode, it will definitely help you understand MDS better and gives you one approach to coding it. In MATLAB you can type ` edit mdscale ` and that will open up an editor window that shows you the `mdscale.m` sc...
null
CC BY-SA 2.5
null
2011-04-07T17:20:37.147
2011-04-07T17:20:37.147
null
null
2660
null
9322
1
15472
null
12
10845
From Econometrics, by Fumio Hayashi (Chpt 1): Unconditional Homoskedasticity: - The second moment of the error terms E(εᵢ²) is constant across the observations - The functional form E(εᵢ²|xi) is constant across the observations Conditional Homoskedasticity: - The restriction that the second moment of the error ter...
Conditional homoskedasticity vs heteroskedasticity
CC BY-SA 3.0
null
2011-04-07T18:43:13.910
2015-06-07T01:07:35.317
2015-06-06T16:08:34.283
53690
4072
[ "regression", "econometrics", "heteroscedasticity", "assumptions" ]
9323
2
null
9299
2
null
Your model is a two-dimensional random field $X[i,j]$, and you are trying to estimate the joint distribution of the integer-values random variables $X[i,j]$. You will want to assume spatial stationarity: that is, the joint distribution of $(X[i_1,j_1],...,X[i_m,j_m])$ is the same as the joint distribution of $(X[i_1+k...
null
CC BY-SA 2.5
null
2011-04-07T19:45:16.923
2011-04-07T19:59:54.003
2011-04-07T19:59:54.003
3567
3567
null
9324
1
9356
null
1
473
I'd love a check if anyone is willing! I am trying to see if there is a statistical difference in female size between sites. Over the years females were repeatedly sampled within sites. I have sampled females opportunistically. Meaning that females were sampled a different number of times between and within sites. My f...
Check of R command and output of unbalanced repeated measures ANOVA
CC BY-SA 3.0
0
2011-04-07T20:34:34.710
2011-04-08T14:43:53.077
2011-04-08T02:47:19.363
183
4027
[ "r", "repeated-measures", "lme4-nlme" ]
9325
2
null
8738
5
null
Searching the SAS documentation for ARIMAX (based on [Patrick's answer](https://stats.stackexchange.com/questions/8738/what-is-the-term-for-a-time-series-regression-having-more-than-one-predictor/8741#8741)), I found (in "[The ARIMA Procedure: Input Variables and Regression with ARMA Errors](http://support.sas.com/docu...
null
CC BY-SA 2.5
null
2011-04-07T21:01:14.247
2011-04-07T21:01:14.247
2017-04-13T12:44:20.903
-1
1583
null
9326
2
null
9318
8
null
There are different kind of MDS (e.g., see this [brief review](http://forrest.psych.unc.edu/teaching/p208a/mds/mds.html)). Here are two pointers: - the smacof R package, developed by Jan de Leeuw and Patrick Mair has a nice vignette, Multidimensional Scaling Using Majorization: SMACOF in R (or see, the Journal of Stat...
null
CC BY-SA 2.5
null
2011-04-07T21:27:47.123
2011-04-07T21:27:47.123
null
null
930
null
9327
1
null
null
4
5360
EDIT: Thanks for the help so far. I have updated the question based on further work. I am interested in finding any difference in response of counts of two competing species to dryness and elevation. Both are caught in the same type of trap, but trap placement (bushes vs buildings) probably biases toward one species o...
Count data with mixed effects
CC BY-SA 3.0
null
2011-04-07T21:30:43.483
2013-03-16T00:26:58.203
2013-03-16T00:26:58.203
805
2993
[ "r", "mixed-model", "repeated-measures", "poisson-distribution" ]
9328
2
null
9327
3
null
Check out this question: [Negative values for AICc (corrected Akaike Information Criterion)](https://stats.stackexchange.com/questions/486/negative-values-for-aicc-corrected-akaike-information-criterion) The same explanation holds for BIC.
null
CC BY-SA 2.5
null
2011-04-07T21:51:47.123
2011-04-07T21:51:47.123
2017-04-13T12:44:33.310
-1
null
null
9329
1
null
null
12
3395
Say I've got a predictive classification model based on a random forest (using the randomForest package in R). I'd like to set it up so that end-users can specify an item to generate a prediction for, and it'll output a classification likelihood. So far, no problem. But it would be useful/cool to be able to output some...
Is there a way to explain a prediction from a random forest model?
CC BY-SA 2.5
null
2011-04-07T22:21:29.077
2019-10-03T08:48:20.570
2011-04-09T00:36:01.243
null
6
[ "machine-learning", "random-forest" ]
9330
1
null
null
7
788
We have a series of experiments where we measure virus transmission to plants when exposed to virus-infected insects for different time periods, so all of the experiments have similar types of independent and dependent variables. In one experiment, there are 6 time periods (1 to 24 hours) and 25 plants were tested (in...
Binomial data analysis with all 0 responses for some treatment groups
CC BY-SA 3.0
null
2011-04-08T01:35:42.510
2017-11-03T15:22:33.990
2017-11-03T15:22:33.990
11887
null
[ "logistic", "binomial-distribution", "sas", "isotonic" ]
9331
1
9339
null
6
3529
I am new to the use of cubic splines for regression purposes and wanted to find out 1) What is a good source (besides ESL which I read but am still uncertain) to learn about splines for regression? 2) How would you calculate the basis of a given natural cubic spline solution on new data? Specifically if one were to d...
Calculation of natural cubic splines in R
CC BY-SA 3.0
null
2011-04-08T01:36:55.427
2011-04-08T20:21:18.013
2011-04-08T08:22:37.160
null
2040
[ "r", "splines" ]
9332
2
null
9324
1
null
How many sites did you have? The models only differ by one df, so either you only have two sites or you treated site as a continuous variable when it should have been categorical. If it should have been a factor, use `factor(SITE)` instead of `SITE`. Also, try plotting the data (always a good idea!) -- do you see any...
null
CC BY-SA 3.0
null
2011-04-08T02:21:51.427
2011-04-08T02:21:51.427
null
null
3601
null
9333
1
null
null
3
95
### Context: I have a series of figures for car sales that show me (a) the usual number of car sales for particular models and (b) the number of car sales by a particular car salesperson for each model. Let's say the values are: ``` Model | Sales by all Salespeople | Sales by Salesperson x A | ...
Determining the relationship between salesperson and products sold?
CC BY-SA 3.0
null
2011-04-08T02:27:00.023
2017-11-12T21:25:35.270
2017-11-12T21:25:35.270
11887
4078
[ "correlation", "variance" ]
9334
1
9337
null
20
15276
### Context: From a question on Mathematics Stack Exchange [(Can I build a program)](https://math.stackexchange.com/questions/31649/can-i-build-a-program-that-will-tell-me-if-a-real-world-data-set-looks-linear-lo/), someone has a set of $x-y$ points, and wants to fit a curve to it, linear, exponential or logarithmic...
Determining best fitting curve fitting function out of linear, exponential, and logarithmic functions
CC BY-SA 3.0
null
2011-04-08T02:46:48.813
2021-02-22T12:02:49.157
2017-04-13T12:19:38.853
-1
3186
[ "regression", "predictive-models", "model-selection", "curve-fitting" ]
9335
2
null
9333
1
null
Chi square test, but I'd set it up as follows: Model | this salesman | all other salesmen A | 20 | 80 B | 40 | 10 etc. Chi square test of independence, with expected values equal to row total * column total / grand total. Null hypothesis: this salesman = same as all o...
null
CC BY-SA 3.0
null
2011-04-08T02:55:10.523
2011-04-08T02:55:10.523
null
null
3919
null
9336
2
null
9334
5
null
Since plenty of people routinely explore the fit of various curves to their data, I don't know where your reservations are coming from. Granted, there is the fact that a quadratic will always fit at least as well as a linear, and a cubic, at least as well as a quadratic, so there are ways to test the statistical signi...
null
CC BY-SA 3.0
null
2011-04-08T03:19:19.230
2011-04-08T03:19:19.230
null
null
2669
null
9337
2
null
9334
12
null
- You might want to check out the free software called Eureqa. It has the specific aim of automating the process of finding both the functional form and the parameters of a given functional relationship. - If you are comparing models, with different numbers of parameters, you will generally want to use a measure of f...
null
CC BY-SA 3.0
null
2011-04-08T03:41:09.710
2011-04-08T03:41:09.710
null
null
183
null
9338
2
null
9311
38
null
The KL-divergence is typically used in information-theoretic settings, or even Bayesian settings, to measure the information change between distributions before and after applying some inference, for example. It's not a distance in the typical (metric) sense, because of lack of symmetry and triangle inequality, and so ...
null
CC BY-SA 3.0
null
2011-04-08T04:07:17.223
2011-04-08T04:07:17.223
null
null
139
null
9339
2
null
9331
4
null
Wikipedia has a [nice explanation](http://en.wikipedia.org/wiki/Spline_interpolation) of spline interpolation I posted the code to create cubic [Bezier splines](http://en.wikipedia.org/wiki/B%C3%A9zier_spline) on [Rosettacode](http://rosettacode.org/wiki/Bitmap/B%C3%A9zier_curves/Cubic#R) a while ago. Also, you can hav...
null
CC BY-SA 3.0
null
2011-04-08T05:48:32.833
2011-04-08T17:55:56.330
2017-05-23T12:39:26.523
-1
582
null
9340
2
null
9330
4
null
The problem with zeroes, is that the data do not rule out arbitrarily small proportions. So your prior information must be assessed more carefully, because in this case it still matters. Details which are irrelevant when the prior information is "swamped" by the data can be important. In this type of problem, the po...
null
CC BY-SA 3.0
null
2011-04-08T07:11:22.210
2011-04-08T07:11:22.210
null
null
2392
null
9341
1
9344
null
5
287
I have a multiple linear regression problem $y=X\beta+\epsilon$. The number of observations $m$ is large, so by the time the data gets to me it's been summarized into: - $m$ - $X^TX$ - $X^Ty$ - $y^Ty$ - $\sum_{i=1}^m{y_i}$ The above list appears sufficient to compute the OLS estimate. But can it be used to compu...
Regularized fit from summarized data
CC BY-SA 3.0
null
2011-04-08T07:18:45.413
2011-04-08T11:29:40.227
2011-04-08T11:29:40.227
439
439
[ "regression", "lasso", "regularization", "ridge-regression" ]
9342
1
null
null
19
8208
I am using hierarchical clustering to analyze time series data. My code is implemented using the Mathematica function `DirectAgglomerate[...]`, which generates hierarchical clusters given the following inputs: - a distance matrix D - the name of the method used to determine inter-cluster linkage. I have calculated ...
Is it ok to use Manhattan distance with Ward's inter-cluster linkage in hierarchical clustering?
CC BY-SA 3.0
null
2011-04-08T07:47:43.787
2020-11-17T15:32:35.653
2017-05-12T19:05:56.270
37647
4079
[ "clustering", "distance-functions", "ward" ]
9343
1
null
null
9
196
I am looking at extremely non linear data for which the ARMA/ARIMA models do not work well. Though, I see some autocorrelation, and I suspect to have better results for non linear autocorrelation. 1/ is there an equivalent of the PACF for rank correlation? (in R?) 2/ is there an equivalent of ARMA model for non linear ...
Is there an equivalent of ARMA for rank correlation?
CC BY-SA 3.0
null
2011-04-08T08:14:07.460
2018-07-20T09:25:33.440
2017-03-14T22:21:06.843
28666
1709
[ "r", "correlation", "nonparametric", "garch", "arma" ]
9344
2
null
9341
5
null
It would be nice to have in addition the covariance matrix of the residuals $\hat{\Sigma}$ to draw common inferences about the significance of estimated parameters, or if you are sure it is homoscedastic, then just $\hat{\sigma}^2$. As for the regularizations of generalised least squares type (probably including instr...
null
CC BY-SA 3.0
null
2011-04-08T08:23:08.517
2011-04-08T08:38:34.733
2011-04-08T08:38:34.733
2645
2645
null
9345
1
null
null
3
103
When doing multivariate regression, it's often the case that some predictors often have many zero values - dichotomous inputs, dummy coding of polychotomous inputs, interval coding, etc. The fraction of nonzero observations for a predictor is especially decreased when interacting these variables. It seems obvious that...
Why doesn't it seem to be standard to multiply prior scale by fraction of non-zero predictor observations?
CC BY-SA 3.0
null
2011-04-08T11:01:21.077
2011-04-08T15:24:16.877
null
null
1119
[ "regression", "bayesian" ]
9347
2
null
7314
0
null
My bad. I am trying to use too many frameworks at once, and failing to cover documentation properly. The asia example in winbugs does exactly what I've been asking for.
null
CC BY-SA 3.0
null
2011-04-08T11:45:51.657
2011-04-08T11:45:51.657
null
null
3280
null
9348
2
null
9342
6
null
I can't think of any reason why Ward should favor any metric. Ward's method is just another option to decide which clusters to fusion next during agglomeration. This is achieved by finding the two clusters whose fusion will minimize a certain error ([examplary source for the formula](http://www.stat.psu.edu/online/cour...
null
CC BY-SA 3.0
null
2011-04-08T11:46:37.697
2011-04-08T11:46:37.697
null
null
264
null
9350
2
null
9299
3
null
Here is a simple idea which might work. As I've said in the comments if you have a grid with intensities why not fit density of bivariate distribution? Here is the sample graph to illustrate my point: ![enter image description here](https://i.stack.imgur.com/YlzSK.jpg) Each grid point with is displayed as a square, col...
null
CC BY-SA 3.0
null
2011-04-08T12:39:56.850
2011-04-08T12:39:56.850
null
null
2116
null
9351
2
null
8784
4
null
The short answer is "yes you can" - but you should compare the Maximum Likelihood Estimates (MLEs) of the "big model" with all co variates in either model fitted to both. This is a "quasi-formal" way to get probability theory to answer your question In the example, $Y_{1}$ and $Y_{2}$ are the same type of variables (fr...
null
CC BY-SA 3.0
null
2011-04-08T12:43:31.697
2011-04-08T12:43:31.697
null
null
2392
null
9352
1
9353
null
6
375
I'm playing with support vector machines (SVM) using the e1071::svm() function in R, and I encountered a scenario where I asked it for a leave-one-out cross-validated classification of a 2-category response and obtained a total accuracy of 38% (35/90), which, given 90 samples, ends up with a 95% confidence interval tha...
Can anyone explain why I have obtained an anti-predictive Support Vector Machine?
CC BY-SA 3.0
null
2011-04-08T13:12:09.120
2011-04-08T13:17:12.443
null
null
364
[ "cross-validation", "svm" ]
9353
2
null
9352
10
null
It is very probably the settings for the hyper-parameters that are the issue, leading to severe over-fitting of the data. Without proper tuning of the hyper-parameters, and SVM can perform arbitrarily badly, especially for high dimensional data (it is the tuning of the regularisation parameter that gives robustness ag...
null
CC BY-SA 3.0
null
2011-04-08T13:17:12.443
2011-04-08T13:17:12.443
null
null
887
null
9354
1
9355
null
9
2987
The wonderful libsvm package provides a python interface and a file "easy.py" that automatically searches for learning parameters (cost & gamma) that maximize the accuracy of the classifier. Within a given candidate set of learning parameters, accuracy is operationalized by cross-validation, but I feel like this underm...
How does one appropriately apply cross-validation in the context of selecting learning parameters for support vector machines?
CC BY-SA 3.0
null
2011-04-08T13:29:59.237
2013-02-01T08:29:08.153
null
null
364
[ "cross-validation", "svm" ]
9355
2
null
9354
10
null
If you learn the hyper-parameters in the full training data and then cross-validate, you will get an optimistically biased performance estimate, because the test data in each fold will already have been used in setting the hyper-parameters, so the hyper-parameters selected are selected in part because they suit the dat...
null
CC BY-SA 3.0
null
2011-04-08T13:40:43.197
2011-04-08T13:40:43.197
null
null
887
null
9356
2
null
9324
4
null
Firstly, you need to set `REML=F`: ``` lmerfit1<-lmer(size ~ (1|FEMALE), data=Data, REML=F) lmerfit2<-lmer(size ~ SITE+(1|FEMALE), data=Data, REML=F) anova(lmerfit1, lmerfit2) ``` This will use MLE instead of REML, which is necessary because likelihoods from mixed models with different fixed effects are not comparable...
null
CC BY-SA 3.0
null
2011-04-08T14:43:53.077
2011-04-08T14:43:53.077
null
null
3432
null
9357
1
9364
null
66
35783
When you are trying to fit models to a large dataset, the common advice is to partition the data into three parts: the training, validation, and test dataset. This is because the models usually have three "levels" of parameters: the first "parameter" is the model class (e.g. SVM, neural network, random forest), the sec...
Why only three partitions? (training, validation, test)
CC BY-SA 3.0
null
2011-04-08T14:45:04.197
2018-07-03T07:24:50.143
2018-07-03T07:24:50.143
128677
3567
[ "machine-learning", "model-selection", "data-mining" ]
9358
1
9361
null
24
35968
I have four numeric variables. All of them are measures of soil quality. Higher the variable, higher the quality. The range for all of them is different: Var1 from 1 to 10 Var2 from 1000 to 2000 Var3 from 150 to 300 Var4 from 0 to 5 I need to combine four variables into single soil quality score which will successfully...
Creating an index of quality from multiple variables to enable rank ordering
CC BY-SA 3.0
null
2011-04-08T15:01:30.430
2020-02-11T09:24:47.123
2013-06-28T13:24:43.540
919
333
[ "ranking", "valuation" ]
9359
2
null
9345
4
null
It is difficult to understand quite what you are saying here and it would be helpful to have an illustration. Take for example the values $x_1$, $x_2$ and $y$ here ``` x_1 x_2 y --- --- --- 1 1 8 -1 1 -1 -3 0 -15 2 0 9 0 0 -1 2 0 10 -1 0 -6 ``` OLS regression would give $\hat{y}...
null
CC BY-SA 3.0
null
2011-04-08T15:24:16.877
2011-04-08T15:24:16.877
null
null
2958
null
9360
2
null
9330
0
null
You could try exact logistic regression with proc logistic, but then you cannot specify random effects somewhere in your model which you probably do now as you're using proc mixed. You'd have to switch to fixed effects but you could keep the binomial error distribution.
null
CC BY-SA 3.0
null
2011-04-08T15:35:04.183
2011-04-08T15:35:04.183
null
null
1573
null
9361
2
null
9358
23
null
The proposed approach may give a reasonable result, but only by accident. At this distance--that is, taking the question at face value, with the meanings of the variables disguised--some problems are apparent: - It is not even evident that each variable is positively related to "quality." For example, what if a 10 f...
null
CC BY-SA 3.0
null
2011-04-08T15:42:31.763
2013-04-15T20:50:06.113
2013-04-15T20:50:06.113
919
919
null
9362
2
null
9358
0
null
One other thing you did not discuss is the scale of the measurements. V1 and V5 looks like they are of rank order and the other seem not. So standardization may be skewing the score. So you may be better transforming all of the variables into ranks, and determining a weighting for each variable, since it is highly unl...
null
CC BY-SA 3.0
null
2011-04-08T16:22:39.233
2011-04-08T16:22:39.233
null
null
3489
null
9363
2
null
9358
-3
null
Following up on Ralph Winters' answer, you might use PCA (principal component analysis) on the matrix of suitably standardized scores. This will give you a "natural" weight vector that you can use to combine future scores. Do this also after all scores have been transformed into ranks. If the results are very similar,...
null
CC BY-SA 3.0
null
2011-04-08T17:43:33.113
2011-04-08T17:43:33.113
null
null
4062
null
9364
2
null
9357
88
null
First, I think you're mistaken about what the three partitions do. You don't make any choices based on the test data. Your algorithms adjust their parameters based on the training data. You then run them on the validation data to compare your algorithms (and their trained parameters) and decide on a winner. You then ru...
null
CC BY-SA 3.0
null
2011-04-08T17:58:07.700
2011-04-08T17:58:07.700
null
null
1764
null
9365
1
null
null
31
6958
What are some good papers describing applications of statistics that would be fun and informative to read? Just to be clear, I'm not really looking for papers describing new statistical methods (e.g., a paper on least angle regression), but rather papers describing how to solve real-world problems. For example, one pap...
What are some interesting and well-written applied statistics papers?
CC BY-SA 3.0
null
2011-04-08T19:01:11.850
2019-03-02T12:41:01.320
2017-03-16T16:02:09.620
-1
1106
[ "references", "application" ]
9366
2
null
9313
5
null
For an overview of some matching algorithms as well as clear examples of applications in everything from education to medical experiments, I would suggest: - Paul R. Rosenbaum (2010). Design of Observational Studies. Springer. Rosenbaum's earlier book provides a more technical review, though because matching is such...
null
CC BY-SA 3.0
null
2011-04-08T19:16:32.820
2011-04-08T19:16:32.820
null
null
3265
null