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
7679
1
7682
null
9
1201
I've scoured Google and this site and I am still confused about the lmer function in the lme4 library. I have some data collected from different psychiatric wards, which have a multilevel structure. To simplify, I'll pick two level 2 and two level 1 variables, although I actually have a few more. Level 2- WardSize [thi...
Am I specifying my lmer model correctly?
CC BY-SA 2.5
null
2011-02-27T16:16:32.887
2013-04-04T03:55:09.250
null
null
199
[ "r", "mixed-model", "lme4-nlme" ]
7680
2
null
2213
18
null
What George Dontas writes is correct, however the use of RNNs in practice today is restricted to a simpler class of problems: time series / sequential tasks. While feedforward networks are used to learn datasets like $(i, t)$ where $i$ and $t$ are vectors, e.g. $i \in \mathcal{R}^n$, for recurrent networks $i$ will alw...
null
CC BY-SA 4.0
null
2011-02-27T16:29:58.647
2020-01-07T17:45:25.723
2020-01-07T17:45:25.723
156277
2860
null
7681
1
null
null
8
608
Say we have the following 5 cities, each with the same population - CityA with 20% each of 5 ethnicities - CityB with 99% of one ethnicity, but 100 different ethnicities in the remaining 1% - CityC with 40% of one ethnicity and the remaining 60% distributed evenly over 10 different ethnicities How can one measure...
Is there a way to compute diversity in a population?
CC BY-SA 2.5
null
2011-02-27T19:05:14.440
2018-10-13T08:57:24.400
2018-10-13T08:57:24.400
11887
276
[ "distributions", "population", "diversity" ]
7682
2
null
7679
12
null
Your model specification is fine. The varying intercept for Ward, specified in lmer as you've done with (1 | Ward), is saying that subjects within each ward might be more similar to each other on Selfreject for reasons other than WardSize or Gender, so you are controlling for between-ward heterogeneity. You can think...
null
CC BY-SA 2.5
null
2011-02-27T19:38:14.600
2011-02-27T19:38:14.600
null
null
1916
null
7683
1
7685
null
15
6046
I'm struggling to find a method for reducing the number of categories in nominal or ordinal data. For example, let's say that I want to build a regression model on a dataset that has a number of nominal and ordinal factors. While I have no problems with this step, I often run into situations where a nominal feature is...
Methods for merging / reducing categories in ordinal or nominal data?
CC BY-SA 3.0
null
2011-02-27T21:02:23.573
2017-02-09T13:36:51.180
2017-02-09T13:36:51.180
11887
3401
[ "r", "categorical-data", "dimensionality-reduction", "many-categories" ]
7684
2
null
213
12
null
I novel approach I saw was by IT Jolliffe Principal Components Analysis. You run a PCA on your data (Note: PCA can be quite a useful data exploration tool in its own right), but instead of looking at the first few Principal Components (PCs), you plot the last few PCs. These PCs are the linear relationships between yo...
null
CC BY-SA 3.0
null
2011-02-27T21:22:37.633
2013-11-21T23:21:08.853
2013-11-21T23:21:08.853
17230
2392
null
7685
2
null
7683
12
null
This is a response to your second question. I suspect the correct approach to these kinds of decisions will be determined largely by disciplinary norms and the expectations of the intended audience of your work. As a social scientist, I often work with survey (or survey-like) data and I always try to balance substantiv...
null
CC BY-SA 2.5
null
2011-02-27T21:52:51.347
2011-03-01T03:12:29.883
2020-06-11T14:32:37.003
-1
3396
null
7686
1
7696
null
1
1829
if range of gaussian pdf is not a probability then how come it is used in Bayes rule in the same way as pmf?
Bayes rule and gaussian PDF
CC BY-SA 2.5
null
2011-02-27T22:04:16.123
2011-02-28T16:23:11.257
2011-02-27T22:18:27.367
null
3456
[ "bayesian", "normal-distribution" ]
7687
2
null
7681
8
null
How about the [Shannon index](http://en.wikipedia.org/wiki/Shannon_index)?
null
CC BY-SA 2.5
null
2011-02-28T00:42:13.393
2011-02-28T00:42:13.393
null
null
1050
null
7688
1
7693
null
2
535
I searched on the internet for books on statistics (particularly 4shared.com), and most of the books I found do not cover multivariate statistics in detail. Are there any good books which cover these topics in detail and with sufficient examples?
Books with good coverage of joint distributions, multivariate statistics, etc?
CC BY-SA 3.0
null
2011-02-28T01:24:26.660
2013-07-03T15:05:26.567
2013-07-03T15:05:26.567
17230
null
[ "multivariate-analysis", "references", "joint-distribution" ]
7689
2
null
7681
2
null
You may be interested in [this paper](http://arxiv.org/abs/1101.5305): "A new axiomatic approach to diversity" from Chris Dowden.
null
CC BY-SA 2.5
null
2011-02-28T03:15:48.423
2011-02-28T03:15:48.423
null
null
3459
null
7690
2
null
7686
1
null
The posterior distribution derived using continuous distributions in Bayes Theorem can always be integrated (although maybe not be hand) to give a probability. If you want to convince yourself "caveman style," run the desired probabilities through Bayes Theorem using a Gaussian CDF, then take the derivative to get the ...
null
CC BY-SA 2.5
null
2011-02-28T03:36:47.303
2011-02-28T03:36:47.303
null
null
5792
null
7691
2
null
6155
8
null
Aside from what has been said, for the vusualization task alone (and outside from R), you might be interested in checking [Gephi](http://gephi.org).
null
CC BY-SA 2.5
null
2011-02-28T06:14:53.413
2011-02-28T06:14:53.413
null
null
892
null
7692
2
null
7688
1
null
Despite @whuber's sound comment--covering all advances in MV analysis for the last 30 years is also outside the scope of e.g. the famous [Handbook of Statistics](http://www.elsevier.com/locate/inca/BS_HS) series--, I would like to recommend > Izenman, Modern Multivariate Statistical Techniques, Springer 2008. A...
null
CC BY-SA 2.5
null
2011-02-28T07:39:54.400
2011-02-28T07:39:54.400
null
null
930
null
7693
2
null
7688
2
null
Last year, I spent every lunchtime for a week going to the Waterstones University bookshop in London looking for a good book on multivariate statistics (sad I know!). I also endorse Izenman, Modern Multivariate Statistical Techniques, Springer 2008, as it really was the stand-out book. It starts every chapter with an e...
null
CC BY-SA 2.5
null
2011-02-28T07:57:23.627
2011-02-28T07:57:23.627
null
null
null
null
7694
1
null
null
16
693
I am doing time series data analysis by state space methods. With my data the stochastic local level model totally outperformed the deterministic one. But the deterministic level and slope model gives better results than with stochastic level and stochastic/deterministic slope. Is this something usual? All methods in ...
How to check which model is better in state space time series analysis?
CC BY-SA 3.0
0
2011-02-28T08:38:16.633
2013-08-18T22:49:08.440
2013-01-17T12:27:44.190
17230
null
[ "time-series", "state-space-models" ]
7695
1
null
null
2
345
The Pareto distribution can be used to give a pdf for the wealth of a person chosen randomly from a population. (In fact, this was its origin. See, for instance, [http://en.wikipedia.org/wiki/Pareto_principle](http://en.wikipedia.org/wiki/Pareto_principle) ). I would like to explore the reciprocal question: Given the...
Understanding the Pareto distribution as applied to wealth
CC BY-SA 2.5
null
2011-02-28T08:55:17.277
2011-02-28T09:26:52.597
2011-02-28T09:26:52.597
null
null
[ "distributions", "modeling", "predictive-models", "application", "pareto-distribution" ]
7696
2
null
7686
3
null
@Ahmed - you are definitely correct in thinking that something is not quite right here. Conditioning on "point values" which have probability/measure 0 can be "dangerous" and can lead to what is called a [Borel and Kolmogorov Paradox](http://en.wikipedia.org/wiki/Borel%E2%80%93Kolmogorov_paradox). The lesson from this...
null
CC BY-SA 2.5
null
2011-02-28T09:26:48.403
2011-02-28T16:23:11.257
2011-02-28T16:23:11.257
919
2392
null
7697
2
null
672
3
null
Bayes theorem in its most obvious form is simply a re-statement of two things: - the joint probability is symmetric in its arguments $P(HD|I)=P(DH|I)$ - the product rule $P(HD|I)=P(H|I)P(D|HI)$ So by using the symmetry: $$P(HD|I)=P(H|I)P(D|HI)=P(D|I)P(H|DI)$$ Now if $P(D|I) \neq 0$ you can divide both sides by $P(D...
null
CC BY-SA 2.5
null
2011-02-28T09:55:19.267
2011-02-28T09:55:19.267
null
null
2392
null
7698
1
null
null
6
9472
I want to approximate a non-linear function with a limited value range by an artificial neural network (feed forward, back propagation). Most tools and literature availabe suggest linear functions for the output neurons when doing regressions. However, I know a priori that my goal function is of limited range, therefor...
Output layer of artificial neural networks when learning non-linear functions with limited value range
CC BY-SA 4.0
null
2011-02-28T10:53:14.850
2018-10-11T10:59:28.927
2018-10-11T10:58:59.127
128677
3465
[ "neural-networks" ]
7699
1
7700
null
1
2744
I have just done a Chow test on a regression in order to see whether there is a structural break. I am a bit stumped however as my Chow test returns a negative number. Now what do I do? More specifically, this expression (from the Wikipedia [entry](http://en.wikipedia.org/wiki/Chow_test) for the Chow test): $\frac{(S_c...
What to do with negative Chow test?
CC BY-SA 3.0
null
2011-02-28T11:36:50.210
2017-11-01T11:31:04.367
2017-11-01T11:31:04.367
28666
3086
[ "change-point", "chow-test" ]
7700
2
null
7699
4
null
You've made a mistake somewhere in your calculations. It's not possible for the sum of the squared residuals from a single regression using the combined data to be less than the sum of the sums of squared residuals from the regressions using the two separate sets of data.
null
CC BY-SA 2.5
null
2011-02-28T12:09:40.833
2011-02-28T12:09:40.833
null
null
449
null
7701
1
null
null
3
8633
I have data from human participants in a study. There are more females in the study (60%) and males are older. I have a binary categorical variable $O$. If those who are $True$ for $O$ are older, do I need to correct for sex and/or age? Maybe those $True$ for $O$ contain more men. What concepts or methods should I use ...
Adjusting for Confounding Variables
CC BY-SA 2.5
null
2011-02-28T12:10:44.647
2011-02-28T14:33:46.443
2011-02-28T14:12:06.410
2116
2824
[ "r", "regression", "categorical-data" ]
7702
2
null
7681
3
null
[Tree diversity analysis](http://www.worldagroforestry.org/units/library/books/PDFs/Kindt%20b2005.pdf) book will get you up to speed with common diversity indices, along with some useful packages in R and their usage. While the book talks about trees, it can be used with marine fauna (which I did for my thesis) or even...
null
CC BY-SA 2.5
null
2011-02-28T12:32:27.213
2011-02-28T12:32:27.213
null
null
144
null
7703
2
null
7698
2
null
If you use a logistic activation function in the output layer it will restrict the output to the range 0-1 as you require. However if you have a regression problem with a restricted output range the sum-of-squares error metric may not be ideal and maybe a beta noise model might be more appropriate (c.f. beta regressi...
null
CC BY-SA 4.0
null
2011-02-28T13:01:10.830
2018-10-11T10:59:28.927
2018-10-11T10:59:28.927
128677
887
null
7704
2
null
7681
4
null
This paper by [Massey and Denton 1988](http://dx.doi.org/10.2307/2579183) is a fairly prolific overview of commonly used indices in Sociology/Demography. It would also be useful for some other key terms used for searching articles. Frequently in Sociology the indices are labelled with names such as "heterogeneity" and ...
null
CC BY-SA 3.0
null
2011-02-28T13:07:11.443
2013-06-27T13:15:47.193
2013-06-27T13:15:47.193
22047
1036
null
7705
2
null
7698
0
null
If you know an absolute range for the output, but there is no reason to expect it to have the non-linear characteristic of the typical logistic activation function (i.e. a value in the middle is just as likely as a value near 0 or 1), then you can just transform the output by dividing by the absolute maximum. If the m...
null
CC BY-SA 2.5
null
2011-02-28T13:45:26.013
2011-02-28T13:45:26.013
null
null
2917
null
7706
1
7710
null
3
1063
If my dataset comprises few censored variables (<1%) and I fit the OLS regression using a heteroscedastic resistant estimator (the residuals are not terribly heteroscedastic to begin with)- are the results valid?
What is the magnitude of bias in censored regression when OLS is applied?
CC BY-SA 2.5
null
2011-02-28T14:03:40.473
2011-02-28T19:50:18.567
2011-02-28T14:41:16.510
2116
1291
[ "survival", "least-squares", "censoring" ]
7707
2
null
7701
1
null
Edited several times to reflect comments I realized I should give an example of what I meant by "what your model looks like now." From what you've said, I'm assuming that $Variant$ or $O$ is your dependent or outcome variable and that you're starting with something like the following: $Variant = \beta_0 + \beta_1(Femal...
null
CC BY-SA 2.5
null
2011-02-28T14:05:58.000
2011-02-28T14:33:46.443
2011-02-28T14:33:46.443
3396
3396
null
7709
2
null
6809
5
null
UPDATE: Now on CRAN: [http://cran.r-project.org/web/packages/C50/index.html](http://cran.r-project.org/web/packages/C50/index.html) ORIGINAL: We've been working on this for a bit now (starting with Cubist then working on C5.0). If you'd like to contribute: [https://r-forge.r-project.org/projects/rulebasedmodels/](https...
null
CC BY-SA 3.0
null
2011-02-28T14:09:51.923
2012-08-30T18:48:56.600
2012-08-30T18:48:56.600
3468
3468
null
7710
2
null
7706
5
null
Suppose you observe $(y_i,x_i)$, which come frome censored regression model: \begin{align} y^*_i&=x_i\beta+u_i \\ y_i&= \max(y_i^*,0) \end{align} with $u_i|x_i\sim N(0,\sigma^2)$, Then this model is equivalent to: \begin{align} y_i=x_i\beta+\sigma\lambda(x_i\beta/\sigma)+e_i, \end{align} where $E(e_i|x_i,y_i>0)=0$ and...
null
CC BY-SA 2.5
null
2011-02-28T14:38:32.627
2011-02-28T19:50:18.567
2011-02-28T19:50:18.567
930
2116
null
7712
1
7713
null
2
211
I am not sure if this is an instance of vectorizing the operations in R, but this is where I am stuck: I want to get: ``` dpois(1, 0.1) dpois(2, 0.2) dpois(3, 0.3) ``` and I tried: ``` dpois(1:3, 0.1:0.3) ``` and ``` do.call(dpois, list(x = 1:3, lambda = 0.1:0.3)) ``` both do not work. It there a R-ish way of doin...
How do I "vectorize" calls to dpois?
CC BY-SA 2.5
null
2011-02-28T16:30:13.000
2018-10-19T02:12:21.990
null
null
1307
[ "r" ]
7713
2
null
7712
6
null
From `help(dpois)` it looks like you need `x` and `lambda` to be vectors (read more about object classes in the R Intro or any other R documentation to understand what this means). The following works: `dpois(1:3, c(seq(0.1, 0.3, .1)))` Your first attempt fails because you are not concatenating (see: `help(c)`) the va...
null
CC BY-SA 2.5
null
2011-02-28T16:48:15.783
2011-02-28T17:16:06.103
2011-02-28T17:16:06.103
3396
3396
null
7714
1
null
null
3
870
What inter-rate reliability test is best for continuous data? I am doing a study with one variable with continuous data, now the measurement involves measurements done by two people. I would wish to do inter-rater reliability test for the data, so far I have collected a few samples and a sample data I have given below...
Interater reliability
CC BY-SA 2.5
null
2011-02-28T17:00:48.593
2011-02-28T19:08:43.810
2011-02-28T18:59:08.360
3472
3472
[ "reliability", "agreement-statistics" ]
7716
2
null
2957
20
null
Unbiased estimates are typical in introductory statistics courses because they are: 1) classic, 2) easy to analyze mathematically. The Cramer-Rao lower bound is one of the main tools for 2). Away from unbiased estimates there is possible improvement. The bias-variance trade off is an important concept in statistics ...
null
CC BY-SA 2.5
null
2011-02-28T18:06:45.623
2011-03-01T01:07:08.683
2011-03-01T01:07:08.683
1670
1670
null
7717
2
null
7714
1
null
I'd suggest you [plot the difference against the mean ](http://en.wikipedia.org/wiki/Bland-Altman_plot) then quantify things using the mean difference and the standard deviation of the difference. Seven samples is rather few though.
null
CC BY-SA 2.5
null
2011-02-28T19:08:43.810
2011-02-28T19:08:43.810
null
null
449
null
7718
1
7725
null
12
7232
Is there any standard method to determine an "optimal" operation point on a [precision recall](http://en.wikipedia.org/wiki/Precision_and_recall) curve? (i.e., determining the point on the curve that offers a good trade-off between precision and recall) Thanks
How to choose a good operation point from precision recall curves?
CC BY-SA 2.5
null
2011-02-28T19:56:26.907
2020-12-26T19:35:38.027
2011-02-28T21:22:53.433
930
2798
[ "machine-learning", "precision-recall" ]
7719
1
null
null
3
890
The Data: The observed probability (proportions) of three mutually exclusive events for five species. What is the best way to plot these data in R along with their standard errors? I'd like to avoid a "beside" bar plot with error bars (3 bars for each species). I was hoping to use a stacked bar plot, but I'm unsure how...
Plotting Multiple Proportions With Standard Error
CC BY-SA 2.5
null
2011-02-28T20:21:29.907
2011-02-28T20:21:29.907
null
null
3474
[ "r", "data-visualization", "proportion" ]
7720
1
null
null
31
48740
I am new to R, ordered logistic regression, and `polr`. The "Examples" section at the bottom of the help page for [polr](http://stat.ethz.ch/R-manual/R-patched/library/MASS/html/polr.html) (that fits a logistic or probit regression model to an ordered factor response) shows ``` options(contrasts = c("contr.treatment", ...
How to understand output from R's polr function (ordered logistic regression)?
CC BY-SA 2.5
null
2011-02-28T20:51:28.700
2018-01-08T16:24:10.643
2011-03-01T21:22:49.080
2849
2849
[ "r", "logistic" ]
7721
1
7770
null
8
412
I need to do a high dimensional biological data analysis. My data consists of hundreds of thousands of dimensions. I am looking for an implementation of multinomial logistic regression that will scale well to data of this size. Ideally, it should allow me to also do Ridge and Lasso regressions also. Which software shou...
Scalable multinomial regression implementation
CC BY-SA 3.0
null
2011-02-28T21:24:23.323
2017-07-26T13:50:10.523
2017-07-26T13:50:10.523
128677
3301
[ "regression", "lasso", "ridge-regression", "multinomial-logit" ]
7723
1
null
null
6
8453
We are learning pivot functions, test statistics, and hypothesis testing at university but it makes no sense. I've tried reading my text book/notes, going through examples, etc., but the concepts seem like a random guess and I'm clueless about how to even start guessing what the answer could be.  ### 1st part Can yo...
Pivotal quantities, test statistics and hypothesis tests
CC BY-SA 2.5
null
2011-02-28T21:58:04.160
2011-03-08T20:04:13.470
2011-03-08T20:04:13.470
null
null
[ "hypothesis-testing", "pivot" ]
7725
2
null
7718
14
null
The definition of "optimal" will of course depend on your specific goals, but here are a few relatively "standard" methods: - Equal error rate (EER) point: the point where precision equals recall. This feels to some people like a "natural" operating point. - A refined and more principled version of the above is to sp...
null
CC BY-SA 4.0
null
2011-02-28T22:11:04.873
2019-11-08T15:10:57.790
2019-11-08T15:10:57.790
11032
3369
null
7726
2
null
7554
1
null
As @rolando2 mentioned, the histogram might be a tool for displaying the variations; and also, as @ashaw stated, you might need to find where 95% percentage of number go to, then, you can probably just use box plot to generate the basic features of your dataset, and put the data to the dashboard that is shown in the co...
null
CC BY-SA 2.5
null
2011-02-28T23:04:16.287
2011-02-28T23:04:16.287
null
null
3296
null
7727
1
null
null
11
11332
I asked [this question](https://stackoverflow.com/questions/5130808/how-to-correlate-two-time-series-with-gaps-and-different-time-bases) over on StackOverflow, and was recommended to ask it here. --- I have two time series of 3D accelerometer data that have different time bases (clocks started at different times, w...
How to correlate two time series with gaps and different time bases?
CC BY-SA 3.0
null
2011-03-01T01:13:29.410
2019-07-23T22:34:49.777
2019-07-23T22:34:49.777
11887
3479
[ "time-series", "correlation", "unevenly-spaced-time-series" ]
7728
2
null
7683
6
null
The kinds of approaches ashaw discusses can lead to a relatively more systematic methodology. But I also think that by systematic you mean algorithmic. Here data mining tools may fill a gap. For one, there's the chi-squared automated interaction detection (CHAID) procedure built into SPSS's Decision Tree module; it ...
null
CC BY-SA 2.5
null
2011-03-01T01:29:23.287
2011-03-01T01:29:23.287
null
null
2669
null
7730
1
7731
null
8
2095
If I have a dependent variable and $N$ predictor variables and wanted my stats software to examine all the possible models, there would be $2^N$ possible resulting equations. I am curious to find out what the limitations are with regard to $N$ for major/popular statistic software since as $N$ gets large there is a com...
What are the software limitations in all possible subsets selection in regression?
CC BY-SA 2.5
null
2011-03-01T03:09:39.890
2011-03-02T14:06:57.093
2011-03-01T12:53:58.627
10633
10633
[ "regression", "model-selection", "multivariable" ]
7731
2
null
7730
12
null
I suspect 30--60 is about the best you'll get. The standard approach is the leaps-and-bounds algorithm which doesn't require fitting every possible model. In $R$, the [leaps](http://cran.r-project.org/web/packages/leaps/index.html) package is one implementation. The documentation for the `regsubsets` function in the le...
null
CC BY-SA 2.5
null
2011-03-01T03:19:54.343
2011-03-01T04:09:02.487
2011-03-01T04:09:02.487
2970
2970
null
7732
1
null
null
1
2962
I have 2 acceleration vectors, each represented by a matrix with its first column corresponding to the magnitude of acceleration and second column corresponding to the time (in ms) They both represent the same data, but one sensor is started a little later than the other, so I'm trying to remove the time lag using corr...
Calculate Cross Correlation of two matrices of the 'Values Vs. Time' representation
CC BY-SA 2.5
null
2011-03-01T03:21:16.320
2011-03-01T04:27:36.000
2011-03-01T04:27:36.000
2116
null
[ "correlation", "matlab", "autocorrelation", "cross-correlation", "fourier-transform" ]
7734
1
null
null
23
1365
### Context: In an effort to structure the center pieces that I have came across in probability theory and statics, I created a reference document focussing on the mathematical essentials (available [here](https://github.com/mavam/stat-cookbook)). By sharing this document, I hope to give statistics students a compre...
Suggestions for improving a probability and statistics cheat sheet
CC BY-SA 3.0
null
2011-03-01T06:45:55.910
2012-11-28T06:50:32.550
2012-11-28T06:50:32.550
1537
1537
[ "teaching" ]
7735
2
null
7734
4
null
My favorite is the [R Inferno](http://www.burns-stat.com/pages/Tutor/R_inferno.pdf) by Patrick Burns.
null
CC BY-SA 2.5
null
2011-03-01T07:40:34.397
2011-03-01T07:40:34.397
null
null
3309
null
7736
2
null
7734
6
null
[Tom Short's R Reference Card](http://cran.r-project.org/doc/contrib/Short-refcard.pdf) is excellent.
null
CC BY-SA 2.5
null
2011-03-01T08:01:54.057
2011-03-01T08:01:54.057
null
null
183
null
7737
2
null
7723
5
null
The first thing you should do is challenge your lecturer to explain these things clearly. If anything whatsoever seems counter-intuitive or backwards, them demand that he/she explains why it is intuitive. Statistics always makes sense if you think about it in the "right" way. Calculating pivotal quantities is a very ...
null
CC BY-SA 2.5
null
2011-03-01T09:34:17.290
2011-03-06T12:13:16.900
2011-03-06T12:13:16.900
2392
2392
null
7739
2
null
7730
3
null
As $N$ gets big, your ability to use maths becomes absolutely crucial. "inefficient" mathematics will cost you at the PC. The upper limit depends on what equation you are solving. Avoiding matrix inverse or determinant calculations is a big advantage. One way to help with increasing the limit is to use theorems for ...
null
CC BY-SA 2.5
null
2011-03-01T10:17:03.143
2011-03-01T10:17:03.143
null
null
2392
null
7741
2
null
7698
0
null
"Would it work to use the linear function and simply cut all values below 0 to 0, and values above 1 to 1?" I believe in many cases the cut-off value should be the percentage split of the training data. Eg if your training data has 13% - 0's and 87% - 1's, then the cut-off would be 0.13; For example anything 0.13 and ...
null
CC BY-SA 2.5
null
2011-03-01T10:48:20.840
2011-03-01T10:48:20.840
null
null
null
null
7742
1
null
null
10
1925
Suppose that the quantity which we want to infer is a probability distribution. All we know is that the distribution comes from a set $E$ determined, say, by some of its moments and we have a prior $Q$. The maximum entropy principle(MEP) says that the $P^{\star}\in E$ which has least relative entropy from $Q$ (i.e., $...
Bayesian vs Maximum entropy
CC BY-SA 2.5
null
2011-03-01T12:01:31.540
2017-06-05T23:00:38.103
2017-06-05T23:00:38.103
11887
3485
[ "bayesian", "estimation", "maximum-entropy" ]
7743
2
null
7730
10
null
Just a caveat, but feature selection is a risky business, and the more features you have, the more degrees of freedom you have with which to optimise the feature selection criterion, and hence the greater the risk of over-fitting the feature selection criterion and in doing so obtain a model with poor generalisation ab...
null
CC BY-SA 2.5
null
2011-03-01T13:01:35.607
2011-03-01T13:01:35.607
null
null
887
null
7744
1
null
null
2
493
Can anyone give some advice on how to start proving this algebraically? Define the residual from a regression (one independent variable) algebraically and show that: - the mean of the residuals is zero - the correlation of the residuals and the independent variable is zero
Algebraic definition of a residual from a regression
CC BY-SA 2.5
null
2011-03-01T13:42:42.827
2011-03-01T14:35:34.517
2011-03-01T13:51:30.480
8
null
[ "regression", "self-study", "residuals" ]
7745
1
7752
null
2
131
hopefully you can help me with the meaning of the following, I don't really understand the terminology: "regression of a vector of ones on the matrix $W$", where $W$ is something like $(W_t)' = (w_{1t},w_{2t},w_{3t}, w_{4t})$. I don't understand, which regression I actually have to compute. If it is of help for you, I'...
Terminology question concerning regression
CC BY-SA 2.5
null
2011-03-01T14:04:45.603
2011-03-01T15:05:06.350
2011-03-01T14:34:47.363
449
3104
[ "regression", "hypothesis-testing", "terminology" ]
7746
2
null
7744
2
null
Suppose you have the following regression model: $$ y_i=\alpha+\beta x_i+\varepsilon_i $$ Least squares problem looks for $\alpha$ and $\beta$ which minimize the following function: $$g(\alpha,\beta)=\sum_{i=1}^n(y_i-\alpha-\beta x_i)^2$$ Solution for this problem will satisfy $$\frac{\partial g}{\partial \alpha}=0...
null
CC BY-SA 2.5
null
2011-03-01T14:10:29.967
2011-03-01T14:35:34.517
2011-03-01T14:35:34.517
2116
2116
null
7747
2
null
5292
119
null
You can also try the brand-new [RStudio](http://www.rstudio.org/). Reasonably full-featured IDE with easy set-up. I played with it yesterday and it seems nice. Update I now like RStudio even more. They actively implement feature requests, and it shows in the little things getting better and better. It also includes...
null
CC BY-SA 3.0
null
2011-03-01T14:19:56.700
2014-03-06T17:03:55.387
2014-03-06T17:03:55.387
36515
3488
null
7748
2
null
7698
2
null
I am opposed to cutting values of, since this will lead to an undifferentiable transfer function and your gradient based training algorithm might screw up. The sigmoid function at the output layer is fine: $\sigma(x) = \frac{1}{1 + e^{-x}}$. It will squash any output to lie within $(0, 1)$. So you can get arbitrarily c...
null
CC BY-SA 2.5
null
2011-03-01T14:31:43.597
2011-03-01T14:31:43.597
null
null
2860
null
7749
1
null
null
2
284
"Under what condition (or conditions if you think it necessary) would one observe no change in the regression coefficient (e.g., b-hat Y on X1) for some variable when another variable is added to the regression equation?" I think the answer is when the exogenous variables are perfectly uncorrelated - is that correct?
Changes in the regression coefficient
CC BY-SA 2.5
null
2011-03-01T14:36:24.950
2011-03-01T17:15:36.960
null
null
null
[ "regression" ]
7750
2
null
7749
5
null
Basically yes. This follows from the [omitted variable bias](http://en.wikipedia.org/wiki/Omitted_variable_bias) problem. As you can see the bias depends on crossproduct of the variables in regression (in this case the intercept and your variable of interest) and the omitted variable. If the sample correlation of the v...
null
CC BY-SA 2.5
null
2011-03-01T14:55:17.340
2011-03-01T17:15:36.960
2011-03-01T17:15:36.960
2116
2116
null
7751
2
null
7730
5
null
I was able to generate all possible subsets using 50 variables in SAS. I do not believe there is any hard limitation other than memory and CPU speed. ### Edit I generated the 2 best models for N=1 to 50 variables for 5000 observations. @levon9 - No, this ran in under 10 seconds. I generated 50 random variables from...
null
CC BY-SA 2.5
null
2011-03-01T14:56:19.553
2011-03-02T14:06:57.093
2020-06-11T14:32:37.003
-1
3489
null
7752
2
null
7745
4
null
Ordinary least squares regression of $y$ on $X$ involves solving the normal equations $$X'X\hat{\beta} = X'y$$ for $\hat{\beta}$, so I'd assume OLS regression of a vector of ones on $W$ implies solving $$W'W\hat{\beta} = W'\bf{1},$$ where $\bf{1}$ is a vector of ones. If the matrix $X$ itself contained a column of ones...
null
CC BY-SA 2.5
null
2011-03-01T15:05:06.350
2011-03-01T15:05:06.350
null
null
449
null
7753
2
null
5292
2
null
Despite all of the good recommendations, I've not found anything radically better than the default Mac GUI. R-Studio shows promise, but it's not currently that much more customizable or featureful than R and, say, BBEdit to edit.
null
CC BY-SA 2.5
null
2011-03-01T16:16:25.957
2011-03-01T16:16:25.957
null
null
1764
null
7754
1
7755
null
7
41787
## Background I have two estimates of variance and their associated standard errors calculated from sample sizes of $n=500$ and $n=10,000$ the results are $\hat{\sigma^2} (sd_{\hat{\sigma^2}})$: $$\hat{\sigma^2}_{n=500}=69 (6.4)$$ $$\hat{\sigma^2}_{n=10,000}=72 (1.5)$$ ## Question If I say that variance increased...
How to calculate the difference of two standard deviations?
CC BY-SA 2.5
null
2011-03-01T16:37:19.447
2011-03-01T19:10:57.737
2020-06-11T14:32:37.003
-1
1381
[ "standard-deviation", "variance" ]
7755
2
null
7754
8
null
The standard deviation of the difference between two independent random variables is the square root of the sum of the squares of their individual standard deviations (easier to express as variances) so in this case $$\sqrt{6.4^2 + 1.5^2} \approx 6.6$$
null
CC BY-SA 2.5
null
2011-03-01T17:00:15.870
2011-03-01T17:00:15.870
null
null
2958
null
7757
1
7759
null
67
140962
I am trying to predict the outcome of a complex system using neural networks (ANN's). The outcome (dependent) values range between 0 and 10,000. The different input variables have different ranges. All the variables have roughly normal distributions. I consider different options to scale the data before training. One ...
Data normalization and standardization in neural networks
CC BY-SA 2.5
null
2011-03-01T18:53:04.537
2020-11-10T12:35:37.593
2019-11-05T12:36:28.050
219619
1496
[ "machine-learning", "neural-networks", "normalization", "standardization" ]
7758
1
7767
null
4
1348
I play a lot with [PyBrain](http://pybrain.org) -- Artificial Neural Network implementation in Python. I have noticed that in all the models that I receive the weights of the connections are roughly normally distributed around zero with a pretty low standard deviation (~0.3), which means that they are effectively limit...
On connection weights in an Artificial Neural Network
CC BY-SA 2.5
null
2011-03-01T19:27:34.413
2012-02-09T04:00:27.067
null
null
1496
[ "neural-networks" ]
7759
2
null
7757
50
null
A standard approach is to scale the inputs to have mean 0 and a variance of 1. Also linear decorrelation/whitening/pca helps a lot. If you are interested in the tricks of the trade, I can recommend [LeCun's efficient backprop paper.](http://yann.lecun.com/exdb/publis/pdf/lecun-98b.pdf)
null
CC BY-SA 2.5
null
2011-03-01T20:27:31.693
2011-03-01T20:27:31.693
null
null
2860
null
7763
1
7764
null
4
163
I'm examining correlations in a data set with a large number of variables but small sample sizes. To get a feel for how these quantities behave, I generated some random data and looked at the distribution of correlations: ``` n = 4 y = matrix(rnorm(1000 * n), 1000, n) x = matrix(rnorm(1000 * n), 1000, n) p = as.numeric...
Curious Sample Correlation Property
CC BY-SA 2.5
null
2011-03-01T21:10:20.670
2011-03-01T21:37:34.823
null
null
2111
[ "distributions", "correlation" ]
7764
2
null
7763
12
null
For independent Normal variates, the distribution of the correlation coefficient $r$ is proportional to $(1 - r^2)^{{1\over2} (n-4)}dr$. When $n=4$, that's uniform. ### Reference R. A. Fisher, [Frequency-distribution of the values of the correlation coefficient in samples from an indefinitely large population](http...
null
CC BY-SA 2.5
null
2011-03-01T21:37:34.823
2011-03-01T21:37:34.823
2020-06-11T14:32:37.003
-1
919
null
7766
1
7773
null
11
2988
How should I syntax the `rma` function from [metafor](http://cran.r-project.org/web/packages/metafor/index.html) package in order to get results in the following real-life example of a small meta-analysis? (random-effect, summary statistic SMD) ``` study, mean1, sd1, n1, mean2, sd2, n2 Foo2000, 0.78, ...
Meta-analysis in R using metafor package
CC BY-SA 3.0
null
2011-03-01T22:38:49.620
2018-02-02T16:11:34.790
2018-02-02T16:11:34.790
101426
3333
[ "r", "meta-analysis" ]
7767
2
null
7758
6
null
I just took a look at some of my neural networks; the weights in those look normally distributed. One possible argument is that each weight is the sum of IID delta values during backpropagation, so they will be Gaussian (due to the central limit theorem). This argument involves making some simplifications; for example...
null
CC BY-SA 2.5
null
2011-03-01T23:01:28.537
2011-03-02T01:00:12.740
2011-03-02T01:00:12.740
2965
2965
null
7768
1
7804
null
12
1178
I've never really found any good text or examples on how to handle 'non-existent' data for inputs to any sort of classifier. I've read a lot on missing data but what can be done about data that cannot or doesn't exist in relation to multivariate inputs. I understand this is a very complex question and will vary dependi...
How to handle non existent (not missing) data?
CC BY-SA 2.5
null
2011-03-01T23:04:01.467
2012-03-08T21:46:38.083
2011-03-02T11:37:02.397
930
null
[ "missing-data" ]
7769
2
null
7718
2
null
Following up on SheldonCooper's second and third bullet points: The ideal choice is to have somebody else make the choice, either in the form of a threshold (point 3) or a cost benefit tradeoff (point 2). And perhaps the nicest way to offer them the choice is with an [ROC curve](http://en.wikipedia.org/wiki/Receiver_o...
null
CC BY-SA 2.5
null
2011-03-01T23:35:48.853
2011-03-01T23:35:48.853
null
null
1739
null
7770
2
null
7721
4
null
I've had good experiences with Madigan's and Lewis's [BMR and BBR](http://www.bayesianregression.org) packages for multiple category dependent variables, lasso or ridge priors on parameters, and high dimensional input data. Not quite as high as yours, but it might still be worth a look. Instructions are here: [http:/...
null
CC BY-SA 2.5
null
2011-03-01T23:49:23.417
2011-03-02T20:44:34.913
2011-03-02T20:44:34.913
1739
1739
null
7771
1
7849
null
7
6483
is there a way of calculating an effect size for the Kolmogorov-Smirnov Z statistic (in SPSS or by hand)? Or should I stick to the Mann-Whitney test, even though my group sizes are less than n=25?
How do I calculate the effect size for the Kolmogorov-Smirnov Z statistic?
CC BY-SA 2.5
null
2011-03-02T00:54:11.730
2017-11-19T13:13:10.180
2011-04-28T20:23:56.830
919
2025
[ "effect-size", "kolmogorov-smirnov-test" ]
7772
1
7819
null
6
521
I'm trying to fit a multivariate multiple regression model where the independent variable X is latent but I don't know where to start (I have prior information about the coefficient matrix so I can use some iterative method). The dependent variable Y is a NxM matrix denoting N observations each from M variables. The la...
Is it possible to fit a multivariate regression model where the independent variable is latent?
CC BY-SA 2.5
null
2011-03-02T03:05:21.403
2011-03-02T20:42:51.933
2011-03-02T20:20:02.473
3499
3499
[ "regression", "multivariate-analysis", "latent-variable" ]
7773
2
null
7766
11
null
Create a proper `data.frame`: ``` df <- structure(list(study = structure(c(1L, 5L, 3L, 4L, 2L), .Label = c("Foo2000", "Pete2008", "Pric2005", "Rota2008", "Sun2003"), class = "factor"), mean1 = c(0.78, 0.74, 0.75, 0.62, 0.68), sd1 = c(0.05, 0.08, 0.12, 0.05, 0.03), n1 = c(20L, 30L, 20L, 24L, 10L), mean2 = c(0...
null
CC BY-SA 2.5
null
2011-03-02T03:34:49.143
2011-03-02T04:38:14.870
2011-03-02T04:38:14.870
307
307
null
7774
1
7917
null
22
4284
In the classic [Coupon Collector's problem](http://en.wikipedia.org/wiki/Coupon_collector%27s_problem), it is well known that the time $T$ necessary to complete a set of $n$ randomly-picked coupons satisfies $E[T] \sim n \ln n $,$Var(T) \sim n^2$, and $\Pr(T > n \ln n + cn) < e^{-c}$. This upper bound is better than t...
What is a tight lower bound on the coupon collector time?
CC BY-SA 2.5
null
2011-03-02T03:58:17.613
2021-12-31T16:14:38.127
2016-02-27T20:19:54.317
919
3500
[ "probability", "probability-inequalities", "coupon-collector-problem" ]
7775
1
9708
null
10
9891
Does anyone have suggestions or packages that will calculate the coefficient of partial determination? The coefficient of partial determination can be defined as the percent of variation that cannot be explained in a reduced model, but can be explained by the predictors specified in a full(er) model. This coefficient i...
R implementation of coefficient of partial determination
CC BY-SA 2.5
null
2011-03-02T04:13:28.443
2021-08-09T20:43:58.457
null
null
696
[ "r", "regression", "anova" ]
7776
2
null
5292
9
null
At least on linux, [RKWard](http://rkward.sourceforge.net/) offers the best functionality. The new [RStudio](https://www.rstudio.com/) appears quite promising as well.
null
CC BY-SA 3.0
null
2011-03-02T05:24:33.013
2016-08-13T09:35:40.303
2016-08-13T09:35:40.303
2461
null
null
7777
2
null
7720
24
null
I would suggest you look at books on categorical data analysis (cf. Alan Agresti's Categorical Data Analysis, 2002) for better explanation and understanding of ordered logistic regression. All the questions that you ask are basically answered by a few chapters in such books. If you are only interested in `R` related ex...
null
CC BY-SA 3.0
null
2011-03-02T05:54:08.080
2015-03-04T12:06:56.747
2015-03-04T12:06:56.747
8413
1307
null
7780
1
7781
null
12
5295
I have a question about group sequential methods. According to Wikipedia: > In a randomized trial with two treatment groups, classical group sequential testing is used in the following manner: If n subjects in each group are available, an interim analysis is conducted on the 2n subjects. The statistical analysis is pe...
Overall type I error when repeatedly testing accumulating data
CC BY-SA 2.5
null
2011-03-02T07:31:29.113
2013-02-16T10:44:22.070
null
null
3019
[ "multiple-comparisons", "clinical-trials", "type-i-and-ii-errors" ]
7781
2
null
7780
12
null
The following slides, through 14, explain the idea. The point, as you note, is that the sequence of statistics is correlated. The context is a z-test with known standard deviation. The first test statistic $z_1$, suitably standardized, has a Normal(0,1) distribution with cdf $\Phi$. So does the second statistic $z_2...
null
CC BY-SA 2.5
null
2011-03-02T08:23:13.177
2011-03-02T08:36:21.063
2011-03-02T08:36:21.063
919
919
null
7782
1
null
null
8
1116
### Context I have got some problems with my doctoral dissertation. My thesis is Investigating Secondary Primary School Teachers' Organizational citizenship behaviours through their perceptions about organizational culture and their organizational trust levels. I have a sample of 871 teachers. I have three instrum...
What to do following poor fit statistics for a confirmatory factor analysis?
CC BY-SA 2.5
null
2011-03-02T10:01:07.933
2011-03-02T14:30:59.527
2011-03-02T11:08:14.763
930
null
[ "factor-analysis", "structural-equation-modeling" ]
7783
2
null
7782
1
null
Instead of looking for statistical solutions that directly solve this problem, I would look for solutions that improve the diagnosis. First, I'd compare the different samples used in the different studies. Then, if you have the data, I'd look at the correlation patterns among the variables in the different samples. ...
null
CC BY-SA 2.5
null
2011-03-02T10:59:44.943
2011-03-02T10:59:44.943
null
null
686
null
7784
1
null
null
9
2763
I am training an artificial neural network (backpropagation, feed-forward) with non-normal distributed data. Beside the root mean squared error, literature does often suggest the Pearson correlation coefficient for evaluating the quality of the trained net. But, is the Pearson correlation coefficient reasonable, if the...
Measuring correlation of trained neural networks
CC BY-SA 2.5
null
2011-03-02T11:04:04.407
2011-11-18T16:52:12.623
2011-11-18T16:52:12.623
919
3465
[ "correlation", "neural-networks", "spearman-rho" ]
7785
1
7789
null
14
698
I am looking for good references on using directional data (measure of direction in degrees) as an independent variable in regression; ideally, it would also be useful for hierarchical nonlinear models (the data are nested). I am also interested in directional data more generally. I have found a text by Mardia, which ...
Logistic regression with directional data as IV
CC BY-SA 2.5
null
2011-03-02T11:06:55.250
2011-03-05T11:29:56.993
2011-03-05T11:29:56.993
686
686
[ "circular-statistics" ]
7786
1
null
null
8
1033
I am looking for some suggestions about assessing the representativeness of a particular dataset I am analyzing. In this dataset I am looking at the relationship between two variables (e.g., X and Y) in a population that is split into five distinct blocks. The main problem is that the data is based upon reports from t...
Assessing the representativeness of population sampling
CC BY-SA 2.5
null
2011-03-02T11:19:11.983
2023-04-17T20:07:45.987
2011-03-02T11:41:04.033
930
3136
[ "sampling", "survey", "dataset", "resampling" ]
7787
2
null
7768
8
null
For a logistic regression fitted by maximum likelihood, as long as you have both (1) and (2) in the model, then no matter what "default" value that you give new runners for (2), the estimate for (1) will adjust accordingly. For example, let $X_1$ be the indicator variable for "is a new runner", and $X_2$ be the variabl...
null
CC BY-SA 2.5
null
2011-03-02T11:48:13.157
2011-03-02T11:48:13.157
null
null
495
null
7788
1
7793
null
4
180
Some edits made... I have a dataset which other researchers have used mixed effects modelling with to come up with a nice set of associations. I also have a much smaller dataset which is the same variables but from a different country. The first dataset is plenty powerful enough (350 individuals from 30 locations) but ...
How to replicate large well powered mixed effects model with a smaller sample?
CC BY-SA 2.5
null
2011-03-02T11:54:29.660
2011-03-03T09:46:22.250
2011-03-03T09:46:22.250
199
199
[ "bayesian", "mixed-model", "statistical-power" ]
7789
2
null
7785
8
null
I would suggest applying a transform which deals with periodicity. i.e. $\lim_{x \to 360} f(x) = f(0)$. An easy option is to take the sin and cos, and put them both as covariates in the model.
null
CC BY-SA 2.5
null
2011-03-02T11:55:26.133
2011-03-02T11:55:26.133
null
null
495
null
7790
1
7807
null
3
2002
I have two exclusive groups of people and a counter of how many events happened for each group. Lets say group 1 has 7000 people and group 2 has 3000 people. group 1 had 50 events and group 2 had 40 events. I'm calculating the event percentage for each group for example for group1 its 50/7000. for group 2 its 40/3000....
How to determine statistical validity of results
CC BY-SA 2.5
null
2011-03-02T12:03:36.580
2011-03-02T17:14:47.650
2011-03-02T13:32:53.977
3506
3506
[ "statistical-significance", "chi-squared-test" ]
7791
1
7808
null
9
345
Some edits made... This question is just for fun, so if it isn't fun then please feel free to ignore it. I already get a lot of help from this site so I don't want to bite the hand that feeds me. It's based on a real life example and it's just something I've wondered about a lot. I visit my local dojo to train on an es...
Can I estimate the frequency of an event based on random samplings of its occurrence?
CC BY-SA 2.5
0
2011-03-02T12:04:56.220
2011-03-02T17:09:01.147
2011-03-02T17:09:01.147
919
199
[ "probability", "estimation", "sampling" ]
7792
2
null
168
3
null
For univariate kernel density estimation, the bandwidth can be estimated by Normal reference rule or Cross Validation method or plug-in approach. For multivariate kernel density estimation, a Bayesian bandwidth selection method may be utilized, see [Zhang, X., M.L. King and R.J. Hyndman (2006), A Bayesian approach to ...
null
CC BY-SA 3.0
null
2011-03-02T12:11:19.977
2016-04-12T20:24:11.920
2016-04-12T20:24:11.920
10416
null
null
7793
2
null
7788
2
null
Sounds like what you want is a hierarchical model: you would have a country-level effect, and nested within that would be a location-level effect. I've only ever skimmed through it, but the Gelman and Hill book seems to be quite highly regarded in this area: [http://www.stat.columbia.edu/~gelman/arm/](http://www.stat.c...
null
CC BY-SA 2.5
null
2011-03-02T12:20:21.893
2011-03-02T12:20:21.893
null
null
495
null
7795
1
null
null
13
12603
I would like to find out the values `(x, y)` used in plotting `plot(b, seWithMean=TRUE)` in mgcv package. Does anyone know how I can extract or compute these values? Here is an example: ``` library(mgcv) set.seed(0) dat <- gamSim(1, n=400, dist="normal", scale=2) b <- gam(y~s(x0), data=dat) plot(b, seWithMean=TR...
How to obtain the values used in plot.gam in mgcv?
CC BY-SA 3.0
null
2011-03-02T13:16:19.200
2015-04-27T09:54:09.650
2014-04-29T14:26:27.517
7290
null
[ "r", "time-series", "smoothing", "mgcv" ]