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
10033
2
null
10030
2
null
First of all, the Kolmogorov-Smirnoff test is probably incorrect for your situation. I assume you want to test whether the distribution of the number bird sightings is uniform (constant accross time). A chi-square goodness-of-fit test would be the simplest solution for that. Second, the R-produced value of 0.6 seems co...
null
CC BY-SA 3.0
null
2011-04-27T14:09:42.373
2011-04-27T14:09:42.373
null
null
279
null
10034
2
null
10031
1
null
If you are talking about a missing value in the response, there are many available texts on imputation with specific tailoring to regressions. I have not read it, but [Frank E. Harrell's text](http://books.google.com/books?hl=en&lr=&id=kfHrF-bVcvQC&oi=fnd&pg=PR7&dq=imputation%20multinomial%20logistic%20regression&ots=3...
null
CC BY-SA 3.0
null
2011-04-27T14:44:33.060
2011-04-27T14:44:33.060
null
null
3542
null
10035
2
null
10010
1
null
Perhaps [dynamic time warping](http://en.wikipedia.org/wiki/Dynamic_time_warping) is appropriate? Maybe you can use it to measure the distance between your "query" signals and your training signals (dtw actually calculates alignments between two signals, from which you can derive the distance). You'd then pick the sign...
null
CC BY-SA 3.0
null
2011-04-27T14:44:49.657
2011-04-27T14:44:49.657
null
null
227
null
10036
1
null
null
1
3422
I am using R to replicate a study and obtain mostly the same results the author reported. At one point, however, I calculate marginal effects that seem to be unrealistically small. I would greatly appreciate if you could have a look at my reasoning and the code below and see if I am mistaken at one point or another. My...
R glm probit regression marginal effects
CC BY-SA 3.0
null
2011-04-27T14:46:36.657
2012-09-02T02:55:46.353
2012-09-02T02:55:46.353
3826
4348
[ "r", "generalized-linear-model" ]
10037
1
null
null
3
2475
let v to be forecasted value for periods 1 through T and $v_{t}$ be its forecasted value at time $t$. We express $v_{t}$ as the sum of two terms, its mean at time $t$, and its deviation from the mean at time $t$, $\epsilon_{t}$. In other words, $$ v_{t}= \overline{v_{t}} + \epsilon_{t} $$ The $\overline{v_{t}}$ are ...
Fitting the moving average model
CC BY-SA 3.0
null
2011-04-27T14:57:23.747
2011-04-27T16:33:35.423
2011-04-27T16:33:35.423
null
3084
[ "r", "time-series", "arima" ]
10038
1
10040
null
4
2284
I am trying to discern the best way to calculate a correlation and perform a one-way ANOVA on data I am taking from a PostgreSQL database. - What tools should I use? - Can I do this using the SQL language itself? - Is there an easy way to export the data?
Conducting correlation and one way ANOVA using data from a PostgreSQL database
CC BY-SA 3.0
null
2011-04-27T14:58:52.013
2011-04-28T10:29:17.357
2011-04-28T10:29:17.357
183
1514
[ "correlation", "anova", "sql" ]
10039
2
null
9533
2
null
Would the nearest-neighbor distance distribution help ? For each of the 150 observations, you have distances $d_1\ d_2$ ... to its nearest, 2nd nearest ... neighbors, and an averaged distance distribution, call it DD. A query point gives you the distribution $d_1 .. d_{150}$: compare that to DD. The metric between poin...
null
CC BY-SA 3.0
null
2011-04-27T15:10:30.253
2011-04-27T15:10:30.253
null
null
557
null
10040
2
null
10038
3
null
Although you can substitute the values into the ANOVA formulas and correlation formulas yourself, maybe even calculate everything using SQL you probably want to use the ANOVA and correlation features of a statistical software. All major statistical software (SAS, SPSS, Stata, R, Statistica etc) are able to connect to d...
null
CC BY-SA 3.0
null
2011-04-27T15:13:22.780
2011-04-27T15:13:22.780
null
null
3911
null
10041
2
null
10024
7
null
[This paper](http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4767478&tag=1) appears to prove convergence in a finite number of steps.
null
CC BY-SA 3.0
null
2011-04-27T15:27:37.043
2011-04-27T15:27:37.043
null
null
495
null
10042
2
null
9797
1
null
Here is a simple approach that does not use logistic regression, but does attempt to use the suggestions above. Calculation of summary stats assumes, perhaps naively, that the date is normally distributed. Please pardon inelegant code - write a function to estimate the day of budbreak for each individual: use the day...
null
CC BY-SA 3.0
null
2011-04-27T16:02:11.710
2011-04-27T16:02:11.710
null
null
1381
null
10043
2
null
10038
3
null
For simple correlation, in would use the statistical functions which are directly available in Postgre. e.g. ----> SELECT CORR(x, y) FROM YourTable; For ANOVA it is a bit tougher. You might be better off transforming your problem to one involving regression and use the regression formulas. [http://www.postgresql.org/...
null
CC BY-SA 3.0
null
2011-04-27T16:02:20.230
2011-04-27T16:02:20.230
null
null
3489
null
10044
1
null
null
8
984
I have 100 patients and each patient have 10 longitudinal serum creatinine measurements. The estimated glomerular filtration rates (eGFR) were calculated from a MDRD formula comprising gender, age and serum creatinine. eGFR is the dependent variable and time is the independent variable in linear regression for each pat...
Can slopes in linear regressions be used as the independent or dependent variables in other regression models?
CC BY-SA 3.0
null
2011-04-27T16:27:36.533
2011-04-29T04:59:18.027
2011-04-27T18:31:47.960
71
4349
[ "regression", "mixed-model", "repeated-measures", "panel-data" ]
10045
1
10047
null
16
1851
I have hourly and daily temperature reports for many stations at [http://data.barrycarter.info/](http://data.barrycarter.info/) I encourage people to download it, but, at 6.6G, it uses up a lot of bandwidth. Is there a service that hosts "public interest" data for free? I know about [http://aws.amazon.com/publicda...
Free public interest data hosting?
CC BY-SA 3.0
null
2011-04-27T16:39:04.570
2015-10-09T10:00:14.350
null
null
null
[ "dataset" ]
10046
2
null
10024
4
null
The $k$-means objective function strictly decreases with each change of assignment, which automatically implies convergence without cycling. Moreover, the partitions produced in each step of $k$-means satisfy a "Voronoi property" in that each point is always assigned to its nearest center. This implies an upper bound o...
null
CC BY-SA 3.0
null
2011-04-27T16:44:37.730
2011-04-27T16:44:37.730
null
null
139
null
10047
2
null
10045
7
null
I did a quick search for google projects that may fit your needs, and I came up with two hits, which I have not tested: [Google Fusion Tables](https://www.google.com/accounts/ServiceLogin?service=fusiontables&passive=1209600&continue=http://www.google.com/fusiontables/Home&followup=http://www.google.com/fusiontables/Ho...
null
CC BY-SA 3.0
null
2011-04-27T17:23:10.253
2011-04-27T17:23:10.253
null
null
3542
null
10049
1
null
null
7
3348
I am working on the BRFSS dataset with the goal of predicting Diabetes. The dataset has 500,000 rows and 405 columns. It is a 0/1 classification problem, the ratio of 0 to 1 is 90:10. I tried using decision trees, logistic regression an ensemble of decision trees and logistic regression and my misclassification rate is...
Improving accuracy of a binary classification when the target is unbalanced
CC BY-SA 3.0
null
2011-04-27T18:37:21.917
2013-01-06T18:24:58.067
2017-04-13T12:44:33.977
-1
3897
[ "machine-learning", "sas" ]
10050
2
null
10045
2
null
You should also take a look at [Infochimps](http://www.infochimps.com/). I've never used the site personally, but it's designed for precisely this.
null
CC BY-SA 3.0
null
2011-04-27T18:44:38.870
2011-04-27T18:44:38.870
null
null
71
null
10051
1
10061
null
4
894
I am looking for a repeated measures version of the [Logrank test](http://en.wikipedia.org/wiki/Logrank_test). If I am correct, I am looking for an equivalent of the Friedman test for survival data. Any suggestions on where to look? (and R code will always be welcomed :) ) Thanks.
Is there a repeated measures aware version of the logrank test?
CC BY-SA 3.0
null
2011-04-27T18:45:15.907
2011-04-27T22:56:56.187
2011-04-27T22:56:56.187
null
253
[ "r", "nonparametric", "survival", "logrank-test" ]
10052
2
null
10044
5
null
In effect, you are proposing to use linear regression as a mathematical procedure to condense a 10-variate observation into a single variable (the slope). As such it's just another example of similar procedures like (say) using an average of repeated measurements as a regression variable or including principal compone...
null
CC BY-SA 3.0
null
2011-04-27T18:54:41.967
2011-04-27T18:54:41.967
null
null
919
null
10053
1
null
null
11
12983
I am attempting to test the goodness of fit for a vector of count data to a binomial. To do so I am using the `goodfit()` function in the `vcd` package. When I run the function, however, it returns `NaN` for the p-value of the Chi-squared test. In my setup, I have a vector of count data with 75 elements. ``` > libra...
NaN p-value when using R's goodfit on binomial data
CC BY-SA 3.0
null
2011-04-27T19:10:24.630
2011-04-28T22:50:54.383
2011-04-28T22:50:54.383
null
302
[ "binomial-distribution", "chi-squared-test", "goodness-of-fit" ]
10054
2
null
10049
1
null
Regarding decision trees, I would suggest the following. Assume that you have 10 training examples from class $C_1$ and 90 training examples from class $C_2$. You can use an ensemble of $N$ decision trees, where each tree is trained on 10 examples from $C_1$ and 10 randomly chosen examples from $C_2$. The decision of t...
null
CC BY-SA 3.0
null
2011-04-27T19:25:02.690
2011-04-28T02:49:11.433
2011-04-28T02:49:11.433
4337
4337
null
10055
1
null
null
0
260
I have a table I want to convert into a graph (bar-graph or line-graph) The first column has fixed values. Twenty different values are simulated for these fixed values and kept in the next columns. I want to plot a graph of the fixed column against all the different twenty simulated columns. How do I go about it? I am ...
How to convert a table into a graph in R
CC BY-SA 3.0
0
2011-04-27T19:37:31.773
2011-04-27T19:37:31.773
null
null
4340
[ "graph-theory" ]
10056
2
null
10045
5
null
How about the [UCI Machine Learning Repository](http://archive.ics.uci.edu/ml/index.html)? Here is their [data donation policy](http://archive.ics.uci.edu/ml/donation_policy.html).
null
CC BY-SA 3.0
null
2011-04-27T20:16:08.833
2011-04-27T20:16:08.833
null
null
4325
null
10057
1
null
null
1
95
Many academic papers focusing on statistical learning in the applied setting of finance train a model such that their parameter set, B, defines the relationship y(t) = B*x(t) + e(t) y could be a 0-1 coded response for an increase (or not) of the asset price at time t. Ignoring the details of the model my question is...
Classification in a applied financial setting
CC BY-SA 3.0
null
2011-04-27T20:45:01.373
2011-05-27T20:50:51.843
null
null
4352
[ "classification" ]
10058
1
10321
null
7
629
I need a reality check if you will. I have a data set, where I know how many individual butterflies of two species co-occur at one meadow (not always, though). I have additional variables, for instance wet/dry meadow, intensely cultivated/not cultivated, percent of area around the meadow covered by wet or dry meadows.....
Reality check using GLM
CC BY-SA 3.0
null
2011-04-27T20:45:05.570
2013-07-17T17:52:18.233
2013-07-17T17:52:18.233
6029
144
[ "r", "generalized-linear-model" ]
10059
1
10170
null
8
12138
- Is it possible to do 2-stage cluster analysis in R? - Can anybody provide me resource on it?
Two-stage clustering in R
CC BY-SA 3.0
null
2011-04-27T20:48:00.120
2019-10-28T02:26:16.910
2011-04-28T02:14:29.323
183
4278
[ "r", "clustering" ]
10060
2
null
10057
1
null
If you want to predict the future, and then use that information to profit, you need to build a model like this: `Next(y)~x` or `y(t+1)=B*x(t)+e(t)` i.e. specify your problem as "what will happen tomorrow" not "what did happen today." Look at the [quantmod](http://cran.r-project.org/web/packages/quantmod/index.html) pa...
null
CC BY-SA 3.0
null
2011-04-27T20:49:05.533
2011-04-27T20:49:05.533
null
null
2817
null
10061
2
null
10051
2
null
You can probably use a so-called marginal survival model. It would be more like Cox-regression than a log-rank test, i.e. proportional hazards for the effect of task would be assumed. It is implemented in the `survival` package: ``` mod <- coxph(Surv(time, censor) ~ task + cluster(id)) ``` Here `task` would be a facto...
null
CC BY-SA 3.0
null
2011-04-27T21:08:56.193
2011-04-27T21:08:56.193
null
null
279
null
10062
1
10070
null
9
5342
I would like to fit a mixture model to Monte Carlo generated data with probability densities which typically look like those in the attached image. ![typical densities](https://i.stack.imgur.com/TQw1z.png) It would seem from visual inspection that a normal mixture model might be applicable but on checking the CRAN task...
Which R package to use to calculate component parameters for a mixture model
CC BY-SA 3.0
null
2011-04-27T21:10:13.713
2011-09-24T02:16:05.507
2011-05-11T13:29:30.453
919
226
[ "r", "mixed-model" ]
10063
1
null
null
2
583
I am attempting to test the goodness of fit for a vector of count data to a binomial. To do so I am using the `goodfit()` function in the `vcd` package. When I run the function, however, it returns `NaN` for the p-value of the Chi-squared test. In my setup, I have a vector of count data with 75 elements. ``` > libra...
p-value NaN when using goodfit() on binomial data
CC BY-SA 3.0
0
2011-04-27T18:17:13.837
2011-04-27T22:04:50.433
null
null
302
[ "r" ]
10064
2
null
10053
7
null
You have zero frequencies in observed counts. That explains `NaN`s in your data. If you look at `test.gof` object, you'll see that: ``` table(test.gof$observed) 0 1 2 3 4 5 7 8 10 56 5 3 2 5 1 1 2 1 ``` you have 56 zeros. Anyway, IMHO this question is for [http://stats.stackexchange.com](http://stats...
null
CC BY-SA 3.0
null
2011-04-27T18:54:14.177
2011-04-27T18:54:14.177
null
null
1356
null
10065
1
null
null
3
578
I have a collection of $10^5$ essays, each of which on average contains $10^3$ distinct words. There are $10^6$ distinct words in the entire collection. If I index every word what is the mean and median size of the inverted index lists? My guess is that median would be 1, but I have no clue how without the parameters c...
Mean and median in Zipf's distribution
CC BY-SA 3.0
null
2011-04-27T22:17:42.550
2013-04-27T09:12:29.140
2011-04-28T07:10:04.853
1371
1371
[ "self-study", "mean", "median", "zipf" ]
10066
1
null
null
2
1617
I am trying to perform a canonical correlation analysis to investigate the relationship between attitudes (14 variables), perceived consumer effectiveness (6 variables) AND Intention to dine (DV) 14 variables. However when SPSS generates the Manova Output there are no tables on redundancy index and as far as I underst...
How to get a redundancy index when performing canonical correlation analysis in SPSS?
CC BY-SA 3.0
null
2011-04-27T22:40:23.897
2011-04-28T09:12:41.800
2011-04-28T09:12:41.800
930
4356
[ "correlation", "multivariate-analysis", "spss" ]
10067
1
99399
null
5
1650
I am a software engineer by trade doing stats in my free time. I am playing around with an implementation of [Microsoft's TrueSkill](http://research.microsoft.com/en-us/projects/trueskill/) rating system for ranking players and openings in from a data set of ~700,000 Dominion games. I want to measure the log loss of ...
Maximum of two (or more) gaussian distributions with known and possibly different means/variances
CC BY-SA 3.0
null
2011-04-27T23:16:13.090
2014-05-20T14:56:00.673
null
null
4164
[ "normal-distribution", "predictive-models" ]
10069
2
null
10005
5
null
Here's a few options using the ggplot2 package. If you haven't started learning much about plotting with R, taking the time now to learn [ggplot2](http://had.co.nz/ggplot2/) or lattice may be worth the effort. ggplot requires data to be in "long" format, so the first thing we'll do is reformat to long: ``` require(ggp...
null
CC BY-SA 3.0
null
2011-04-28T00:23:08.120
2011-04-28T00:23:08.120
null
null
696
null
10070
2
null
10062
9
null
Try [mixdist](http://cran.r-project.org/web/packages/mixdist/index.html) Here's an example: ``` library(mixdist) #Build data vector "x" as a mixture of data from 3 Normal Distributions x1 <- rnorm(1000, mean=0, sd=2.0) x2 <- rnorm(500, mean=9, sd=1.5) x3 <- rnorm(300, mean=13, sd=1.0) x <- c(x1, x2, x3) ...
null
CC BY-SA 3.0
null
2011-04-28T00:38:55.720
2011-04-28T00:38:55.720
null
null
2775
null
10071
2
null
9850
2
null
Perhaps try something like [Fastmap](http://portal.acm.org/citation.cfm?id=223812) to plot your set of marks using their relative distances. [(still) nothing clever](http://gromgull.net/blog/2009/08/fastmap-in-python/) has written up Fastmap in python to plot strings and could be easily updated to handle lists of att...
null
CC BY-SA 3.0
null
2011-04-28T01:51:18.807
2011-04-28T01:51:18.807
null
null
1856
null
10072
2
null
220
87
null
If the CDF of $X_i$ is denoted by $F(x)$, then the CDF of the minimum is given by $1-[1-F(x)]^n$. Reasoning: given $n$ random variables, the probability $P(Y\leq y) = P(\min(X_1\dots X_n)\leq y)$ implies that at least one $X_i$ is smaller than $y$. The probability that at least one $X_i$ is smaller than $y$ is equivale...
null
CC BY-SA 4.0
null
2011-04-28T02:10:35.973
2019-09-04T09:59:55.003
2019-09-04T09:59:55.003
258028
4358
null
10073
2
null
10066
1
null
It's been a while since I've run canonical correlation in SPSS. Perhaps have a look at the `cancorr` macro. It's an alternative way of running a canonical correlation, and from memory it provides slightly different output. ### Running Cancor Here's some [info on running cancorr](http://jeromyanglim.blogspot.com/2010...
null
CC BY-SA 3.0
null
2011-04-28T02:34:53.760
2011-04-28T02:34:53.760
null
null
183
null
10074
1
10097
null
2
2857
After a little searching, I was able to find data from the 1990 US census on the frequency of male and female first names, and on surnames. That data is [here](https://web.archive.org/web/20110103145240/http://www.census.gov/genealogy/names/names_files.html). I'm not able to find similar data for any other census years...
Where can I find name data for US census years other than 1990?
CC BY-SA 4.0
0
2011-04-28T03:46:16.683
2023-05-01T06:57:11.210
2023-05-01T06:57:11.210
362671
4359
[ "dataset", "census" ]
10075
1
10081
null
15
31925
I'm teaching myself probability theory, and I'm not sure I understand any use for variance, as opposed to standard deviation. In the practice situations I'm looking at, the variance is larger than the range, so it doesn't seem intuitively useful.
What is the practical application of variance?
CC BY-SA 3.0
null
2011-04-28T04:51:05.910
2018-02-02T05:46:06.277
2011-04-28T07:58:18.980
null
4361
[ "variance" ]
10076
2
null
10075
3
null
Variance is the most basic of the two measures... stddev = sqrt(variance). While exaggerated, it's good enough for a comparison and grows very large when there is mixed-up-ness in the distribution. ``` variance(22, 25, 29, 30, 37) = 32.3 variance(22, 25, 29, 30, 900) = 152611.0 ``` Standard deviation is used way more...
null
CC BY-SA 3.0
null
2011-04-28T06:13:12.620
2011-04-28T06:13:12.620
null
null
1856
null
10077
2
null
10074
0
null
Try calling the census bureau using a help line number from census.gov. It usually takes a few tries and patience with bureaucracy, but they've always been helpful to me. The census doesn't release individual names in their data sets, so it will have to be a census bureau created aggregation.
null
CC BY-SA 3.0
null
2011-04-28T06:25:09.087
2011-04-28T08:06:46.293
2011-04-28T08:06:46.293
4361
4361
null
10079
1
null
null
83
248157
Within the context of a research proposal in the social sciences, I was asked the following question: > I have always gone by 100 + m (where m is the number of predictors) when determining minimum sample size for multiple regression. Is this appropriate? I get similar questions a lot, often with different rules of t...
Rules of thumb for minimum sample size for multiple regression
CC BY-SA 3.0
null
2011-04-28T06:40:32.977
2017-11-22T17:09:56.040
2020-06-11T14:32:37.003
-1
183
[ "regression", "sample-size", "statistical-power", "rule-of-thumb" ]
10080
2
null
9850
30
null
Usually you'd plot the original values in a scatterplot (or a matrix of scatterplots if you have many of them) and use colour to show your groups. You asked for an answer in python, and you actually do all the clustering and plotting with scipy, numpy and matplotlib: ## Start by making some data ``` import numpy as ...
null
CC BY-SA 3.0
null
2011-04-28T06:42:26.660
2011-04-28T06:42:26.660
2020-06-11T14:32:37.003
-1
3732
null
10081
2
null
10075
9
null
In practice, you calculate the SD through calculating the variance (as abutcher indicated). I believe the variance is used more often (apart from interpretation, as you indicated yourself) because it has a lot of statistically interesting properties: it has unbiased estimators in a lot of cases, leads to known distribu...
null
CC BY-SA 3.0
null
2011-04-28T06:49:29.953
2011-04-28T06:49:29.953
null
null
4257
null
10082
2
null
10058
3
null
You indicate yourself that your measurements are not independent (you measure both species' abundance from the same locations). As such, you should correct for repeated measurements. Try lmer from the lme4 package.
null
CC BY-SA 3.0
null
2011-04-28T07:01:33.323
2011-04-28T07:01:33.323
null
null
4257
null
10083
2
null
10066
1
null
As it is not really difficult to import SAV dataset in R nowadays, with e.g., ``` library(foreign) df <- read.spss("yourfilename", to.data.frame=TRUE) ``` you can check your SPSS results against one of the R packages that allow to perform CCA (see the CRAN Task View on [Multivariate](http://cran.r-project.org/web/view...
null
CC BY-SA 3.0
null
2011-04-28T09:10:40.600
2011-04-28T09:10:40.600
null
null
930
null
10084
1
10087
null
3
675
What's it called when I'm trying to remove the effect of a variable on another variable? Am I in the right ballpark using the terms "detrending" or "normalizing" or "controlling for Y on X"? What's the general process for doing this? The problem I'm working with currently is as follows: I work at a mine that loads trai...
Accounting for biases in the data (normalizing? detrending?)
CC BY-SA 3.0
null
2011-04-28T09:30:46.753
2011-04-28T11:02:40.190
null
null
827
[ "regression", "normalization" ]
10086
1
10090
null
3
233
I have 6 random number generators. They are "black boxes", i.e. I do not know if they are the same or different. For example I do not know if they provide the same arithmetic averages and/or root mean square deviations. My goal is to check if they are the same or different. The problem is that I can generate a limited ...
How different random number generators can be more similar than identical ones?
CC BY-SA 3.0
null
2011-04-28T10:42:16.010
2011-04-28T11:19:41.957
null
null
2407
[ "mean", "random-generation", "hypothesis-testing" ]
10087
2
null
10084
2
null
The simple solution: ``` df$locationAdjustedTonnes = resid(lm(df$tonnes ~ df$dist_fr_middle)) ``` A general way is tweaking this (The example below gives the same result as the one above): ``` df$locationAdjustedTonnes = df$tonnes - predict(lm(df$tonnes ~ df$dist_fr_middle)) ```
null
CC BY-SA 3.0
null
2011-04-28T11:02:40.190
2011-04-28T11:02:40.190
null
null
3911
null
10088
1
10091
null
2
5185
For a multilabel dataset, i would like to find the number of clusters involved in it. The below example gives more details about the problem: ``` Label_A: feature values Label_B: feature values Label_A, Label_C: feature values Label_C: feature values ... etc ``` We have say $n$ datarecord. Label field may have single...
How to determine optimal number of clusters?
CC BY-SA 3.0
null
2011-04-28T11:10:57.593
2019-06-06T20:39:39.673
2011-04-28T15:07:36.650
183
4290
[ "clustering" ]
10089
1
null
null
2
527
I have 3 arms in a trial. I want to compare results of a survey before during and on completion of a treatment. Data is not normally distributed. What test should I use?
How to handle multiple comparisons in a three-arm clinical trial?
CC BY-SA 3.0
null
2011-04-28T11:18:50.257
2011-11-11T03:27:26.863
2011-04-28T12:52:54.167
930
4367
[ "multiple-comparisons", "survey", "clinical-trials" ]
10090
2
null
10086
2
null
What you are doing is essentially the standard nonparametrical trick (a black box random generator can be seen as simply an unknown distribution, and your main hypothesis is that the distributions are the same). As such, it should work. However, you are using the difference of the means as a test statistic. Though it i...
null
CC BY-SA 3.0
null
2011-04-28T11:19:41.957
2011-04-28T11:19:41.957
null
null
4257
null
10091
2
null
10088
3
null
You can convert the labels into features indicating if the label is present or not. After that you can use various clustering algorithms and their corresponding methods to find out the number of clusters. EDIT: I understood that your difficulty was handling the multiple labels and I suggested a solution for that. Your ...
null
CC BY-SA 3.0
null
2011-04-28T11:40:10.407
2011-04-28T19:12:57.390
2017-04-13T12:44:21.613
-1
3911
null
10092
1
null
null
6
22684
I am trying to understand Logistic Regression in relation to credit scoring model. I wish to understand the significance of "20/ln(2)" in logistic regression. Why and how is it used?
What does "20/ln(2)" mean in logistic regression?
CC BY-SA 3.0
null
2011-04-28T11:54:46.047
2020-07-02T13:45:10.190
2011-07-29T06:22:27.997
183
4368
[ "logistic" ]
10093
2
null
10079
12
null
(+1) for indeed a crucial, in my opinion, question. In macro-econometrics you usually have much smaller sample sizes than in micro, financial or sociological experiments. A researcher feels quite well when on can provide at least feasible estimations. My personal least possible rule of thumb is $4\cdot m$ ($4$ degrees...
null
CC BY-SA 3.0
null
2011-04-28T12:11:19.007
2011-04-28T19:01:45.053
2011-04-28T19:01:45.053
2645
2645
null
10094
1
null
null
10
704
I performed both a SVD decomposition and a multidimensional scaling of a 6-dimensional data matrix, in order to get a better understanding of the structure of the data. Unfortunately, all the singular values are of the same order, implying that the dimensionality of the data is indeed 6. However, I would like to be abl...
How to interpret results of dimensionality reduction/multidimensional scaling?
CC BY-SA 3.0
null
2011-04-28T13:26:53.983
2011-07-22T08:25:45.747
null
null
3699
[ "pca", "interpretation", "dimensionality-reduction", "svd" ]
10095
1
10108
null
8
9904
### Assumptions: In an ANOVA where the normality assumptions are violated, the Box-Cox transformation can be applied to the response variable. The `lambda` can be estimated by the using maximum likelihood to optimize the normality of the model residuals. ### Question: When the estimates for `lambda` in the null m...
Estimating Lambda for Box Cox transformation for ANOVA
CC BY-SA 3.0
null
2011-04-28T13:52:13.837
2017-02-25T14:15:46.357
2017-02-25T14:15:46.357
11887
501
[ "r", "anova", "maximum-likelihood", "modeling", "data-transformation" ]
10096
1
null
null
4
263
I am currently monitoring the daily energy consumption of a house since January of this year. That daily consumption depends on several variables, including outdoor temperature, solar irradiance etc. At regular intervals (once every two weeks) I am changing the algorithm of the heating controller, to see if I can impro...
How to test the effect of various manipulations of an independent variable on a dependent variable in a timeseries?
CC BY-SA 3.0
null
2011-04-28T14:06:44.270
2012-03-02T03:44:21.547
2017-03-09T17:30:36.720
-1
4370
[ "time-series", "intervention-analysis" ]
10097
2
null
10074
2
null
In [this post](http://www.mapleprimes.com/posts/38183-Baby-Names), my friend John May links to [http://www.ssa.gov/OACT/babynames/](http://www.ssa.gov/OACT/babynames/); I believe it only has the top 1000 most popular first names for both sexes, but for all years since 1879. (John's post [and the followup](http://www.ma...
null
CC BY-SA 3.0
null
2011-04-28T14:16:49.660
2011-04-28T14:16:49.660
null
null
2898
null
10098
2
null
10017
10
null
After a lot of reading, I found the solution for doing clustering within the `lm` framework. There's an excellent [white paper](http://people.su.se/~ma/clustering.pdf) by Mahmood Arai that provides a tutorial on clustering in the `lm` framework, which he does with degrees-of-freedom corrections instead of my messy atte...
null
CC BY-SA 3.0
null
2011-04-28T15:08:21.680
2015-04-27T16:12:06.400
2015-04-27T16:12:06.400
1445
1445
null
10099
2
null
10074
1
null
A search for a name on [Wolfram|Alpha](http://www.wolframalpha.com/input/?i=Eric) gives some stats and a distribution graph of ages. At the bottom of the output is a 'Source information' link, which results in a popup with a bunch of references. One is the ssa.gov babynames (link above). Most of the references are fo...
null
CC BY-SA 4.0
null
2011-04-28T15:08:58.207
2023-05-01T06:56:00.703
2023-05-01T06:56:00.703
362671
4372
null
10100
1
10118
null
2
169
Online marketers often need to choose a "winning" variation among, say, 2 possible variations. ### Example: - PageVariation1 had 1000 sessions with 20 conversions (2.0% response rate) and - PageVariation2 had 800 sessions with 8 conversions (1.0% response rate). I'm using the "unpooled" [Two-Proportion z-Test](...
How to embed measurement uncertainty in a two-proportion z-test?
CC BY-SA 3.0
null
2011-04-28T15:11:57.650
2011-04-29T05:13:18.330
2011-04-28T22:51:49.780
null
4374
[ "missing-data", "proportion" ]
10101
2
null
10053
3
null
Would you be happier with a surgically altered goodfit object? ``` > idx <- which(test.gof$observed != 0) > idx [1] 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 > test.gof$par$size <- length( idx-1) > test.gof$fitted <- test.gof$fitted[idx] > test.gof$count <- test.gof$count[idx] > test.gof$observed <-...
null
CC BY-SA 3.0
null
2011-04-28T15:14:00.030
2011-04-28T15:14:00.030
null
null
2129
null
10102
2
null
10100
3
null
A few quick points: - You could draw on the general literature on missing data. - If the 200 sessions with missing data are known to be completely random, then you could choose to ignore these observations and just analyse the data where you have complete data. - In general it is important to think through what mech...
null
CC BY-SA 3.0
null
2011-04-28T15:33:56.817
2011-04-29T05:13:18.330
2011-04-29T05:13:18.330
183
183
null
10103
2
null
10031
1
null
If a potential outcome has never been observed, then you have no information about the effect of covariates on it. So any outcome-specific covariate effects are unidentifiable. If you assume constant covariate effects, then this outcome has no effect on their estimation, so you might as well omit it from the data. More...
null
CC BY-SA 3.0
null
2011-04-28T15:52:05.907
2011-04-28T15:52:05.907
null
null
279
null
10104
1
null
null
7
108
Because all clinical and laboratory data are continuous random variables larger than zero (i.e. they are bounded above zero), is it impossible for them to be normally distributed? Can they only be log-normally distributed? Thank you.
Is it impossible for clinical and laboratory data to be normally distributed?
CC BY-SA 3.0
null
2011-04-28T15:57:52.087
2011-04-28T18:23:22.037
null
null
4349
[ "distributions" ]
10105
2
null
10079
42
null
I'm not a fan of simple formulas for generating minimum sample sizes. At the very least, any formula should consider effect size and the questions of interest. And the difference between either side of a cut-off is minimal. ### Sample size as optimisation problem - Bigger samples are better. - Sample size is often...
null
CC BY-SA 3.0
null
2011-04-28T16:03:22.203
2011-04-28T16:03:22.203
null
null
183
null
10106
2
null
10095
5
null
The Box-Cox transformation tries to improve the normality of the residuals. Since that is the assumption of ANOVA as well, you should run it on the model that you are actually going to use, i.e. the full model. For example, if you have two well separated groups, the distribution of the response variable will be strongl...
null
CC BY-SA 3.0
null
2011-04-28T16:04:21.660
2011-04-28T16:04:21.660
null
null
279
null
10107
2
null
10104
9
null
You are correct, a positive-only value cannot be really normally distributed. However depending on the particular circumstances, its distribution could be sufficiently close to normal for statistical methodology assuming normality to apply. I want to note that very few methods actually require normality of the data, of...
null
CC BY-SA 3.0
null
2011-04-28T16:07:58.037
2011-04-28T16:07:58.037
null
null
279
null
10108
2
null
10095
4
null
It is not appropriate to do ordinary ANOVA after using the same dataset to fit lambda. The analysis should be unified, penalizing for uncertainty in lambda (a parameter to be estimated, and included in the covariance matrix).
null
CC BY-SA 3.0
null
2011-04-28T16:16:40.647
2011-04-28T16:16:40.647
null
null
4253
null
10109
1
null
null
1
455
I am trying to use R to develop a corporate financial model. The model includes various line items, X, of the following form with actual values for time period 1, 2.. n and projected values for periods n+1, n+2,.. n+k. g is the average growth rate for the forecast period. I need to construct a vector of the following ...
Lagged Variables in R
CC BY-SA 3.0
null
2011-04-28T16:51:00.163
2011-04-28T18:47:02.267
2011-04-28T18:12:11.967
3911
4375
[ "r", "time-series", "forecasting" ]
10110
1
null
null
4
1658
100 periods have been collected from a 3 dimensional periodic signal. The wavelength slightly varies. The noise of the wavelength follows Gaussian distribution with zero mean. A good estimate of the wavelength is known, that is not an issue here. The noise of the amplitude may not be Gaussian and may be contaminated wi...
How to exploit periodicity to reduce noise of a signal?
CC BY-SA 3.0
null
2011-04-28T16:59:06.690
2011-05-01T23:30:01.290
2017-05-23T12:39:26.143
-1
4240
[ "r", "time-series", "autocorrelation", "arima", "kalman-filter" ]
10111
1
11195
null
5
10490
I would like to compute the p-value of my two-way ANOVA. The score that I am using to detect significant samples is the eta score which is computed as SS(between)/SS(total). In many sites I saw that F=Var(between)/Var(within). I want to know if I can consider the eta score as the F-statistic value, and then compute ...
Calculating p-value for a two-way ANOVA
CC BY-SA 3.0
null
2011-04-28T17:14:11.820
2011-05-24T14:34:40.337
2011-04-28T18:34:07.647
930
2885
[ "anova", "p-value" ]
10112
2
null
10110
3
null
I'm not sure I totally understand what would be best, but I believe that looking at Dynamic Linear Models, State Space modeling, and the Kalman Filter would be helpful. In R, the package `dlm` is fairly accessible. Edit: Describe DLM's simply, eh? One explanation I've seen is that DLMs are regression where your coeffic...
null
CC BY-SA 3.0
null
2011-04-28T17:59:25.397
2011-04-30T22:52:56.120
2011-04-30T22:52:56.120
1764
1764
null
10113
2
null
9850
0
null
I'm not a python expert, but it is extremely helpful to plot the 1st 2 principal components against each other on the x,y axes. Not sure which packages you are using, but here is a sample link: [http://pyrorobotics.org/?page=PyroModuleAnalysis](http://pyrorobotics.org/?page=PyroModuleAnalysis)
null
CC BY-SA 3.0
null
2011-04-28T18:06:58.480
2011-04-28T18:06:58.480
null
null
3489
null
10114
2
null
10104
3
null
Many biological measurements take positive values only and to such variables applies the rule of thumb: If $\text{mean} < 2\cdot\text{SD}$ then the distribution is not normal. Explanation: for normally distributed values the majority of values are in the interval $[\text{mean}\pm2\cdot\text{SD}]$, and a normal distrib...
null
CC BY-SA 3.0
null
2011-04-28T18:23:22.037
2011-04-28T18:23:22.037
null
null
3911
null
10116
2
null
10109
2
null
Does this do what you want? ``` x1 <- 1:10 g <- .1 x2 <- cumprod(c(tail(x1, 1), rep(1+g, 5))) c(x1, x2) ```
null
CC BY-SA 3.0
null
2011-04-28T18:47:02.267
2011-04-28T18:47:02.267
null
null
3542
null
10117
1
null
null
4
821
I sincerely apologize if there is another thread already that will answer this question. I'm so incredibly out of my league here that I don't even know what keywords to search for :-). I'm a computer programmer by trade, and while I have a basic background in math, statistics was never really my cup of tea. I currentl...
Beginner to prediction/statistics: Where do I start?
CC BY-SA 3.0
null
2011-04-28T19:57:29.240
2011-04-29T00:08:49.870
2011-04-28T22:55:58.053
2970
4379
[ "forecasting", "panel-data" ]
10118
2
null
10100
3
null
It can help to survey the scene: that is, to understand the consequences for your decision of the possible states of affairs. The missing information can be described by two integers: $m$, the number of additional sessions for "PageVariation2", and $k$, the number of additional conversions for PageVariation2. For each...
null
CC BY-SA 3.0
null
2011-04-28T20:53:13.500
2011-04-28T20:53:13.500
null
null
919
null
10120
2
null
10117
1
null
"anomaly detection" -- This is usually called detection of outliers. You can find many references via googling. "can more aggressions predict more self injurious behaviors" -- You can try one of the basic things: correlation between different variables or features (you called them "inputs"). The data will be easier to ...
null
CC BY-SA 3.0
null
2011-04-28T21:23:38.963
2011-04-28T21:31:47.557
2011-04-28T21:31:47.557
4337
4337
null
10121
1
null
null
11
2634
I would like to generate a random correlation matrix such that the distribution of its off-diagonal elements looks approximately like normal. How can I do it? The motivation is this. For a set of $n$ time series data, the correlation distribution often looks quite close to normal. I would like to generate many "normal"...
How to generate random correlation matrix that has approximately normally distributed off-diagonal entries with given standard deviation?
CC BY-SA 3.0
null
2011-04-28T22:18:23.307
2015-11-25T10:50:43.863
2015-11-25T10:50:43.863
28666
4383
[ "normal-distribution", "random-generation", "correlation-matrix" ]
10122
1
null
null
4
2254
I'm looking for a clustering implementation with the following features: - Support for high-dimensional data. Now I have approximately 160.000 dimensions/features. - Be able to manage sparse matrix. That is, not only to read sparse matrices, but also capable of making operations in this format. - Properly shows the ...
Looking for sparse and high-dimensional clustering implementation
CC BY-SA 3.0
null
2011-04-28T22:22:09.967
2012-10-02T15:31:28.983
2020-06-11T14:32:37.003
-1
4382
[ "clustering", "algorithms", "large-data" ]
10123
2
null
1737
1
null
I personally like `cast()`, from the reshape package because of it's simplicity: ``` library(reshape) cast(melt(tips), sex ~ smoker | variable, c(sd,mean, length)) ```
null
CC BY-SA 3.0
null
2011-04-28T22:36:25.187
2011-04-28T22:36:25.187
null
null
776
null
10124
2
null
10117
1
null
It sounds like you have some really wonderful data to work with! One person suggested trying analyses in R, and that's definitely a powerful option. With your background in programming, it may be well-suited for you. I personally prefer a program like SPSS, which is built specifically user-friendly(ish) analysis of soc...
null
CC BY-SA 3.0
null
2011-04-28T22:38:17.013
2011-04-28T22:52:08.073
2011-04-28T22:52:08.073
2970
4384
null
10125
2
null
10053
0
null
Try plotting it. You'll get a better idea of what's going on. As mentioned before, you're getting NaN because you're passing 0 frequencies to chisq.test() ``` test.gof <- goodfit(counts, type="binomial", par=list(size=length(counts), prob=0.5)) plot(test.gof) ## doesn't look so good test.gof <- goodfit(counts, type="...
null
CC BY-SA 3.0
null
2011-04-28T22:44:44.650
2011-04-28T22:44:44.650
null
null
776
null
10126
1
10132
null
4
1291
I ran a GEE model, with a dependent variable of "percent of total students with an unexcused absence," using a binomial family. My dependent variable is basically a proportion, with range from 0 to 1 to obey the rules of the binomial family. I understand that the difference between the non-event/event 0-1 is "zero perc...
Interpretation of odds ratio when outcome is a percentage
CC BY-SA 3.0
null
2011-04-28T22:57:24.707
2011-04-29T10:09:11.960
2011-04-28T23:18:41.013
null
3309
[ "logistic" ]
10127
2
null
10121
1
null
You might be interested in some of the code at the following link: [Correlation and Co-integration](https://quant.stackexchange.com/questions/1027/correlation-and-cointegration-similarities-differences-relationships)
null
CC BY-SA 3.0
null
2011-04-28T23:12:04.403
2011-04-28T23:12:04.403
2017-04-13T12:46:23.127
-1
2775
null
10128
2
null
6698
1
null
Although this question has already been answered a useful way to remember for more general situations is the law of iterated expectations. Note that the independence for prediction does not hold even if the "true process" is independent. This is because the estimates are not independent, unless you have $Z^{T}Z$ and ...
null
CC BY-SA 3.0
null
2011-04-28T23:29:00.073
2011-04-28T23:46:12.220
2011-04-28T23:46:12.220
2392
2392
null
10130
3
null
null
0
null
null
CC BY-SA 3.0
null
2011-04-29T00:18:02.670
2011-04-29T00:18:02.670
2011-04-29T00:18:02.670
-1
-1
null
10131
3
null
null
0
null
null
CC BY-SA 3.0
null
2011-04-29T00:18:02.670
2011-04-29T00:18:02.670
2011-04-29T00:18:02.670
-1
-1
null
10132
2
null
10126
3
null
In a school with a 1-unit higher X value a randomly picked student has 0.9 times the odds of having been unexcused from class at least once, compared to an other school. (Assuming that all other student and school characteristics modelled are the same.)
null
CC BY-SA 3.0
null
2011-04-29T01:26:50.757
2011-04-29T10:09:11.960
2011-04-29T10:09:11.960
3911
3911
null
10133
1
null
null
9
513
Question for the experienced data miners out there: ### Given this scenario: - There are N shopping carts - Each shopping cart is filled with an arbitrary number of M items from an infinitely large set (with the current amount of data I have, that arbitrary number can hit numbers around 1500) - The order in which...
Data mining approaches for analysis of sequential data with nominal attributes
CC BY-SA 3.0
null
2011-04-29T01:57:42.573
2011-05-01T20:20:58.663
2011-04-29T17:04:04.173
4386
4386
[ "clustering", "classification", "data-mining", "ordinal-data" ]
10135
2
null
10110
2
null
You may want to check out [Functional Data Analysis](http://www.psych.mcgill.ca/misc/fda/), which permits characterization of functional (temporal) phenomena with noise in the wavelength, amplitude, etc.
null
CC BY-SA 3.0
null
2011-04-29T05:35:19.293
2011-04-29T05:35:19.293
null
null
364
null
10136
2
null
10020
8
null
### Suggestions - You could perform individual multiple regressions for each type of predictor, and compare across multiple regressions, adjusted r-square, generalised r-square, or some other parsimony adjusted measure of variance explained. - You could alternatively explore the general literature on variable impo...
null
CC BY-SA 3.0
null
2011-04-29T06:08:36.737
2011-04-30T03:11:51.177
2011-04-30T03:11:51.177
183
183
null
10137
1
null
null
6
15859
Related to an [earlier question on power analysis for multiple regression](https://stats.stackexchange.com/questions/10079/rules-of-thumb-for-minimum-sample-size-for-multiple-regression), a social science researcher asked me about power analysis for [moderator regression](http://www.davidakenny.net/cm/moderation.htm) (...
Power analysis for moderator effect in regression with two continuous predictors
CC BY-SA 3.0
null
2011-04-29T06:24:13.510
2021-07-06T21:01:03.487
2017-04-13T12:44:25.243
-1
183
[ "regression", "sample-size", "statistical-power", "interaction" ]
10138
2
null
9930
3
null
I think that variable z in the question is a suppresor variable. I suggest having a look at: Tzelgov, J., & Henik, A. (1991).Suppression situations in psychological research: Definitions, implications, and applications, Psychological Bulletin, 109 (3), 524-536. [http://doi.apa.org/psycinfo/1991-20289-001](http://doi.a...
null
CC BY-SA 3.0
null
2011-04-29T07:20:04.600
2011-04-29T07:20:04.600
null
null
4390
null
10140
2
null
10137
6
null
If I had to do this, I would use a simulation approach. This would involve making assumptions about the regression coefficients, predictor distributions, correlation between predictors, and error variance (with help from the researcher), generating data sets using the assumed model, and seeing what proportion of these ...
null
CC BY-SA 3.0
null
2011-04-29T08:34:31.240
2011-04-29T08:34:31.240
null
null
3835
null
10141
1
null
null
9
1980
I know this question might have been around before like in this SO [thread](https://stackoverflow.com/questions/2804001/panel-data-with-binary-dependent-variable-in-r), but maybe (hopefully) its answer has changed over time. - Is there any package in R or an outline how to do panel regressions with a discrete dependen...
Discrete choice panel models in R
CC BY-SA 3.0
null
2011-04-29T09:44:30.163
2021-06-20T16:43:19.210
2021-06-20T16:43:19.210
11887
704
[ "r", "panel-data", "choice-modeling" ]