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
3815
2
null
3814
41
null
Irene Stratton and colleague published a short paper about a closely related question: Stratton IM, Neil A. [How to ensure your paper is rejected by the statistical reviewer](https://onlinelibrary.wiley.com/doi/full/10.1111/j.1464-5491.2004.01443.x). Diabetic Medicine 2005; 22(4):371-373.
null
CC BY-SA 4.0
null
2010-10-20T19:13:42.330
2019-06-25T12:56:38.810
2019-06-25T12:56:38.810
173082
449
null
3816
2
null
3814
73
null
What particularly irritates me personally is people who clearly used user-written packages for statistical software but don't cite them properly, or at all, thereby failing to give any credit to the authors. Doing so is particularly important when the authors are in academia and their jobs depend on publishing papers t...
null
CC BY-SA 2.5
null
2010-10-20T19:28:41.487
2010-10-20T19:28:41.487
null
null
449
null
3817
2
null
3814
70
null
Goodness me, so many things come to mind... - Stepwise regression - Splitting continuous data into groups - Giving p-values but no measure of effect size - Describing data using the mean and the standard deviation without indicating whether the data were more-or-less symmetric and unimodal - Figures without clear ...
null
CC BY-SA 2.5
null
2010-10-20T19:29:29.613
2010-10-20T19:29:29.613
null
null
1352
null
3818
1
null
null
1
3666
I have three variables, 1. Irrational Beliefs (Categorical) 2. Anxiety State/ Trait (Categorical) 3. Personality Traits (Categorical) Which statistical analyses can be used?
Analysis with three categorical variables
CC BY-SA 2.5
null
2010-10-20T19:37:42.267
2010-10-21T07:23:20.837
2010-10-20T20:18:42.270
null
1649
[ "categorical-data" ]
3819
2
null
3814
32
null
The code used to generate the simulated results is not provided. After asking for the code, it demands additional work to get it to run on a referee generated dataset.
null
CC BY-SA 2.5
null
2010-10-20T19:41:32.543
2010-10-21T15:43:30.690
2010-10-21T15:43:30.690
8
603
null
3820
1
3825
null
7
6562
I've been asked a question - if I calculate some sd, can I change one value and still keep the same sd. The answer is simply yes. For example: ``` sd(c(2,3,4)) sd(c(3,4,5)) ``` But what I wondered then is, assuming you change k values, under what rules do you change them so to always keep the same sd (is it true to ...
When does the sd stay the same, even after values in the sample were changed?
CC BY-SA 2.5
null
2010-10-20T19:43:42.297
2014-03-11T17:29:55.577
2010-10-20T20:56:22.620
919
253
[ "standard-deviation" ]
3821
2
null
3820
2
null
Suppose that you have a random variable $X$ and you wish to find the set of transformations $Y=f(X)$ such that the standard deviation of $Y$ is the identical to the standard deviation of $X$. Consider first the set of linear transformations: $Y = a X + b$ where $a, b$ are constants. It is clear that: $Var(Y) = a^2 Var(...
null
CC BY-SA 2.5
null
2010-10-20T19:48:29.650
2010-10-20T20:15:24.157
2010-10-20T20:15:24.157
null
null
null
3822
1
null
null
4
432
I have 6 similarity matrices reflecting the proximity of 100 pairs of sounds. Similarity indices are in the range [0,1], with higher values indicating sounds perceived as more alike. What is the most appropriate metric I can use to estimate the inter-rater reliability between them? Thanks a lot.
Inter-rater reliability between similarity matrices
CC BY-SA 2.5
null
2010-10-20T19:57:52.263
2010-10-22T07:59:16.753
2010-10-20T20:09:39.270
930
1564
[ "reliability", "agreement-statistics" ]
3823
2
null
3814
31
null
Plagiarism (theoretical or methodological). My first review was indeed for a paper figuring many unreferenced copy/paste from a well-established methodological paper published 10 years ago. Just found a couple of interesting papers on this topic: [Authorship and plagiarism in science](http://wrt-howard.syr.edu/Bibs/Pla...
null
CC BY-SA 2.5
null
2010-10-20T20:23:38.740
2010-10-21T06:27:00.043
2010-10-21T06:27:00.043
930
930
null
3824
2
null
3814
26
null
When we ask the authors for - minor comment about an idea we have (in this sense, this not considered as a reason for rejecting the paper but just to be sure the authors are able to discuss another POV), or - unclear or contradicting results, and that authors don't really answer in case (1) or that the incriminat...
null
CC BY-SA 2.5
null
2010-10-20T20:29:24.090
2010-10-20T20:29:24.090
null
null
930
null
3825
2
null
3820
7
null
The question is about the data, not random variables. Let $X = (x_1, x_2, \ldots, x_n)$ be the data and $Y = (y_1, y_2, \ldots, y_n)$ be additive changes to the data so that the new values are $(x_1+y_1, \ldots, x_n+y_n)$. From $$\text{Var}(X) = \text{Var}(X+Y) = \text{Var}(X) + 2 \text{Cov}(X,Y) + \text{Var}(Y)$$ we ...
null
CC BY-SA 3.0
null
2010-10-20T20:47:18.890
2014-03-11T17:29:55.577
2014-03-11T17:29:55.577
919
919
null
3826
1
3877
null
4
6550
How does one calculate Cohen's d and confidence intervals after logit in Stata?
How does one calculate Cohen's d and confidence intervals after logit in Stata?
CC BY-SA 2.5
null
2010-10-20T20:51:59.437
2010-10-22T07:24:42.113
null
null
null
[ "confidence-interval", "stata", "effect-size", "cohens-d" ]
3827
2
null
3826
8
null
Cohen’s d is not directly available in Stata, and you have to resort on external macros, e.g. [sizefx](http://econpapers.repec.org/software/bocbocode/s456738.htm) (`ssc install sizefx`). It works fine if you have to series of values, but I found it less handy when you work with a full data set because there's no possib...
null
CC BY-SA 2.5
null
2010-10-20T21:02:48.473
2010-10-21T09:57:00.433
2010-10-21T09:57:00.433
930
930
null
3828
2
null
3818
2
null
If you're after a general way to model multiway [contingency tables](http://en.wikipedia.org/wiki/Contingency_table), one powerful approach is to use [Poisson regression](http://en.wikipedia.org/wiki/Poisson_regression), often called a log-linear model in this context. A classic paper on this is [Nelder (1974)](http:/...
null
CC BY-SA 2.5
null
2010-10-20T21:46:53.727
2010-10-20T21:46:53.727
null
null
449
null
3829
2
null
3814
19
null
When they don't sufficiently explain their analysis and/or include simple errors that make it difficult to work out what actually was done. This often includes throwing around a lot of jargon, by way of explanation, which is more ambiguous than the author seems to realize and also may be misused.
null
CC BY-SA 2.5
null
2010-10-20T22:55:12.767
2010-10-20T22:55:12.767
null
null
null
null
3831
2
null
3788
2
null
Whether a set of observations are iid or not is a decision that is typically taken after a consideration of the underlying data generating process. In your case, the underlying data generating process seems to be the measurements of the speed of a river. I would not consider these observations to be independent. If a p...
null
CC BY-SA 2.5
null
2010-10-21T00:47:55.787
2010-10-21T00:53:22.890
2010-10-21T00:53:22.890
null
null
null
3832
2
null
3804
2
null
Lets see if I understand Harlan's (and Srikant's) formulation correctly. $$\pi_1 \sim beta(\alpha_1,\beta_1)$$ $$\pi_2 \sim beta(\alpha_2,\beta_2)$$ Say, $\pi_1$ corresponds to the set of data for which you have less information apriori and $\pi_2$ is for the more precise data set. Using Srikant's formulation: $$\pi(p)...
null
CC BY-SA 2.5
null
2010-10-21T04:34:05.837
2010-10-21T05:51:11.413
2010-10-21T05:51:11.413
1307
1307
null
3833
2
null
3818
4
null
@onestop is literally correct. If you have three unordered categorical variables, techniques like loglinear modelling are appropriate. @Neelam However, I doubt that your data is unordered categorical. From my experience with measures of psychological scales measuring irrational beliefs, anxiety states and traits, and p...
null
CC BY-SA 2.5
null
2010-10-21T06:43:36.237
2010-10-21T07:23:20.837
2017-04-13T12:44:46.680
-1
183
null
3834
2
null
3822
3
null
My first idea would be to try some kind of cluster analysis (e.g. [hierarchical clustering](http://en.wikipedia.org/wiki/Hierarchical_clustering)) on each similarity matrix, and compare the classification trees across raters. We can derive a similarity index from all dendrograms, as discussed here, [A measure to descri...
null
CC BY-SA 2.5
null
2010-10-21T07:22:40.340
2010-10-22T07:59:16.753
2017-04-13T12:44:53.777
-1
930
null
3835
1
3846
null
4
104
This example was taken from Mathematical Statistics : A Unified Introduction (ISBN 9780387227696), page 58, under the section 'The Principle of Least Squares'. I think my problem has more to do with algebra but since this is a statistics book, I thought I should post here... Anyway, I need to estimate k base on this eq...
Estimating k in d=kv
CC BY-SA 2.5
null
2010-10-21T07:58:40.967
2010-10-22T01:18:58.907
null
null
1636
[ "least-squares" ]
3837
2
null
3051
4
null
``` library(zoo) x=c(4, 5, 7, 3, 9, 8) rollmean(x,3) ``` or ``` library(TTR) x=c(4, 5, 7, 3, 9, 8) SMA(x,3) ```
null
CC BY-SA 2.5
null
2010-10-21T09:17:02.463
2010-10-21T09:17:02.463
null
null
1709
null
3840
1
null
null
6
1198
I have two time series, series1 and series2. My aim is to find how much Series2 is different from Series1, automatically/quantitatively. Image can be seen in its original size by [clicking here](http://img713.imageshack.us/img713/3401/image001eg.gif). ![alt text](https://i.stack.imgur.com/0N5fN.gif) Series1 is the expe...
Automatic test measuring dissimilarity between two time series
CC BY-SA 2.5
null
2010-10-21T10:49:45.380
2010-10-21T14:06:00.943
2010-10-21T11:20:27.300
1352
1655
[ "distributions", "time-series", "computational-statistics", "cross-correlation", "kolmogorov-smirnov-test" ]
3841
1
3866
null
11
186
I have two years of data which looks basically like this: Date ___ Violence Y/N? _ Number of patients 1/1/2008 ____ 0 __________ 11 2/1/2008 ____ 0 _________ 11 3/1/2008 _____1 __________ 12 4/1/2008 _____0 __________ 12 ... 31/12/2009____ 0__________ 14 i.e. two years of obse...
Two years of data describing occurence of violence- testing association with number of patients on ward
CC BY-SA 2.5
null
2010-10-21T11:07:03.723
2010-10-21T19:22:27.857
null
null
199
[ "r", "mixed-model", "autocorrelation", "panel-data" ]
3842
1
3843
null
9
105155
I want to create a bardiagram for these data in R (read from a CVS file): Experiment_Name MetricA MetricB Just_X 2 10 Just_X_and_Y 3 20 to have the following diagram: ![alt text](https://i.stack.imgur.com/kGwFA.png) I am beginner and I do not know even how to start.
How to create a barplot diagram where bars are side-by-side in R
CC BY-SA 2.5
null
2010-10-21T11:13:44.080
2015-02-01T03:27:55.130
2010-10-21T11:18:38.177
1352
1389
[ "r", "data-visualization", "barplot" ]
3843
2
null
3842
13
null
I shall assume that you are able to import your data in R with `read.table()` or the short-hand `read.csv()` functions. Then you can apply any summary functions you want, for instance `table` or `mean`, as below: ``` x <- replicate(4, rnorm(100)) apply(x, 2, mean) ``` or ``` x <- replicate(2, sample(letters[1:2], 100,...
null
CC BY-SA 2.5
null
2010-10-21T11:44:58.290
2010-10-21T11:56:50.343
2010-10-21T11:56:50.343
930
930
null
3844
2
null
1053
2
null
I found "Analysis of survival data" by Cox and Oakes (Chapman and Hall Monographs on Statistics and Applied Probability - vol. 21) to be very readable and informative. No material on survival analysis in R though.
null
CC BY-SA 2.5
null
2010-10-21T12:17:31.507
2010-10-21T12:17:31.507
null
null
887
null
3845
1
5257
null
6
2133
Please see [question](https://stats.stackexchange.com/questions/3708/forecasting-unemployment-rate) for the background. Following the advice of @kwak and @Andy W, I have decided to use the package plm in `R` to fit my model. Here an excerpt of the data `df` (the numbers are made up, not real data!): reg year ...
Forecasting unemployment rate with plm
CC BY-SA 2.5
null
2010-10-21T12:32:34.307
2013-01-31T19:47:46.013
2020-06-11T14:32:37.003
-1
1443
[ "r", "panel-data", "generalized-moments" ]
3846
2
null
3835
1
null
There is a constraint imposed a few lines above the highlighted text which states: $\sum_i{v_i (d_i-k v_i)} = 0$ Does the that help? Edit In response to your second comment: Consider: $\sum_i{(d_i - l v_i)^2}$. This can be re-written as: $\sum_i{((d_i - k v_i) + (k v_i - l v_i))^2}$ Expanding the square, we have: $\sum...
null
CC BY-SA 2.5
null
2010-10-21T12:33:03.850
2010-10-22T01:18:58.907
2010-10-22T01:18:58.907
null
null
null
3847
2
null
3842
13
null
Here ggplot version: ``` library(ggplot2) df = melt(data.frame(A=c(2, 10), B=c(3, 20), experiment=c("X", "X & Y")), variable_name="metric") ggplot(df, aes(experiment, value, fill=metric)) + geom_bar(position="dodge") ``` ![alt text](https://i.stack.imgur.com/F0F7m.png)
null
CC BY-SA 2.5
null
2010-10-21T12:58:47.983
2010-10-22T10:16:06.170
2010-10-22T10:16:06.170
8
1443
null
3848
2
null
3840
3
null
There are many different distance measures. For starters, there's always the correlation. You can look at the [mean square error](http://en.wikipedia.org/wiki/Mean_squared_error). In R, you can see the algorithm for time series in Rob Hyndman's [ftsa](http://cran.us.r-project.org/web/packages/ftsa/) package (see th...
null
CC BY-SA 2.5
null
2010-10-21T13:21:24.800
2010-10-21T14:06:00.943
2010-10-21T14:06:00.943
5
5
null
3849
1
5429
null
3
2136
Are there any tools that can format and write to external file output of principal component analysis in Stata? I'm thinking about something that will work in similar vein to [excellent] family of [estout](http://repec.org/bocode/e/estout/index.html) commands.
How can I format and export PCA output in Stata?
CC BY-SA 2.5
null
2010-10-21T13:38:32.160
2010-12-13T12:09:19.943
null
null
22
[ "pca", "stata" ]
3850
2
null
1053
4
null
David Collett. Modelling Survival Data in Medical Research, Second Edition. Chapman & Hall/CRC. 2003. [ISBN 978-1584883258](http://en.wikipedia.org/wiki/Special%3aBookSources/9781584883258) Software section focuses on SAS not R though.
null
CC BY-SA 2.5
null
2010-10-21T14:42:28.390
2010-10-21T14:42:28.390
null
null
449
null
3853
1
3854
null
7
107634
I have the following R code for creating barplot: ``` # ... here I read cvs file mx <- rbind(results$"AVG.P10.") colnames(mx) <- results$"RUN" rownames(mx) <- "AVG P" postscript(file="avg_p_result.ps") barplot(mx, beside=T, col=c("grey"), names.arg= results$"RUN", cex.axis = 1.5, cex.lab=1.5) ...
How to increase size of label fonts in barplot
CC BY-SA 2.5
null
2010-10-21T15:01:50.123
2010-10-21T16:21:07.947
2010-10-21T16:20:10.117
930
1389
[ "r", "boxplot" ]
3854
2
null
3853
10
null
According to `?barplot`, you need to use `cex.names=1.5`. ``` barplot(mx, beside=TRUE, col=c("grey"), names.arg=results$"RUN", cex.axis=1.5, cex.names=1.5) ```
null
CC BY-SA 2.5
null
2010-10-21T15:15:49.950
2010-10-21T16:21:07.947
2010-10-21T16:21:07.947
930
1657
null
3855
1
3861
null
6
998
Imagine I have a test for a disease that returns either a positive or a negative result. I administer the test to one group twice in a single session; in another group, I administer it twice with two weeks separating the tests. The hypothesis is that the tests taken at the same time will be more consistent with each ...
Comparing test-retest reliabilities
CC BY-SA 2.5
null
2010-10-21T15:48:52.837
2010-10-21T17:14:20.710
null
null
71
[ "reliability" ]
3856
1
3865
null
6
1513
Are there standard ways of analyzing and generating "clumpy" distributions? - analyze: how clumpy is a given point cloud (in 1d, 2d, nd), what are its clumpy coefficients? - generate or synthesize a pseudo-random cloud with coefficients C (These are the basics for any family of distributions, e.g. normal.) There ar...
Analyze and generate "clumpy" distributions?
CC BY-SA 2.5
null
2010-10-21T16:20:09.727
2011-08-26T17:19:23.190
2010-10-22T13:32:28.723
557
557
[ "clustering", "spatial", "autocorrelation" ]
3857
1
3863
null
43
876
[My workplace](http://www.hsl.gov.uk/) has employees from a very wide range of disciplines, so we generate data in lots of different forms. Consequently, each team has developed its own system for storing data. Some use Access or SQL databases; some teams (to my horror) are reliant almost entirely on Excel spreadshee...
How do I get people to take better care of data?
CC BY-SA 2.5
null
2010-10-21T16:26:22.880
2013-09-04T01:59:52.387
2011-10-07T02:13:18.347
183
478
[ "dataset", "reproducible-research", "quality-control" ]
3858
2
null
3855
1
null
Perhaps, computing the tetrachoric correlation would be useful. See this url: [Introduction to the Tetrachoric and Polychoric Correlation Coefficients](http://www.john-uebersax.com/stat/tetra.htm)
null
CC BY-SA 2.5
null
2010-10-21T16:28:13.923
2010-10-21T16:28:13.923
null
null
null
null
3859
2
null
3856
4
null
I think suitable 'clumpy coefficients' are measures of spatial autocorrelation such as [Moran's I](http://en.wikipedia.org/wiki/Moran%27s_I) and [Geary's C](http://en.wikipedia.org/wiki/Geary%27s_C). Spatial statistics is not my area and I don't know about simulation though.
null
CC BY-SA 2.5
null
2010-10-21T16:36:55.843
2010-10-21T16:36:55.843
null
null
449
null
3860
2
null
3856
4
null
You could calculate an [index of dispersion](http://www.passagesoftware.net/webhelp/Dispersion_Indices.htm) measure over your space to gauge clumpiness. One starting point for more information would be the ecology packages and literature to see how they simulate such things.
null
CC BY-SA 2.5
null
2010-10-21T16:36:59.993
2010-10-21T16:36:59.993
null
null
251
null
3861
2
null
3855
7
null
Both situations are specific cases of test-retest, except that the recall period is null in the first case you described. I would also expect a larger agreement in the former case, but that may be confounded with a learning or memory effect. A chance-corrected measure of agreement, like [Cohen's kappa](http://en.wikipe...
null
CC BY-SA 2.5
null
2010-10-21T17:14:20.710
2010-10-21T17:14:20.710
null
null
930
null
3862
2
null
3857
12
null
One free online resource is the set of [Statistical Good Practice Guidelines](http://www.ilri.org/biometrics/GoodStatisticalPractice/publications/guides.html) from the [Statistical Services Centre at the University of Reading](http://www.ssc.rdg.ac.uk/). In particular: - Data Management Guidelines for Experimental Pro...
null
CC BY-SA 3.0
null
2010-10-21T17:34:29.003
2011-10-06T22:23:20.723
2011-10-06T22:23:20.723
4756
449
null
3863
2
null
3857
16
null
It's worth considering ideas from the software world. In particular you might think of setting up: a [version control repository](http://en.wikipedia.org/wiki/Revision_control) and a central database server. Version control probably helps you out with otherwise free floating files, such as Excel and text files, etc....
null
CC BY-SA 2.5
null
2010-10-21T17:45:14.913
2010-10-21T17:45:14.913
null
null
251
null
3864
2
null
3857
6
null
I think first of all you have to ask yourself: why do people use Excel to do tasks Excel was not made for? 1) They already know how to use it 2) It works. Maybe in a clumsy way but it works and that's what they want I copy a series of numbers in, press a button and I have a plot. As easy as that. So, make them understa...
null
CC BY-SA 2.5
null
2010-10-21T17:55:24.157
2010-10-21T17:55:24.157
null
null
582
null
3865
2
null
3856
5
null
If assessing spatial auto-correlation is what your interested in, here is a paper that simulates data and evaluates different auto-regressive models in R. [Spatial autocorrelation and the selection of simultaneous autoregressive models](http://dx.doi.org/10.1111/j.1466-8238.2007.00334.x) by: W. D. Kissling, G. Carl Glo...
null
CC BY-SA 3.0
null
2010-10-21T18:58:11.697
2011-08-26T17:19:23.190
2011-08-26T17:19:23.190
1036
1036
null
3866
2
null
3841
2
null
Here is an idea that connects your binary dependent variable to a continuous, unobserved variable; a connection that may let you leverage the power of time series models for continuous variables. Define: $V_{w,t} = 1$ if violent incident happened in ward $w$ during time period $t$ and 0 otherwise $P_{w,t}$ : Propensit...
null
CC BY-SA 2.5
null
2010-10-21T19:22:27.857
2010-10-21T19:22:27.857
null
null
null
null
3867
2
null
1053
4
null
Take a look at the course page for [Sociology 761: Statistical Applications in Social Research](http://socserv.socsci.mcmaster.ca/jfox/Courses/soc761/index.html). Professor [John Fox](http://socserv.socsci.mcmaster.ca/jfox/) at McMaster University has [course notes on survival analysis](http://socserv.socsci.mcmaster.c...
null
CC BY-SA 2.5
null
2010-10-21T20:35:15.033
2010-10-21T20:35:15.033
null
null
null
null
3868
1
null
null
5
606
The nonlinear model I am fitting gamma distribution with inverse or log is not converging. There is one observation having zero value in the response variable. Does this zero affects to model the data? Any answer warmly appreciated!
Undefined link function in gamma distribution
CC BY-SA 3.0
0
2010-10-21T23:47:03.803
2013-02-11T08:13:51.703
2013-02-11T08:13:51.703
19879
null
[ "generalized-linear-model", "fitting", "link-function" ]
3869
1
3871
null
4
513
I know that if events $A$ and $B$ are independent, then $P(A\cap B) = P(A).P(B)$. Lets say I roll a die, and define the following events: $x$ = Number is a multiple of $3 = \lbrace 3, 6\rbrace$ $y$ = Number is more than $3 = \lbrace 4, 5, 6\rbrace$ $z$ = Number is even = $\lbrace 2, 4, 6 \rbrace$ Therefore, $P(x) * P...
What are independent events?
CC BY-SA 4.0
null
2010-10-22T01:02:20.173
2022-07-09T18:12:00.490
2022-07-09T18:12:00.490
44269
1636
[ "probability", "independence" ]
3870
2
null
3869
4
null
I find it easiest to think of independence in terms of conditional probabilities: $X$ and $Y$ are independent if $P(Y|X)=P(Y)$ and $P(X|Y)=P(X)$. That is knowing one does not change the probability of the other. In this example, \begin{aligned} P(Y|X) &= P(Y \cap X) / P(X) = 1/2 = P(Y)\\ P(Y|Z) &= P(Y \cap Z) / P(Z) = ...
null
CC BY-SA 2.5
null
2010-10-22T01:16:57.240
2010-10-22T01:16:57.240
null
null
159
null
3871
2
null
3869
5
null
To add to the Rob's [answer](https://stats.stackexchange.com/questions/3869/what-are-independent-events/3870#3870) the joint probability of two events in the discrete case can be decomposed as follows (See the wiki's definition for the [discrete case](http://en.wikipedia.org/wiki/Joint_probability_distribution#Discrete...
null
CC BY-SA 2.5
null
2010-10-22T01:33:49.437
2010-10-22T01:33:49.437
2017-04-13T12:44:20.903
-1
null
null
3872
1
null
null
5
34780
What statistical test can I use to compare two ratios from two independent samples. The ratios are after to before results. I need to compare the after/before ratios for two independent models and show whether they are have significant difference or not. Please help!
Statistical test to compare two ratios from two independent models
CC BY-SA 2.5
null
2010-10-22T04:37:04.527
2020-04-27T01:57:37.307
null
null
null
[ "statistical-significance" ]
3873
2
null
3650
2
null
So here is my motivation for the questions, although I know this is not necessary I like it when people follow up on their questions so I will do the same. I would like to thank both Srikant and whuber for their helpful answers. (I ask no-one upvote this as it is not an answer to the question and both whuber's and Srik...
null
CC BY-SA 2.5
null
2010-10-22T04:55:00.487
2010-10-22T16:38:05.127
2010-10-22T16:38:05.127
919
1036
null
3874
1
3876
null
17
17253
I have data from patients treated with 2 different kinds of treatments during surgery. I need to analyze its effect on heart rate. The heart rate measurement is taken every 15 minutes. Given that the surgery length can be different for each patient, each patient can have between 7 and 10 heart rate measurements. So ...
Unbalanced mixed effect ANOVA for repeated measures
CC BY-SA 3.0
null
2010-10-22T05:03:26.650
2011-04-08T01:04:33.640
2011-04-08T01:04:33.640
930
1663
[ "r", "mixed-model", "repeated-measures", "lme4-nlme" ]
3875
2
null
3872
3
null
Any test for independence of a 2x2 contingency table will do! A chi-square or t-test are the textbook simple solutions. The "best" test in this situation is called Barnard's test for superiority -- the StatXact software will happily calculate this for you.
null
CC BY-SA 2.5
null
2010-10-22T05:16:26.863
2010-10-22T05:16:26.863
null
null
1122
null
3876
2
null
3874
18
null
The lme/lmer functions from the nlme/lme4 packages are able to deal with unbalanced designs. You should make sure that time is a numeric variable. You would also probably want to test for different types of curves as well. The code will look something like this: ``` library(lme4) #plot data with a plot per person inclu...
null
CC BY-SA 2.5
null
2010-10-22T05:36:47.643
2010-10-28T15:44:12.870
2010-10-28T15:44:12.870
966
966
null
3877
2
null
3826
4
null
Given the current issues with the user-written `sizefx` command for Stata that chl and I have uncovered, here's an alternative way of doing things in Stata using the user-written `metan` command. This is designed for meta-analysis of study-level summary data so you need to enter the means, sds and ns (which i've taken ...
null
CC BY-SA 2.5
null
2010-10-22T07:24:42.113
2010-10-22T07:24:42.113
null
null
449
null
3878
2
null
2125
11
null
Correlation analysis only quantifies the relation between two variables ignoring which is dependent variable and which is independent. But before appliyng regression you have to calrify that impact of which variable you want to check on the other variable.
null
CC BY-SA 2.5
null
2010-10-22T09:17:26.323
2010-10-22T09:51:55.363
2010-10-22T09:51:55.363
null
null
null
3879
1
3880
null
16
92346
This question is related to [my previous question](https://stats.stackexchange.com/questions/3842/how-to-create-a-barplot-diagram-where-bars-are-side-by-side-in-r). I would like to put values over bars in barplot. I am beginner in plotting in R.
How to put values over bars in barplot in R
CC BY-SA 2.5
null
2010-10-22T10:05:15.167
2018-01-24T13:15:14.310
2017-04-13T12:44:21.160
-1
1389
[ "r", "data-visualization" ]
3880
2
null
3879
16
null
To add text to a plot, just use the `text` command. From @chl's [answer](https://stats.stackexchange.com/questions/3842/how-to-create-a-barplot-diagram-where-bars-are-side-by-side-in-r/3843#3843) to your previous question: ``` ##Create data x = replicate(2, sample(letters[1:2], 100, rep=T)) apply(x, 2, table) ##Create...
null
CC BY-SA 2.5
null
2010-10-22T10:10:01.447
2010-10-22T10:10:01.447
2017-04-13T12:44:21.160
-1
8
null
3882
2
null
3879
3
null
If you're learning to plot in R you might look at the [R graph gallery](https://www.r-graph-gallery.com/) (original [here](https://web.archive.org/web/20100910025837/http://addictedtor.free.fr/graphiques/)). All the graphs there are posted with the code used to build them. Its a good resource.
null
CC BY-SA 3.0
null
2010-10-22T11:20:54.903
2018-01-24T13:15:14.310
2018-01-24T13:15:14.310
7290
1475
null
3883
2
null
3879
7
null
Another example of the use of `text` command ``` u <- c(3.2,6.6,11.7,16.3,16.6,15.4,14.6,12.7,11.4,10.2,9.8,9.1,9.1,9.0,8.8,8.4,7.7) p <-c(3737,3761,3784,3802,3825,3839,3850,3862,3878,3890,3901,3909,3918,3926,3935,3948) -c(385,394,401,409,422,430,434,437,437,435,436,437,439,442,447,452) e <- c(2504,2375,2206,2071,...
null
CC BY-SA 2.5
null
2010-10-22T12:13:40.343
2010-10-22T12:13:40.343
null
null
339
null
3884
2
null
3857
5
null
I underline all answers given already, but let's call a cat a cat: in many workspaces it is hardly impossible to convince management that investment in "exotic" softwaretools (exotic to them, that is) is necessary, let alone hiring somebody that could set it up and maintain it. I have told quite some clients that they ...
null
CC BY-SA 2.5
null
2010-10-22T12:28:30.873
2010-10-22T12:28:30.873
2020-06-11T14:32:37.003
-1
1124
null
3885
1
3886
null
4
859
Three unbiased estimators of standard deviation have been presented in the literature for m samples of size n. The first one is based on the sample ranges and can be obtained by $\hat \sigma_1 = \frac{\bar R}{d_2}$ The second one is based on sample standard deviations and can be calculated by $\hat \sigma_2 = \frac{\ba...
Computing unbiased estimators of $\sigma$ for m samples of size n
CC BY-SA 2.5
null
2010-10-22T13:05:30.993
2010-10-22T13:22:57.057
null
null
339
[ "r", "standard-deviation", "quality-control" ]
3886
2
null
3885
2
null
Ok, I finally found them [here](http://finzi.psych.upenn.edu/R/library/IQCC/html/00Index.html)
null
CC BY-SA 2.5
null
2010-10-22T13:22:57.057
2010-10-22T13:22:57.057
null
null
339
null
3887
2
null
3857
3
null
[VisTrails: A Python-Based Scientific Workflow and Provenance System](http://us.pycon.org/2010/conference/schedule/event/13/). This talk given at PyCon 2010 has some good ideas. Worth listening to even if you are not interested in using VisTrails or python. In the end I think if you would be able to require that there ...
null
CC BY-SA 3.0
null
2010-10-22T13:35:54.403
2013-09-04T00:37:14.277
2013-09-04T00:37:14.277
9007
1189
null
3888
1
3889
null
2
1054
I have a series of boxplots that i am generating with ggplot2. I want to control the order in which they are displayed. Is there a way to control this order? I have two genotypes and i want them displayed as WT then KO rather than the reverse (which is what i am getting as a default). My code right now is: ``` p <-...
Reorder categorical data in ggplot2
CC BY-SA 2.5
null
2010-10-22T13:58:09.980
2010-11-30T16:42:29.257
2010-11-30T16:42:29.257
8
1327
[ "r", "boxplot", "ggplot2" ]
3889
2
null
3888
5
null
Would that help? ``` x <- gl(2, 20, 40, labels=c("KO","WT")) y <- rnorm(40) qplot(x,y) qplot(relevel(x, "WT"),y) ```
null
CC BY-SA 2.5
null
2010-10-22T14:06:48.103
2010-10-22T14:06:48.103
null
null
930
null
3890
1
3891
null
3
7936
I would like to use the fuction weighted.median() in package [R.basic](http://www.stat.ucl.ac.be/ISdidactique/Rhelp/library/R.basic/html/weighted.median.html) (and some other ones too, although this one is most important). ``` install.packages("R.basic") ``` gives me: ``` package ‘R.basic’ is not available ``` and ...
package R.basic
CC BY-SA 2.5
null
2010-10-22T14:08:01.243
2014-04-23T13:54:08.877
2010-10-22T21:42:16.497
603
603
[ "r" ]
3891
2
null
3890
6
null
That's because the package doesn't exist on CRAN (see [the package list](http://cran.r-project.org/web/packages/)). It may have failed a build in a recent version of R. You can install it directly from the author's site like so: ``` install.packages(c("R.basic"), contriburl="http://www.braju.com/R/repos/") ``` See [H...
null
CC BY-SA 2.5
null
2010-10-22T14:12:55.267
2010-10-22T14:21:15.993
2010-10-22T14:21:15.993
5
5
null
3892
1
3895
null
11
4965
Why does OLS estimation involve taking vertical deviations of the points to the line rather than horizontal distances?
Why vertical distances?
CC BY-SA 2.5
null
2010-10-22T15:08:17.383
2019-02-19T10:51:20.247
null
null
333
[ "least-squares" ]
3893
1
4095
null
38
4205
In all contexts I am familiar with cross-validation it is solely used with the goal of increasing predictive accuracy. Can the logic of cross validation be extended in estimating the unbiased relationships between variables? While [this](http://dx.doi.org/10.1007/s10940-009-9077-7) paper by Richard Berk demonstrates t...
Can cross validation be used for causal inference?
CC BY-SA 2.5
null
2010-10-22T15:12:03.423
2012-05-02T18:57:33.890
2017-04-13T12:44:41.967
-1
1036
[ "cross-validation", "causality" ]
3894
1
null
null
5
677
I was wondering whether it's me mis-remembering something or is there a dimensionless measure of dispersion calculated as: range/(mean or median). Where range is a difference between max and min values. P.S. Could this be called "relative range"?
Is there a parameter that is calculated as a range to mean ratio?
CC BY-SA 2.5
null
2010-10-22T15:15:30.043
2010-10-22T15:33:55.257
2010-10-22T15:24:29.867
219
219
[ "distributions" ]
3895
2
null
3892
13
null
OLS ([ordinary least squares](http://en.wikipedia.org/wiki/Ordinary_least_squares)) assumes that the values represented by the horizontal distances are either predetermined by the experimenter or measured with high accuracy (relative to the vertical distances). When there is a question of uncertainty in the horizontal...
null
CC BY-SA 2.5
null
2010-10-22T15:16:37.303
2011-01-19T04:56:27.243
2011-01-19T04:56:27.243
919
919
null
3896
2
null
3894
2
null
The [coefficient of variation](http://en.wikipedia.org/wiki/Coefficient_of_variation) is defined as (standard deviation) / mean. Is that what you're thinking of??
null
CC BY-SA 2.5
null
2010-10-22T15:26:45.180
2010-10-22T15:26:45.180
null
null
449
null
3897
2
null
3894
3
null
The measure can be seen in a few publications. I can remember a paper by Lord (1947) using the range as an approximation to the standard deviation for the t-test. So the range to mean ratio would be an approximation to the coefficient of variation which onestop has mentioned already.
null
CC BY-SA 2.5
null
2010-10-22T15:33:55.257
2010-10-22T15:33:55.257
null
null
1573
null
3898
1
null
null
7
1871
I am working with a given factor model of the form $$y=B x +\epsilon$$ where $x$ is a random vector in $R^M$, $B$ is an $N\times M$ matrix of factor loadings, $y$ is a random vector in $R^N$ (with $N \gg M$) and $\epsilon$ is a vector of mean-zero innovations, independent of $x$. For simplicity, the innovations are no...
Factor Significance for Factor Model
CC BY-SA 2.5
null
2010-10-22T15:41:29.937
2012-09-19T06:30:07.777
2010-10-23T22:35:32.570
30
30
[ "hypothesis-testing", "factor-analysis" ]
3899
2
null
1053
4
null
I learned from Hosmer, Lemeshow & May ["Applied Survival Analysis: Regression Modeling of Time-to-Event Data"](https://rads.stackoverflow.com/amzn/click/com/0471754994) (2nd ed., 2008), which covers the basics. It also helped that I found a really cheap copy...
null
CC BY-SA 4.0
null
2010-10-22T16:15:02.407
2022-05-10T10:07:08.253
2022-05-10T10:07:08.253
53690
795
null
3900
2
null
3898
1
null
The short answer is: There is something you can do but I am not sure how meaningful it will be. The Long answer: I will give the long answer for a simple model where we have only one unknown latent factor. The idea carries over to the more general case albeit with more complications. It follows from your factor model ...
null
CC BY-SA 2.5
null
2010-10-22T16:21:05.233
2010-10-22T16:21:05.233
null
null
null
null
3901
2
null
2504
5
null
The counterexample is not relevant to the question asked. You want to test the null hypothesis that a sample of i.i.d. random variables is drawn from a distribution having finite variance, at a given significance level. I recommend a good reference text like "Statistical Inference" by Casella to understand the use and ...
null
CC BY-SA 2.5
null
2010-10-22T19:15:54.743
2010-10-22T19:15:54.743
null
null
30
null
3902
1
3906
null
1
1643
Does 'corr' function in Matlab consider correction for tied ranks while calculating Spearman correlation coefficient? Thanks.
Does corr function in Matlab consider correction for tied ranks?
CC BY-SA 2.5
null
2010-10-22T19:26:11.547
2019-06-29T08:19:46.140
2019-06-29T08:19:46.140
3277
1564
[ "correlation", "matlab", "ties" ]
3903
2
null
3892
1
null
Interesting Question. My answer would be that when we are fitting an OLS model we are implicitly and primarily trying to predict/explain the dependent variable at hand - the "Y" in the "Y vs X." As such, our main concern would be to minimize the distance from our fitted line to the actual observations with respect to t...
null
CC BY-SA 2.5
null
2010-10-22T20:36:49.587
2010-10-22T20:36:49.587
null
null
1501
null
3904
2
null
3734
168
null
I apologize in advance for the length of this post: it is with some trepidation that I let it out in public at all, because it takes some time and attention to read through and undoubtedly has typographic errors and expository lapses. But here it is for those who are interested in the fascinating topic, offered in the...
null
CC BY-SA 4.0
null
2010-10-22T21:11:42.460
2021-03-25T13:32:15.133
2021-03-25T13:32:15.133
919
919
null
3906
2
null
3902
3
null
looking in the `corr` function, I see that it calls `tiedrank`: ``` $ grep -B 1 tiedrank corr.m case 'k' % Kendall's tau [xrank, xadj] = tiedrank(xi,1); [yrank, yadj] = tiedrank(yj,1); -- case 's' % Spearman's rank correlation [xrank, xadj] = tiedrank(xi,0); [yrank,...
null
CC BY-SA 2.5
null
2010-10-23T00:16:03.480
2010-10-23T00:16:03.480
null
null
795
null
3907
1
4073
null
6
4375
We have prospective data from an observational registry and wish to consider the affects of a gene on time to cardiovascular events. The data includes standard data like age, gender, ... and also the date(age) of a cardio event. In general terms what are the conditions/assumptions/requirements of a starting time for su...
Start time requirements or assumptions for survival analysis
CC BY-SA 2.5
null
2010-10-23T01:00:11.397
2023-03-03T10:44:07.670
2010-10-24T16:31:20.160
null
1189
[ "regression", "survival" ]
3909
2
null
3893
18
null
This is a really interesting question and I don't offer any specific citations. However, in general, I'd say, NO, in and of itself, cross-validation does not offer any insight into causality. In absence of a designed experiment, the issue of causality is always uncertain. As you suggest, cross-validation can and wil...
null
CC BY-SA 2.5
null
2010-10-23T05:14:26.467
2010-10-24T18:29:37.743
2010-10-24T18:29:37.743
485
485
null
3910
2
null
3724
6
null
Use VAR (with n-1 denominator) when you wish to estimate the variance of the underlying population from the sample, or VARP (with n denominator) when the sample is the population. I find the name "population variance" quite ambiguous...
null
CC BY-SA 2.5
null
2010-10-23T06:00:07.847
2010-10-23T06:00:07.847
null
null
1679
null
3911
1
null
null
33
3525
If I understand correctly a confidence interval of a parameter is an interval constructed by a method which yields intervals containing the true value for a specified proportion of samples. So the 'confidence' is about the method rather than the interval I compute from a particular sample. As a user of statistics I ha...
When are confidence intervals useful?
CC BY-SA 2.5
null
2010-10-23T07:48:41.417
2011-06-07T12:24:47.820
2017-04-13T12:19:38.447
-1
1393
[ "confidence-interval", "interpretation" ]
3912
2
null
3911
15
null
I like to think of CIs as some way to escape the Hypothesis Testing (HT) framework, at least the binary decision framework following [Neyman](http://j.mp/awJEkH)'s approach, and keep in line with theory of measurement in some way. More precisely, I view them as more close to the reliability of an estimation (a differen...
null
CC BY-SA 2.5
null
2010-10-23T08:09:48.700
2010-10-23T08:17:26.293
2010-10-23T08:17:26.293
930
930
null
3913
2
null
3892
1
null
It possibly also relates to designed experiments - if x is a controlled quantity that is part of the experimental design, it is treated as deterministic; whilst y is the outcome, and is a random quantity. x might be a continuous quantity (eg concentration of some drug) but could be a 0/1 split (leading to a 2 sample ...
null
CC BY-SA 2.5
null
2010-10-23T08:22:28.610
2010-10-23T08:22:28.610
null
null
1680
null
3914
2
null
3911
7
null
An alternative approach relevant to your 2nd Q, "Are there ways of looking at confidence intervals, at least in some circumstances, which would be meaningful to users of statistics?": You should take a look at [Bayesian inference](http://en.wikipedia.org/wiki/Bayesian_statistics) and the resulting [credible intervals](...
null
CC BY-SA 2.5
null
2010-10-23T08:45:56.277
2010-10-23T08:45:56.277
null
null
449
null
3915
1
3916
null
12
3647
I am trying to assess a 20-item multliple choice test. I want to perform an item analysis such as can be found in [this example](http://www.utexas.edu/academic/ctl/assessment/iar/students/report/itemanalysis-example.php). So for each question I want the P-value and the correlation with the total, and the distribution...
Item Analysis for an R newbie
CC BY-SA 2.5
null
2010-10-23T11:19:34.040
2010-10-25T13:55:00.963
2010-10-25T13:55:00.963
930
1681
[ "r", "correlation", "psychometrics", "scales" ]
3916
2
null
3915
11
null
I can suggest you at least two packages that allow to perform these tasks: [psych](http://cran.r-project.org/web/packages/psych/index.html) (`score.items`) and [ltm](http://cran.r-project.org/web/packages/ltm/index.html) (`descript`). The [CTT](http://cran.r-project.org/web/packages/CTT/index.html) package seems also t...
null
CC BY-SA 2.5
null
2010-10-23T11:59:38.010
2010-10-23T19:56:24.563
2010-10-23T19:56:24.563
930
930
null
3917
2
null
3893
12
null
This is a good question, but the answer is definitely no: cross-validation will not improve causal inference. If you have a mapping between symptoms and diseases, cross-validation will help to insure that your model matches their joint distribution better than if you had simply fit your model to the entire raw data set...
null
CC BY-SA 2.5
null
2010-10-23T12:53:21.263
2010-10-23T12:53:21.263
null
null
303
null
3918
2
null
3911
3
null
To address your question directly: Suppose that you are contemplating the use of a machine to fill a cereal box with a certain amount of cereal. Obviously, you do not want to overfill/underfill the box. You want to assess the reliability of the machine. You perform a series of tests like so: (a) Use the machine to fill...
null
CC BY-SA 2.5
null
2010-10-23T13:06:45.637
2010-10-23T13:06:45.637
null
null
null
null
3919
2
null
3898
1
null
Just speaking on a practical level, in my discipline (psychology) I have never seen this done for pure factor analysis. That being said, the significance (fit really) of a statistical model is normally tested by the use of Structural Equation Modelling, where you attempt to reproduce the observed matrix of data from th...
null
CC BY-SA 2.5
null
2010-10-23T13:33:45.217
2010-10-23T13:33:45.217
null
null
656
null
3920
2
null
3915
8
null
The psych package function alpha produces what you are looking for. To export this, save the object and use the xtable function to produce LaTeX markup, which can then be formatted by any LaTeX editor.
null
CC BY-SA 2.5
null
2010-10-23T13:45:54.690
2010-10-23T13:45:54.690
null
null
656
null
3921
1
null
null
26
12545
What are good ways to visualize set of Likert responses? For example, a set of items inquiring about the importance of X to one's decisions about A, B, C, D, E, F & G? Is there something better than stacked bar charts? - What should be done with responses of N/A? How might they be represented? - Should the bar charts...
Visualizing Likert Item Response Data
CC BY-SA 2.5
null
2010-10-23T15:04:28.670
2013-08-11T20:36:17.530
2011-03-30T18:40:07.603
930
null
[ "data-visualization", "scales", "likert" ]
3922
2
null
3921
25
null
Stacked barcharts are generally well understood by non-statisticians, provided they are gently introduced. It is useful to scale them on a common metric (e.g. 0-100%), with a gradual color for each category if these are ordinal item (e.g. Likert). I prefer [dotchart](http://polisci.msu.edu/jacoby/research/dotplots/tpm/...
null
CC BY-SA 2.5
null
2010-10-23T15:11:30.267
2010-10-24T08:44:48.867
2010-10-24T08:44:48.867
930
930
null
3923
2
null
1576
13
null
For me (and I hope this is useful) factor analysis is much more useful than PCA. Recently, I had the pleasure of analysing a scale through factor analysis. This scale (although it's widely used in industry) was developed by using PCA, and to my knowledge had never been factor analysed. When I performed the factor ana...
null
CC BY-SA 3.0
null
2010-10-23T15:11:36.053
2013-06-25T00:14:55.990
2013-06-25T00:14:55.990
22047
656
null