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
5140
2
null
5115
27
null
[Leo Breiman](http://en.wikipedia.org/wiki/Leo_Breiman) for CART, bagging, and random forests.
null
CC BY-SA 3.0
null
2010-12-04T15:52:26.967
2011-09-22T23:12:26.383
2011-09-22T23:12:26.383
74
null
null
5144
1
5146
null
2
206
I have an experiment with any possible (reasonable) number of parameters (independent variables). I run the experiment several times for each possible combination of my variables. The data I get will be generally numeric. However I know nothing (and any assumptions are difficult) about the distribution of my data. Wha...
Appropriate test for multivariate experiment result with unknown distributions
CC BY-SA 2.5
null
2010-12-04T18:47:22.257
2010-12-06T03:00:55.350
2010-12-06T03:00:55.350
2261
2261
[ "experiment-design" ]
5145
2
null
5115
48
null
[William Sealy Gosset](http://en.wikipedia.org/wiki/William_Sealy_Gosset) for Student's t-distribution and the statistically-driven improvement of beer.
null
CC BY-SA 2.5
null
2010-12-04T20:42:26.150
2010-12-04T20:42:26.150
null
null
2077
null
5146
2
null
5144
6
null
Well, following your update, it seems you are dealing with a factorial experiment (factorial means that every factors are crossed, or, in other words, each unit is subjected to every possible combination of your factors), with five replicates. Let assume that these are not the same statistical units whose temperature i...
null
CC BY-SA 2.5
null
2010-12-04T21:13:59.517
2010-12-04T21:23:14.870
2010-12-04T21:23:14.870
930
930
null
5147
1
5148
null
2
1032
When trying to find the mode of a nonnegative function $f$ (i.e. maximize the function), one way to do it is to sampling the function viewed as an unnormalized density of some distribution via MCMC. Suppose we have had a sufficiently long sequence of samples via this method, I was wondering how to determine the mode fr...
Finding the mode of a function by MCMC sampling
CC BY-SA 2.5
null
2010-12-04T23:02:34.320
2010-12-05T00:01:21.373
2010-12-05T00:01:21.373
null
1005
[ "markov-chain-montecarlo", "optimization", "monte-carlo" ]
5148
2
null
5147
4
null
The mode is indeed the maximum of f(x), so the value of x encountered during the simulation that gives the highest value of f(x) ought to be the best approximation of the mode. AFAICS there is no good reason that the last sample should be the mode, unless you are performing simulated annealing and the temperature has ...
null
CC BY-SA 2.5
null
2010-12-04T23:24:09.753
2010-12-04T23:24:09.753
null
null
887
null
5149
1
5153
null
7
4141
I have some time series data and want to test for the existence of and estimate the parameters of a linear trend in a dependent variable w.r.t. time, i.e. time is my independent variable. The time points cannot be considered IID under the null of no trend. Specifically, the error terms for points sampled near each ot...
Determining trend significance in a time series
CC BY-SA 2.5
null
2010-12-05T02:33:01.707
2010-12-06T03:21:10.097
2010-12-05T12:49:08.100
null
1347
[ "time-series", "regression", "correlation" ]
5150
1
null
null
6
2255
I have a biometric authentication system that is using a person's gait to authenticate them. I extract features from gait, run it through a comparison versus a template and produce a similarity score (where if this similarity score is below a certain threshold, then the user is authenticated). So, I have 72 trials tota...
Choosing the right threshold for a biometric trait authentication system
CC BY-SA 2.5
null
2010-12-05T03:24:56.760
2010-12-05T13:32:24.757
null
null
1224
[ "matlab", "mathematical-statistics", "roc" ]
5151
2
null
125
3
null
This book suggests it is aimed at entry level undergraduate level Biostatistics: A Bayesian Introduction. By George G Woodsworth. Published by John Wiley & Sons
null
CC BY-SA 2.5
null
2010-12-05T03:47:19.163
2010-12-05T03:47:19.163
null
null
2030
null
5152
1
null
null
1
535
I am conducting a study on a cohort of people with a follow-up period of 7 years. I wish to use Cox Proportional Hazard model to estimate HR between an exposure and the length of time of an event. One missing information is the date of birth for the all subjects, but month and year are available.This prevents the calcu...
Missing values in survival analysis
CC BY-SA 2.5
null
2010-12-05T04:46:48.430
2010-12-07T02:59:36.707
null
null
null
[ "survival", "missing-data" ]
5153
2
null
5149
3
null
What you are describing is commonly referred to as [auto correlated errors](http://en.wikipedia.org/wiki/Autocorrelation). I would suggest you look up resources on ARIMA modelling. ARIMA modelling will allow you to model the correlation in your error term, and hence allow you to assess your trend variable independent o...
null
CC BY-SA 2.5
null
2010-12-05T05:13:40.530
2010-12-05T05:13:40.530
null
null
1036
null
5155
2
null
5115
57
null
[John Tukey](http://en.wikipedia.org/wiki/John_Tukey) for Fast Fourier Transforms, exploratory data analysis (EDA), box plots, projection pursuit, jackknife (along with Quenouille). Coined the words "software" and "bit".
null
CC BY-SA 3.0
null
2010-12-05T05:18:37.237
2012-08-02T03:11:29.257
2012-08-02T03:11:29.257
74
74
null
5156
2
null
5092
2
null
I think that power analysis is too elaborate for what you're trying to do, and might let your down. With a sample size north of 9 million, I think your estimate for `p = Pr(X > 3) = 0.000015` is pretty accurate. So you can use that in a simple binomial(n, p) model to estimate a sample size. Let's say your goal is ...
null
CC BY-SA 2.5
null
2010-12-05T05:29:13.617
2010-12-05T05:29:13.617
null
null
5792
null
5157
2
null
5149
1
null
Along the lines of a previous answer, if all assumptions for OLS are met except for the fact that errors are correlated, maybe something as simple as a [Cochrane-Orcutt](http://en.wikipedia.org/wiki/Cochrane%E2%80%93Orcutt_estimation) correction would be enough to solve your problem.
null
CC BY-SA 2.5
null
2010-12-05T08:02:27.610
2010-12-05T08:02:27.610
null
null
892
null
5158
1
5164
null
40
33748
I understand that when sampling from a finite population and our sample size is more than 5% of the population, we need to make a correction on the sample's mean and standard error using this formula: $\hspace{10mm} FPC=\sqrt{\frac{N-n}{N-1}}$ Where $N$ is the population size and $n$ is the sample size. I have 3 questi...
Explanation of finite population correction factor?
CC BY-SA 4.0
null
2010-12-05T09:40:51.387
2022-10-06T12:46:35.533
2021-05-13T14:42:54.947
11887
1636
[ "sampling", "finite-population" ]
5159
1
5169
null
3
2006
The height for 1000 students is approximately normal with a mean 174.5cm and a standard deviation of 6.9cm. If 200 random samples of size 25 are chosen from this population and the values of the mean are recorded to the nearest integer, determine the probability that the mean height for the students is more than 176cm....
Correction due to rounding error
CC BY-SA 2.5
null
2010-12-05T11:13:52.800
2010-12-07T19:18:04.460
2010-12-07T19:18:04.460
1636
1636
[ "self-study" ]
5160
1
null
null
17
5586
I am looking for a good tutorial on clustering data in `R` using hierarchical dirichlet process (HDP) (one of the recent and popular nonparametric Bayesian methods). There is `DPpackage` (IMHO, the most comprehensive of all the available ones) in `R` for nonparametric Bayesian analysis. But I am unable to understand t...
Nonparametric Bayesian analysis in R
CC BY-SA 2.5
null
2010-12-05T11:14:12.273
2012-01-18T15:58:29.560
2010-12-06T08:52:21.543
null
1307
[ "r", "bayesian", "clustering", "nonparametric" ]
5161
2
null
5159
3
null
I understand the question as one where we know the theoretical distribution of students height with some precision (i.e., with one decimal place). In the present case, this is a gaussian distribution with parameters $\mathcal{N}(174.5;6.9^2)$. Now, we have empirical measurements of students height on small samples ($n...
null
CC BY-SA 2.5
null
2010-12-05T11:26:49.977
2010-12-05T11:51:26.913
2010-12-05T11:51:26.913
930
930
null
5162
2
null
5150
4
null
Generally, the cut-off value is chosen such as to maximize the compromise between sensitivity (Se) and specificity (Sp). You can generate a regular sequence of thresholds and plot the resulting ROC curve, as shown below, based on the [DiagnosisMed](http://cran.r-project.org/web/packages/DiagnosisMed/index.html) R packa...
null
CC BY-SA 2.5
null
2010-12-05T11:46:24.613
2010-12-05T13:32:24.757
2010-12-05T13:32:24.757
930
930
null
5163
2
null
5136
4
null
The relevant section of the classical typology distinguishes between (observed) variables, latent variables, and parameters. Regular variables are observed and have a distribution. Latent variables are not observed and have a distribution. Parameters are not observed and do not have a distribution. Parameters vs lat...
null
CC BY-SA 2.5
null
2010-12-05T12:21:37.620
2010-12-05T12:21:37.620
null
null
1739
null
5164
2
null
5158
33
null
The threshold is chosen such that it ensures convergence of the [hypergeometric distribution](http://en.wikipedia.org/wiki/Hypergeometric_distribution) ($\sqrt{\frac{N-n}{N-1}}$ is its SD), instead of a binomial distribution (for sampling with replacement), to a normal distribution (this is the Central Limit Theorem, s...
null
CC BY-SA 2.5
null
2010-12-05T12:32:46.047
2010-12-05T13:19:33.057
2010-12-05T13:19:33.057
930
930
null
5165
2
null
5149
4
null
Generalised least squares (GLS) is one potential option here. The OLS estimates of the parameters are given by: $$\hat{\beta} = (X^{T}\Sigma^{-1}X)^{-1}X^{T}\Sigma^{-1}y$$ Normally we leave out $\Sigma$ as in OLS it is defined as $\sigma^2 \mathbf{I}$, i.e. an identity matrix multiplied by the estimated residual stand...
null
CC BY-SA 2.5
null
2010-12-05T13:22:35.273
2010-12-05T13:22:35.273
null
null
1390
null
5167
1
null
null
1
1368
I am sampling covariance matrix from a Inverse Wishart distribution. In one dimensional case, after doing sufficient iterations I am taking the mode value for variance (after removing the burn-in values). How to do the same in a multivariate case?
Sampling covariance matrix using Gibbs sampling
CC BY-SA 2.5
null
2010-12-05T20:54:03.357
2010-12-07T10:38:37.483
2010-12-07T10:38:37.483
null
2157
[ "markov-chain-montecarlo", "gibbs" ]
5168
2
null
5160
13
null
Here are some online ressources I found interesting without going into detail (and I'm not a specialist of this topic): - Hierarchical Dirichlet Processes, by Teh et al. (2005) - Dirichlet Processes A gentle tutorial, by El-Arini (2008) - Bayesian Nonparametrics, by Rosasco (2010) - Non-parametric Bayesian Methods,...
null
CC BY-SA 3.0
null
2010-12-05T20:54:42.357
2012-01-18T15:58:29.560
2012-01-18T15:58:29.560
2728
930
null
5169
2
null
5159
5
null
I interpret this question as supposing that an experiment is conducted 200 times. In this experiment, 25 people are independently drawn from the population (with replacement) and their average height is rounded to the nearest centimeter. This process yields 200 whole numbers. You seem to be asking, what is the chanc...
null
CC BY-SA 2.5
null
2010-12-05T21:40:11.867
2010-12-05T21:40:11.867
null
null
919
null
5170
1
5176
null
3
4385
I am new to forecasting in R and am trying to automatically fit an ARIMA model to what I believe is a univariate dataset. ``` > str(p1.z) 'zoo' series from 2009-04-05 to 2010-10-31 Data: int [1:83] 360 570 540 585 570 690 495 660 510 690 ... Index: Class 'Date' num [1:83] 14339 14346 14353 14360 14367 ... > head...
Starting out with forecast package in R
CC BY-SA 2.5
null
2010-12-05T23:12:33.357
2010-12-06T10:26:02.110
2010-12-06T10:26:02.110
159
569
[ "r", "time-series", "forecasting" ]
5171
1
5258
null
8
2402
I hope this isn't either far too basic or redundant. I have been looking around for guidance but so far I am still uncertain of how to proceed. My data consists of counts of a particular structure used in conversations between pairs of interlocutors. The hypothesis I want to test is the following: more frequent use of ...
Testing paired frequencies for independence
CC BY-SA 2.5
null
2010-12-05T23:43:10.043
2022-12-11T17:43:57.517
2011-05-10T20:38:31.137
930
52
[ "categorical-data", "independence" ]
5172
1
null
null
4
8945
I have several sets of data, unfortunately the data comes to me in a "summary" form. My job is to consolidate the several data sources into one general summary. I'm currently using the median to summarise the data, but I don't know if this is statistically sound. Here's a description of my problem: There are $N_P$ samp...
Is taking the median of a set of percentages statistically sound?
CC BY-SA 2.5
null
2010-12-06T00:17:18.907
2017-07-24T11:43:52.403
2017-07-24T11:43:52.403
11887
2271
[ "sampling", "median", "population", "percentage" ]
5173
1
5175
null
10
1913
"Spurious regression" (in the context of time series) and associated terms like unit root tests are something I've heard a lot about, but never understood. Why/when, intuitively, does it occur? (I believe it's when your two time series are cointegrated, i.e., some linear combination of the two is stationary, but I don'...
Resources for learning about spurious time series regression
CC BY-SA 2.5
null
2010-12-06T00:33:15.987
2015-07-07T14:41:53.283
2010-12-06T09:08:35.157
159
1106
[ "time-series", "regression", "cointegration" ]
5174
2
null
5173
12
null
Let's start with the spurious regression. Take or imagine two series which are both driven by a dominant time trend: for example US population and US consumption of whatever (it doesn't matter what item you think about, be it soda or licorice or gas). Both series will be growing because of the common time trend. Now ...
null
CC BY-SA 2.5
null
2010-12-06T00:53:50.953
2010-12-06T13:26:36.717
2010-12-06T13:26:36.717
334
334
null
5175
2
null
5173
11
null
These concepts have been created to deal with regressions (for instance correlation) between non stationary series. Clive Granger is the key author you should read. Cointegration has been introduced in 2 steps: 1/ Granger, C., and P. Newbold (1974): "Spurious Regression in Econometrics," In this article, the authors po...
null
CC BY-SA 2.5
null
2010-12-06T01:56:44.033
2010-12-06T15:36:20.017
2010-12-06T15:36:20.017
919
1709
null
5176
2
null
5170
8
null
`ets()` and `auto.arima()` are not really set up to handle `zoo` objects. Although `ets()` is not returning an error, it will be ignoring any seasonality. `auto.arima()` is failing because it is confused by the `zoo` object with apparent seasonality. I will try to include better checking in a future version. When using...
null
CC BY-SA 2.5
null
2010-12-06T03:12:22.033
2010-12-06T03:12:22.033
null
null
159
null
5177
2
null
5149
6
null
To add to the existing answers, if you are using R a simple way to proceed is to allow the ARMA errors to be modelled automatically using `auto.arima()`. If `x` is your time series, then you can proceed as follows. ``` t <- 1:length(x) auto.arima(x,xreg=t,d=0) ``` This will fit the model $x_t = a + bt + e_t$ where $e_...
null
CC BY-SA 2.5
null
2010-12-06T03:21:10.097
2010-12-06T03:21:10.097
null
null
159
null
5178
2
null
5172
2
null
What you are doing does not makes sense if your goal is to categorize what proportion of the entire population (sample A + sample B + sample C) is in category a, b, and c. Consider the following contingency table: ``` a b c a b c A 8; 1; 1 A .8; .1; .1 B 7; 2; 1 B .7; .2; ...
null
CC BY-SA 2.5
null
2010-12-06T04:15:24.173
2010-12-06T04:15:24.173
null
null
2144
null
5179
2
null
5171
0
null
I would maybe start with a [rank correlation](http://en.wikipedia.org/wiki/Rank_correlation) analysis. The issue is that you may have very low correlations as the effects you are trying to capture are small. Both Kendall and Spearman correlation coefficients are implemented in R in ``` cor(x=A, y=B, method = "spearman"...
null
CC BY-SA 2.5
null
2010-12-06T05:01:20.237
2010-12-06T05:01:20.237
null
null
1709
null
5180
2
null
5167
0
null
If I understand your question correctly: Covariance matrix for 1-dim case reduces to the variance. Wishart Distribution (or Inv wishart distribution depending on your formulation) is a prior of covariance matrices, which for dimensions $\geq$ 2 correspond to multivariate case. However, I may have misunderstood you. Ple...
null
CC BY-SA 2.5
null
2010-12-06T06:10:49.867
2010-12-06T06:10:49.867
null
null
1307
null
5181
1
5263
null
3
1637
Say I'm doing stats on the height of adults from various countries. I assume the heights of adults from one country are normally distributed, and ignore sex differences (I also ignore the fact that neighbouring countries tend to have similar populations). I have a bunch of data by country, but for some countries I have...
Estimating distribution parameters from few data points
CC BY-SA 2.5
null
2010-12-06T10:30:50.827
2010-12-16T03:26:47.083
2017-04-13T12:44:37.583
-1
1737
[ "bayesian", "estimation", "normal-distribution", "uncertainty" ]
5182
2
null
5171
2
null
You seem to have ordered categorical data, therefore I suggest a linear-by-linear test as described by Agresti (2007, p229 ff). Function `lbl_test()` of package `coin` implements it in R. Agresti, A. (2007). Introduction to Categorical Data Analysis. 2nd Ed. Hoboken, New Jersey: John Wiley & Sons. Hoboken, NJ: Wiley.
null
CC BY-SA 2.5
null
2010-12-06T11:00:31.630
2010-12-06T11:00:31.630
null
null
1909
null
5183
2
null
5107
2
null
If you have very little data, it is not that the distance estimate is wrong, but that your estimate is uncertain. A Bayesian approach would seek to determine the posterior distribution of the distance between the arbitrary point and the multi-variate distribution, rather than a single point estimate, and then marginal...
null
CC BY-SA 2.5
null
2010-12-06T11:43:57.957
2010-12-06T11:43:57.957
null
null
887
null
5184
1
null
null
15
5073
In a recent paper, I fitted a three-way fixed effects model. Since one of the factors wasn't significant (p > 0.1), I removed it and refitted the model with two fixed effects and an interaction. I've just had referees comments back, to quote: > That time was not a significant factor in the 3-way ANOVA is not of itself...
Removing factors from a 3-way ANOVA table
CC BY-SA 4.0
null
2010-12-06T14:04:10.083
2022-12-24T07:23:20.347
2021-09-15T22:00:52.557
919
8
[ "anova", "fixed-effects-model" ]
5185
2
null
5184
17
null
I'm guessing the Underwood in question is [Experiments in Ecology (Cambridge Press 1991)](https://www.cambridge.org/core/books/experiments-in-ecology/DCF3663D5E7C9923D19B5ECE88167780). Its a more-or-less standard reference in the ecological sciences, perhaps third behind [Zar](https://www.pearson.com/en-gb/subject-cata...
null
CC BY-SA 4.0
null
2010-12-06T14:53:21.063
2022-12-24T07:23:20.347
2022-12-24T07:23:20.347
362671
1475
null
5186
2
null
5184
11
null
I loathe these sort of cut-off-based rules. I think it depends on design and what your a priori hypotheses and expectations were. If you expecting the outcome to vary with time then I'd say you should keep time in, as you would for any other 'blocking' factor. On the other hand, if you were replicating the same experim...
null
CC BY-SA 2.5
null
2010-12-06T14:57:16.090
2010-12-06T14:57:16.090
null
null
449
null
5187
1
5188
null
5
3746
I am new to Gibbs Sampling, and have been using WinBUGS, but I find that it is not well-suited towards storing/presenting results, so I have been calling it from R using the R2WinBUGS package. The data is apparently stored as a "bug" class. I converted it to coda to run diagnostics, and it displays each of the chain...
Using R2WinBUGS, how to extract information from each chain?
CC BY-SA 2.5
null
2010-12-06T17:23:20.837
2012-01-15T18:56:56.413
2010-12-07T10:56:02.763
null
null
[ "r", "markov-chain-montecarlo", "bugs" ]
5188
2
null
5187
5
null
The object returned by `read.bugs` is an object of S3 class `mcmc.list`. You can use the double brackets `[[` to access the separate chains, i.e. the different `mcmc`-objects that make up the larger `mcmc.list` object, which really is simply a list of `mcmc`-objects that inherits some information about thinning and ch...
null
CC BY-SA 2.5
null
2010-12-06T18:03:04.027
2010-12-06T18:10:12.523
2010-12-06T18:10:12.523
1979
1979
null
5189
1
5194
null
7
3518
With some great help from this forum, I have been able to get up and running with some basic time series analysis in R. Right now, my needs are mostly univariate time series. Here is my question: I can read in daily data from database into a data frame. I have two columns, date which is understood by R as POSIXct a...
Getting started with time series in R
CC BY-SA 4.0
null
2010-12-06T18:40:58.743
2018-05-29T12:42:11.920
2018-05-29T12:42:11.920
128677
569
[ "r", "time-series" ]
5190
2
null
5181
4
null
What you seem to be referring to is called ["shrinkage"](http://en.wikipedia.org/wiki/Shrinkage_%28statistics%29). This allows you to share strength across groups and is frequently used in hierarchical Bayesian models. The (very) basic idea is to impose a prior distribution over the entire population and place more wei...
null
CC BY-SA 2.5
null
2010-12-06T20:27:33.010
2010-12-06T20:27:33.010
null
null
1913
null
5191
1
5193
null
2
104
This question is related to my previous question [Bias for kernel density estimator (periodic case)](https://stats.stackexchange.com/questions/5011/bias-for-kernel-density-estimator-periodic-case) A kernel $K(x)$ is of the order $p$ if $$\int_{-\infty}^{\infty}K(x)x^{j}=\delta_{0,j}\ j=0,...p-1$$ $$\int_{-\infty}^{\i...
Order of the kernel for periodic case
CC BY-SA 3.0
null
2010-12-06T21:08:37.437
2015-04-23T05:54:16.560
2017-04-13T12:44:41.607
-1
2189
[ "kernel-smoothing" ]
5192
2
null
5115
32
null
[George Box](http://en.wikipedia.org/wiki/George_E._P._Box) for his work on time series, designed experiments and elucidating the iterative nature of scientific discovery (proposing and testing models).
null
CC BY-SA 3.0
null
2010-12-06T21:24:56.347
2011-12-14T06:46:31.820
2011-12-14T06:46:31.820
183
null
null
5193
2
null
5191
2
null
I think the correct analog of this definition in the periodic case is that coefficients $1$ through $p-1$ of the Fourier Series for $K$ all vanish. The purpose of the definition of order is to obtain estimates of the bias of the kernel estimator. When $K$ "kills" powers $1$ through $p-1$ of $x$, then the bias will be ...
null
CC BY-SA 2.5
null
2010-12-07T00:03:46.107
2010-12-07T00:03:46.107
null
null
919
null
5194
2
null
5189
3
null
It seems like you need the package xts. Create your time serie using ``` install.packages('xts') library(xts) X = xts(coredata(DF[,2]), order.by=DF[,1]) ``` Then you will be able to manipulate your data easily. ``` to.weekly(X) to.monthly(X) ``` Please note that you will then manipulate xts objects and not ts. But...
null
CC BY-SA 2.5
null
2010-12-07T01:14:28.133
2010-12-07T02:22:22.400
2010-12-07T02:22:22.400
1709
1709
null
5195
1
5209
null
13
20036
As title, I need to draw something like this: ![alt text](https://i.stack.imgur.com/KYQ5V.jpg) Can ggplot, or other packages if ggplot is not capable, be used to draw something like this?
How to draw funnel plot using ggplot2 in R?
CC BY-SA 2.5
null
2010-12-07T01:29:37.223
2016-02-12T23:37:36.123
2010-12-07T10:53:58.223
null
588
[ "r", "data-visualization", "ggplot2", "funnel-plot" ]
5196
1
5201
null
19
17299
In order to calibrate a confidence level to a probability in supervised learning (say to map the confidence from an SVM or a decision tree using oversampled data) one method is to use Platt's Scaling (e.g., [Obtaining Calibrated Probabilities from Boosting](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.60.51...
Why use Platt's scaling?
CC BY-SA 3.0
null
2010-12-07T01:31:14.380
2013-09-27T21:59:39.513
2013-09-27T21:59:39.513
7290
2040
[ "logistic", "cross-validation", "calibration" ]
5197
1
null
null
2
219
I have database of 78706 resident incidents in aged care facilities (5 years of data). I want to to learn and implement a tool allowing analyzing these data using following attributes: - Resident - Date/Time - Location - Result - Injury I want to be able to get following assumptions from my system which will be ...
What type of statistical analysis solves this problem?
CC BY-SA 2.5
null
2010-12-07T02:08:09.843
2010-12-07T03:07:27.183
null
null
null
[ "regression", "clustering" ]
5198
2
null
5152
3
null
It is hard to imagine a situation when the effect of age with a precision of a month is not sufficient - even for babies after the first few months of life nobody uses weeks. For adults, even rounding to years should be just fine.
null
CC BY-SA 2.5
null
2010-12-07T02:59:36.707
2010-12-07T02:59:36.707
null
null
279
null
5199
2
null
5197
1
null
You could consider [association analysis](http://en.wikipedia.org/wiki/Association_rule_learning). If your time is discretized appropriately and the data support your 2nd example (Falls occur in North Wing between 2am and 5am), one possible learned rule that comes out of the analysis might be {North Wing, 2AM-5AM} => ...
null
CC BY-SA 2.5
null
2010-12-07T03:07:27.183
2010-12-07T03:07:27.183
null
null
1815
null
5200
1
5203
null
3
540
In Frank Schorfheide's class notes on [likelihood functions of DSGE models](https://web.archive.org/web/20100702005639/http://www.webpages.ttu.edu/pesummer/ECO%205328/notes/4%20likelihood%20dsge.pdf), he expresses the value of the likelihood function for a given vector of parameters $\theta$, and time series $Y^T$ as: ...
Likelihood function of DSGE model using Kalman filter
CC BY-SA 4.0
null
2010-12-07T03:47:50.017
2023-02-05T17:46:42.410
2023-02-05T17:46:42.410
362671
2251
[ "kalman-filter", "likelihood" ]
5201
2
null
5196
15
null
I suggest to check out the [wikipedia page of logistic regression](http://en.wikipedia.org/wiki/Logistic_regression). It states that in case of a binary dependent variable logistic regression maps the predictors to the probability of occurrence of the dependent variable. Without any transformation, the probability used...
null
CC BY-SA 2.5
null
2010-12-07T07:43:17.147
2010-12-07T07:43:17.147
null
null
264
null
5202
2
null
5115
3
null
[Teuvo Kohonen](http://en.wikipedia.org/wiki/Teuvo_Kohonen) for invention of the [Self-Organizing-Map](http://en.wikipedia.org/wiki/Self-Organizing_Map) (SOM).
null
CC BY-SA 2.5
null
2010-12-07T07:46:56.347
2010-12-07T07:46:56.347
null
null
264
null
5203
2
null
5200
3
null
$n$ is the dimension of the observation vector, as you mention in your question. $F$ is the covariance matrix of innovations; I think you are missing an exponent of -1 in the last term of the likelihood. It should read $v_t' F_{t|t-1}^{-1} v_t$ (using the convention that $v_t$ is a column vector; your notation seems to...
null
CC BY-SA 2.5
null
2010-12-07T08:25:52.680
2010-12-07T08:25:52.680
null
null
892
null
5204
2
null
5196
2
null
Another method of avoiding over-fitting that I have found useful is to fit the univariate logistic regression model to the leave-out-out cross-validation output of the SVM, which can be approximated efficiently using the [Span bound](http://dx.doi.org/10.1023/A:1012450327387). However, if you want a classifier that pro...
null
CC BY-SA 2.5
null
2010-12-07T08:57:03.053
2010-12-07T08:57:03.053
null
null
887
null
5205
2
null
5167
2
null
You shouldn't need a Gibbs sampler: the mode of an [inverse-Wishart](http://en.wikipedia.org/wiki/Inverse-Wishart_distribution) has a closed form. Also, independent random samples from the Cholesky factor of a Wishart can be obtained from the [Bartlett decomposition](http://en.wikipedia.org/wiki/Wishart_distribution#B...
null
CC BY-SA 2.5
null
2010-12-07T09:59:50.810
2010-12-07T09:59:50.810
null
null
495
null
5206
1
5208
null
8
6576
This is the confidence interval estimated by prop.test ``` n <- 600; x <- 276; p <- 0.40 prop.test(x, n, p, alternative="two.sided", conf.level=0.95, correct=T) 95 percent confidence interval: 0.4196787 0.5008409 ``` I tried to reproduce it, reading the code under prop.test. Here is a simplified way to get those two...
Yates' continuity correction in confidence interval returned by prop.test
CC BY-SA 2.5
null
2010-12-07T10:10:47.810
2010-12-07T14:08:24.490
2010-12-07T10:37:21.260
null
339
[ "r", "confidence-interval", "yates-correction" ]
5207
1
10734
null
9
1571
I tried to simulate from a bivariate density $p(x,y)$ using Metropolis algorithms in R and had no luck. The density can be expressed as $p(y|x)p(x)$, where $p(x)$ is Singh-Maddala distribution $p(x)=\dfrac{aq x^{a-1}}{b^a (1 + (\frac{x}{b})^a)^{1+q}}$ with parameters $a$, $q$, $b$, and $p(y|x)$ is log-normal with lo...
Sampling from bivariate distribution with known density using MCMC
CC BY-SA 2.5
null
2010-12-07T10:35:08.577
2018-02-24T13:37:18.813
2010-12-07T13:03:37.737
2116
2116
[ "sampling", "monte-carlo", "metropolis-hastings" ]
5208
2
null
5206
3
null
The help page indicates that "Continuity correction is used only if it does not exceed the difference between sample and null proportions in absolute value." This is what line 5 is checking: `x/n` is the empirical proportion, `p` is the null proportion. (Actually, I find the "if" slightly misleading since it's more of ...
null
CC BY-SA 2.5
null
2010-12-07T10:55:54.983
2010-12-07T10:55:54.983
null
null
1909
null
5209
2
null
5195
12
null
Although there's room for improvement, here is a small attempt with simulated (heteroscedastic) data: ``` library(ggplot2) set.seed(101) x <- runif(100, min=1, max=10) y <- rnorm(length(x), mean=5, sd=0.1*x) df <- data.frame(x=x*70, y=y) m <- lm(y ~ x, data=df) fit95 <- predict(m, interval="conf", level=.95) fit99 <- ...
null
CC BY-SA 2.5
null
2010-12-07T11:38:07.737
2010-12-07T11:38:07.737
null
null
930
null
5210
2
null
5195
21
null
If you are looking for this (meta-analysis) type of [funnel plot](http://en.wikipedia.org/wiki/Funnel_plot), then the following might be a starting point: ``` library(ggplot2) set.seed(1) p <- runif(100) number <- sample(1:1000, 100, replace = TRUE) p.se <- sqrt((p*(1-p)) / (number)) df <- data.frame(p, number, p.se) ...
null
CC BY-SA 3.0
null
2010-12-07T13:19:27.420
2013-03-19T05:36:01.310
2013-03-19T05:36:01.310
307
307
null
5212
2
null
5206
7
null
On the second question of where you can find more info on this continuity correction (attributed to Yates in the help for `prop.test` but not in the refs below, I think [as Yates orginally proposed a continuity correction only to the chi-squared test for contingency tables](http://en.wikipedia.org/wiki/Yates%27_correct...
null
CC BY-SA 2.5
null
2010-12-07T14:08:24.490
2010-12-07T14:08:24.490
null
null
449
null
5213
1
5221
null
6
295
Suppose I observe a sample $(y_i,x_i)$, $i=1,...,n$. Suppose that I know the following: $y_i=\alpha_0+\alpha_1x_i+\varepsilon_i$, $i \in J\subset\{1,...,n\}$ $y_i=\beta_0+\beta_1x_i+\varepsilon_i$, $i \in J^c$ where $\varepsilon_i$ are i. i. d. and $J$ is not known in advance. Is it possible to estimate $\alpha_0,\al...
Discerning between two different linear regression models in one sample
CC BY-SA 2.5
null
2010-12-07T14:30:19.860
2019-09-09T08:17:06.213
2019-09-09T08:17:06.213
11887
2116
[ "regression", "classification", "data-mining", "mixture-distribution" ]
5214
1
5216
null
2
930
I have left censored data where the distribution is known (it's near enough lognormal, at least in theory). I'd like to calculate some simple summary stats: geometric mean and standard deviation in this case. I've previously used R's `NADA` package for this but it is no longer on CRAN. Is there an alternative availabl...
How do you calculate simple statistics for left censored data in R?
CC BY-SA 2.5
null
2010-12-07T15:32:41.797
2010-12-07T18:28:04.907
2010-12-07T18:28:04.907
478
478
[ "r", "censoring" ]
5216
2
null
5214
4
null
I will let other suggest better alternatives to [NADA](http://www.practicalstats.com/nada/nada/downloads_files/NADAforR_Examples.pdf), but it seems the package is still available on CRAN, in the [Archive](http://cran.r-project.org/src/contrib/Archive) section. The last version is from May, 2009. Installation went fine ...
null
CC BY-SA 2.5
null
2010-12-07T15:54:24.510
2010-12-07T15:54:24.510
null
null
930
null
5217
2
null
5187
2
null
The contents of your chains are stored in three different formats. Take a look at ``` bugs.sim$sims.array bugs.sim$sims.list bugs.sim$sims.matrix ``` and read the Value section of `?bugs`.
null
CC BY-SA 2.5
null
2010-12-07T15:57:53.917
2010-12-07T15:57:53.917
null
null
478
null
5218
2
null
4830
5
null
In logistic regression, highly skewed distributions of outcome variables (where there are far more non-events to events or vis versa), the cut point or probability trigger does need to be adjusted, but it will not have much of an effect on overall classification efficieny. This will always remain roughly the same, but...
null
CC BY-SA 2.5
null
2010-12-07T16:08:40.270
2010-12-07T16:08:40.270
null
null
null
null
5220
1
null
null
2
6993
I have done a meta analysis and heterogeneity is too high. I am working with (even/Total) for experimental and control groups to calculate the Odds Ratio. I have done fixed-effect and random-effect modeling. I now need to use meta-regression via SPSS. Can anyone direct me to a good set of materials to learn how t...
How to do meta-regression analysis with SPSS?
CC BY-SA 2.5
null
2010-12-07T16:37:20.697
2012-05-22T20:15:20.493
2010-12-07T21:11:28.573
307
null
[ "regression", "spss", "meta-analysis" ]
5221
2
null
5213
5
null
You need to model the observations as a mixture model. Define: $p$ as the probability that a sample belongs to the first data generating process. Thus, the density function of $y_i$ is given by: $f(y_i|-) \sim p f_1(y_i|-) + (1-p) f_2(y_i|-)$ where $f_1(.)$ is the density that arises because of the first data generati...
null
CC BY-SA 2.5
null
2010-12-07T17:01:09.163
2010-12-07T17:01:09.163
null
null
null
null
5222
2
null
5220
7
null
You could start with David B Wilson's website on "[meta-analysis stuff](http://mason.gmu.edu/~dwilsonb/ma.html)". He offers spss, stata, and sas macros for performing meta-analytic analyses (including meta-regression; metareg.sps) + PPT slides (analysis.ppt, interpretation.ppt). Another presentation I really like(d) wa...
null
CC BY-SA 3.0
null
2010-12-07T17:57:35.953
2011-10-17T20:28:11.763
2011-10-17T20:28:11.763
919
307
null
5223
2
null
5077
10
null
I didn't look at the paper you supplied, but let me have a go anyway: If you have a $p$-dimensional parameter space you can generate a random direction $d$ uniformly distributed on the surface of the unit sphere with ``` x <- rnorm(p) d <- x/sqrt(sum(x^2)) ``` (c.f. [Wiki](http://en.wikipedia.org/wiki/Hypersphere#Gene...
null
CC BY-SA 3.0
null
2010-12-07T18:19:10.860
2017-04-24T07:45:30.210
2017-04-24T07:45:30.210
123119
1979
null
5225
2
null
5213
4
null
The first hit on [Rseek](http://Rseek.org) with keywords "mixture regression" brings up the `flexmix` package, which does what you want. I seem to recall that there were other packages for this as well.
null
CC BY-SA 2.5
null
2010-12-07T21:03:29.853
2010-12-07T21:03:29.853
null
null
279
null
5226
1
5231
null
5
654
If $X=[x_1,x_2,...,x_n]^T$ is an $n$-dimensional random variable and we have $E\left\{X\right\} = M = \left[m_1,m_2,...,m_n\right]^T$ $Cov\left\{X\right\} = \Sigma = diag\left(\lambda_1,\lambda_2,...,\lambda_n\right)$ how can I express the following expectation in terms of $M$, $\Sigma$, and $n$ (and maybe raw $m_i$...
Expectation of $\left(X-M\right)^T\left(X-M\right)\left(X-M\right)^T\left(X-M\right)$
CC BY-SA 2.5
null
2010-12-08T00:13:18.207
2010-12-08T14:35:35.940
2010-12-08T14:35:35.940
2148
2148
[ "expected-value" ]
5227
2
null
5226
2
null
I believe this depends on the kurtosis of $X$. If I am reading this correctly, and assuming the $X_i$ are independent, you are trying to find the expectation of $\sum_i (X_i - m_i)^4$. Because $X_i^4$ appears, you cannot find this expectation in terms of $M$ and $\Sigma$ without making further assumptions. (Even withou...
null
CC BY-SA 2.5
null
2010-12-08T01:02:29.333
2010-12-08T03:03:57.627
2010-12-08T03:03:57.627
795
795
null
5228
1
5232
null
9
1792
I am looking at the sample kurtosis of a fairly skewed random variable, and the results seem inconsistent. To simply illustrate the problem, I looked at the sample kurtosis of a log-normal RV. In R (which I am slowly learning): ``` library(moments); samp_size = 2048; n_trial = 4096; kvals <- rep(NA,1,n_trial); #pre...
Is sample kurtosis hopelessly biased?
CC BY-SA 2.5
null
2010-12-08T01:21:07.327
2010-12-08T08:42:18.133
2010-12-08T08:42:18.133
1390
795
[ "r", "unbiased-estimator", "kurtosis" ]
5229
2
null
3466
20
null
Daniel B. Wright discusses this in section 5 of his article [Making Friends with your Data](http://www2.fiu.edu/~dwright/pdf/makefriends.pdf). He suggests (p.130): > The only procedure that is always correct in this situation is a scatterplot comparing the scores at time 2 with those at time 1 for the differen...
null
CC BY-SA 2.5
null
2010-12-08T01:31:49.233
2010-12-25T06:55:23.157
2010-12-25T06:55:23.157
183
183
null
5231
2
null
5226
5
null
Because $\left(X-M\right)^T\left(X-M\right) = \sum_i{(X_i - m_i)^2}$, $$\left(X-M\right)^T\left(X-M\right)\left(X-M\right)^T\left(X-M\right) = \sum_{i,j}{(X_i - m_i)^2(X_j - m_j)^2} \text{.}$$ There are two kinds of expectations to obtain here. Assuming the $X_i$ are independent and $i \ne j$, $$\eqalign{ E \left[ ...
null
CC BY-SA 2.5
null
2010-12-08T04:20:55.597
2010-12-08T04:20:55.597
null
null
919
null
5232
2
null
5228
8
null
There's a [bias correction](http://www.mathworks.com/help/toolbox/stats/kurtosis.html). It's not huge. I believe the sampling variance of the kurtosis is proportional to the eighth (!) central moment, which can be enormous for a lognormal distribution. You would need millions of trials (or far more) in a simulation ...
null
CC BY-SA 2.5
null
2010-12-08T04:51:09.113
2010-12-08T04:51:09.113
null
null
919
null
5233
1
5236
null
5
312
Say I have a database of around a million words, and I want to get an intuitive idea about exactly how a particular, quite infrequent, word is distributed throughout this data. My goal is to be able to see clearly whether this word tends to cluster together, or whether it is relatively evenly spaced. What would be some...
Visualizing the distribution of something within a very large body of data
CC BY-SA 2.5
null
2010-12-08T05:22:59.760
2010-12-08T19:43:07.323
2010-12-08T05:33:36.847
919
52
[ "r", "distributions", "data-visualization" ]
5234
2
null
5233
3
null
With a 1200 dpi printer using the thinnest possible line (one pixel) for each word, your plot of a million words would still be almost 20 meters long! Maybe a [density plot](http://www.statmethods.net/graphs/density.html) would be more helpful.
null
CC BY-SA 2.5
null
2010-12-08T05:32:42.603
2010-12-08T05:32:42.603
null
null
919
null
5235
1
5252
null
31
99643
In multiple linear regression, I can understand the correlations between residual and predictors are zero, but what is the expected correlation between residual and the criterion variable? Should it expected to be zero or highly correlated? What's the meaning of that?
What is the expected correlation between residual and the dependent variable?
CC BY-SA 3.0
null
2010-12-08T05:50:51.757
2017-09-07T17:55:53.393
2013-04-02T21:45:29.987
7290
400
[ "regression", "residuals" ]
5236
2
null
5233
2
null
While Whuber is correct in principle you still might be able to see something because your word is very infrequent and you only want plots of the one word. Something quite uncommon might only appear 30 times, probably not more than 500. Let's say you convert your words into a single vector of words that's a million lo...
null
CC BY-SA 2.5
null
2010-12-08T05:51:16.343
2010-12-08T16:37:08.893
2010-12-08T16:37:08.893
601
601
null
5237
2
null
5233
2
null
I don't know if this may be useful in your case, but in bioinformatics I often feel the need to visualize the distribution of gene counts in a give data set. This is definitely not as large as your data set, but I think the strategy can be followed for most of the large data sets. A typical strategy would be to find a ...
null
CC BY-SA 2.5
null
2010-12-08T06:10:45.690
2010-12-08T06:10:45.690
null
null
1307
null
5238
1
5241
null
18
12334
When I work on data analysis projects I often store data in comma or tab-delimited (CSV, TSV) data files. While data often belongs in a dedicated database management system. For many of my applications, this would be overdoing things. I can edit CSV and TSV files in Excel (or presumably another Spreadsheet program). T...
Strategy for editing comma separated value (CSV) files
CC BY-SA 3.0
null
2010-12-08T07:14:29.000
2017-05-22T18:46:48.997
2017-05-20T16:29:55.990
101426
183
[ "project-management" ]
5239
2
null
5238
5
null
Update: [Having been going through a large backlog of email from R-Help] I am reminded of the thread on "[The behaviour of read.csv()](http://thread.gmane.org/gmane.comp.lang.r.general/213174/focus=213179)". In this, Duncan Murdoch mentions that he prefers to use [Data Interchange Format (DIF)](http://en.wikipedia.org/...
null
CC BY-SA 2.5
null
2010-12-08T07:31:04.013
2010-12-08T10:35:34.760
2010-12-08T10:35:34.760
1390
1390
null
5240
2
null
4991
4
null
Have a look at the [dlm](http://cran.r-project.org/web/packages/dlm/index.html) package and its [vignette](http://cran.r-project.org/web/packages/dlm/vignettes/dlm.pdf). I think you might find what you are looking for from the vignette. The package authors have also written a book [Dynamic Linear Models with R](http://...
null
CC BY-SA 2.5
null
2010-12-08T07:40:03.023
2010-12-14T21:58:57.510
2010-12-14T21:58:57.510
919
214
null
5241
2
null
5238
14
null
- If you are comfortable with R, you can create your basic data.frame and then use the fix() function on it to input data. Along the same line as #5, once you set up the data.frame you can use a series of readLines(n=1) (or whatever) to get your data in, validate it, and the provide the opportunity to add the next ro...
null
CC BY-SA 3.0
null
2010-12-08T07:51:55.477
2013-01-21T15:24:42.620
2013-01-21T15:24:42.620
196
196
null
5242
2
null
5228
5
null
[Just on the R Style - @whuber has answered the Kurtsosis Q] This was a bit too complicated to stick into a comment. For such simple loops like the one you use, we can combine @whuber's suggestion of encapsulating the simulation in a function with the `replicate()` function. `replicate()` takes care of allocation and r...
null
CC BY-SA 2.5
null
2010-12-08T08:41:48.057
2010-12-08T08:41:48.057
null
null
1390
null
5243
2
null
5238
1
null
I like Gnumeric because it does not try to be so much idiot-resistant as others (it doesn't shout about lost functionality) and works with large data... yet I think it is Linux-only.
null
CC BY-SA 2.5
null
2010-12-08T09:09:34.283
2010-12-08T09:09:34.283
null
null
null
null
5244
2
null
5238
2
null
After I asked this question, I started having a look at [CSVed](http://csved.sjfrancke.nl/index.html). From the website: > CSVed is an easy and powerful CSV file editor, you can manipulate any CSV file, separated with any separator. I'm not sure if anyone has experience with it.
null
CC BY-SA 2.5
null
2010-12-08T09:09:51.760
2010-12-08T09:09:51.760
null
null
183
null
5245
2
null
5235
4
null
So, the residuals are your unexplained variance, the difference between your model's predictions and the actual outcome you're modeling. In practice, few models produced through linear regression will have all residuals close to zero unless linear regression is being used to analyze a mechanical or fixed process. Ideal...
null
CC BY-SA 2.5
null
2010-12-08T09:27:14.297
2010-12-08T09:35:02.833
2010-12-08T09:35:02.833
2166
2166
null
5246
2
null
5238
2
null
Excel is not very CSV friendly. For example, if you were to enter "1,300" into Excel, and save that as a comma separated value, it would let you! This can be a big problem (I encounter it on a regular basis when receiving files from others). I personally use OpenOffice.org Calc, I also use many of the solutions listed ...
null
CC BY-SA 2.5
null
2010-12-08T09:42:47.957
2010-12-08T09:42:47.957
null
null
2166
null
5247
1
5261
null
4
2597
I am going to host a training session to teach healthcare staff how to use control chart (c-chart to be specific), and I need to tell that why these rules ([Western Electric Rules](http://en.wikipedia.org/wiki/Western_Electric_rules#Zone_rules)) are so called rules that when pattern is matched, outbreak can be consider...
How to calculate the probability for pattern that violates "control chart rules" to occur?
CC BY-SA 2.5
null
2010-12-08T09:59:17.943
2015-03-10T20:43:36.770
2010-12-08T15:43:49.840
919
588
[ "r", "poisson-distribution", "control-chart" ]
5248
2
null
4989
2
null
Looking at the [Heckman article](http://www.jstor.org/stable/full/1912352?seq=1) I see no reason, why two selection rules cannot be applied. In the article Heckman postulates the model as: $Y_{1i}=X_{1i}\beta_1+U_{1i}$ $Y_{2i}=X_{2i}\beta_1+U_{2i}$ The goal is to estimate the first equation, but some data is missing....
null
CC BY-SA 2.5
null
2010-12-08T10:22:15.833
2010-12-08T10:22:15.833
null
null
2116
null
5249
1
null
null
17
742
In a previous question I asked about tools for editing [CSV files](https://stats.stackexchange.com/questions/5238/strategy-for-editing-comma-separated-value-csv-files). [Gavin](https://stats.stackexchange.com/questions/5238/strategy-for-editing-comma-separated-value-csv-files/5239#5239) linked to a comment on R Help by...
Simple, reliable, open, and interoperable plain text format for storing data
CC BY-SA 2.5
null
2010-12-08T10:43:56.587
2017-05-20T16:31:28.313
2017-05-20T16:31:28.313
101426
183
[ "project-management" ]