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
4490
2
null
4489
21
null
Add `bty="n"` in both plot commands. For time series, add `frame.plot=FALSE` for the same effect. For fancier Tufte axes, see [http://www.cl.cam.ac.uk/~sjm217/projects/graphics/](http://www.cl.cam.ac.uk/~sjm217/projects/graphics/)
null
CC BY-SA 3.0
null
2010-11-13T02:04:40.637
2013-07-24T01:23:45.453
2013-07-24T01:23:45.453
159
159
null
4491
1
4494
null
2
1570
I'm using the following code to insert vertical lines in a timeseries plot: ``` abline(v=as.Date("2007-09-19"),col="red",lty=2) abline(v=as.Date("2008-03-10"),col="red",lty=2) abline(v=as.Date("2008-04-28"),col="red",lty=2) abline(v=as.Date("2009-08-07"),col="red",lty=2) ``` But I would rather prefer a small triangle ...
Inserting small arrows (triangles) in bottom axis pointing up with R
CC BY-SA 2.5
null
2010-11-13T03:08:04.377
2010-11-13T13:32:38.697
2010-11-13T09:21:23.217
930
990
[ "r", "data-visualization" ]
4492
2
null
4469
3
null
1) You can always find out exactly how an algorithm in SPSS is defined mathematically from the Algorithms link on the Help menu. 2) SPSS also has a Weighted Least Square procedure that allows you to model the error variance and correct for heteroscedasticity. 2) In order to run R within SPSS (version 16 or later), you ...
null
CC BY-SA 2.5
null
2010-11-13T03:18:29.467
2010-11-13T03:18:29.467
null
null
1971
null
4493
2
null
4489
4
null
If you use ``` par(bty = 'n') ``` Before calling plot that will fix it for zoo. It might also fix it for a variety of situations where it isn't passable to the plotting command. (Check out bty option in the par() help for other kinds of frames for the plot)
null
CC BY-SA 2.5
null
2010-11-13T03:19:10.860
2010-11-13T03:19:10.860
null
null
601
null
4494
2
null
4491
3
null
There's a variety of ways. You could use a pch = '^' and put that near the bottom or look up an arrow symbol character. Also you could just do what you're doing with the arrows() command and draw short arrows instead of abline(). With arrows you would need to specify both ends instead of just the horizontal position...
null
CC BY-SA 2.5
null
2010-11-13T03:28:41.470
2010-11-13T13:32:38.697
2010-11-13T13:32:38.697
601
601
null
4496
1
4509
null
3
2370
Consider the following code: ``` require(zoo) data <- read.csv(file="summary.csv",sep=",",head=TRUE) data = zoo(data$compressed, as.Date(data$date)) data <- aggregate(data, identity, tail, 1) days = seq(start(data), end(data), "day") data2 = na.locf(merge(data, zoo(,days))) par(bty = 'n') plot(data2,xlab='',ylab='entr...
Adjusting axis properties in a time series graph
CC BY-SA 3.0
null
2010-11-13T04:08:55.587
2016-12-30T08:28:47.977
2016-12-30T08:28:47.977
22047
990
[ "r", "data-visualization" ]
4497
2
null
3542
12
null
If you are interested in table design, I would definitely recommend two papers on the subject by Andrew Gelman: A necessary preface to the paper on table design is Gelman et al, 2002 [Let's practice what we preach: Turning Tables Into Graphs](http://www.stat.columbia.edu/~gelman/research/published/dodhia.pdf) Gelman a...
null
CC BY-SA 4.0
null
2010-11-13T05:24:16.083
2019-09-11T05:16:40.350
2019-09-11T05:16:40.350
1381
1381
null
4498
1
4502
null
39
9495
They all seem to represent random variables by the nodes and (in)dependence via the (possibly directed) edges. I'm esp interested in a bayesian's point-of-view.
What's the relation between hierarchical models, neural networks, graphical models, bayesian networks?
CC BY-SA 2.5
null
2010-11-13T05:43:15.703
2015-12-08T14:19:58.223
2010-11-13T20:33:21.760
930
1795
[ "causality", "neural-networks", "multilevel-analysis", "graphical-model" ]
4499
2
null
4491
0
null
You could manually construct the triangles using the 'polygon' command. There might be a nice way to automate the construction of these but depending on how many you want to make it probably wouldn't be too bad to figure out the coordinates by hand.
null
CC BY-SA 2.5
null
2010-11-13T06:03:11.923
2010-11-13T06:03:11.923
null
null
1028
null
4500
1
4506
null
7
790
Context: I've recently adopted version control as part of my data analysis work (finally I may hear you saying: see my [earlier question on SO](https://stackoverflow.com/questions/2712421/r-and-version-control-for-the-solo-data-analyst)). This prompted me to think more about repositories and the directory structure I u...
Repositories and data analysis projects
CC BY-SA 2.5
null
2010-11-13T06:26:43.493
2010-11-14T23:06:00.820
2017-05-23T12:39:26.593
-1
183
[ "reproducible-research", "project-management" ]
4501
1
4503
null
3
503
I've been thinking recently about conventions for figure width in data analysis reports that lead to PDFs (e.g., in A4 or Letter size). My usual context is R, Sweave, and LaTeX. The default figure width in Sweave is 80% of the text-width (i.e., the width of a paragraph of text). ``` \setkeys{Gin}{width=0.80\textwidth} ...
Typographic conventions for width of figures in LaTeX data analysis reports
CC BY-SA 2.5
null
2010-11-13T07:02:26.113
2017-05-18T21:19:05.927
2017-05-18T21:19:05.927
28666
183
[ "presentation" ]
4502
2
null
4498
34
null
A Bayesian network is a type of graphical model. The other "big" type of graphical model is a Markov Random Field (MRF). Graphical models are used for inference, estimation and in general, to model the world. The term hierarchical model is used to mean many things in different areas. While neural networks come with "g...
null
CC BY-SA 2.5
null
2010-11-13T08:37:26.060
2010-11-13T08:37:26.060
null
null
1540
null
4503
2
null
4501
7
null
I'll second @onestop comment about the fact that this question seems marginally related to statistical analysis or reporting. That being said, I can't refrain from thinking of Ed. Tufte's work on the display of quantitative information, especially the design of his books which mixes different graphics layouts: some fi...
null
CC BY-SA 2.5
null
2010-11-13T09:06:44.280
2010-11-13T10:18:47.823
2010-11-13T10:18:47.823
930
930
null
4504
2
null
4491
4
null
I prefer to use dedicated symbol for that purpose. For example, use `points()` with `pch=17` (filled triangle) like in the example below: ``` dd <- dotplot(m~i|p,data=res.EQ.long,subset=i %in% eq5d.items.names[1:5], ylab="Score",ylim=c(0.5,3.5), scales=list(x=list(rot=45,at=1:5, ...
null
CC BY-SA 2.5
null
2010-11-13T09:19:10.647
2010-11-13T09:19:10.647
null
null
930
null
4505
2
null
4498
10
null
As [@carlosdc](https://stats.stackexchange.com/questions/4498/whats-the-relation-between-hierarchical-models-neural-networks-graphical-model/4502#4502) said, a bayesian network is a type of Graphical Model (i.e., a directed acyclic graph (DAG) whose structure defines a set of conditional independence properties). [Hier...
null
CC BY-SA 2.5
null
2010-11-13T10:05:45.920
2010-11-13T10:05:45.920
2017-04-13T12:44:36.923
-1
930
null
4506
2
null
4500
5
null
Regarding your first question: > What strategies do people use to map studies, publications, and analyses onto repositories? One year ago or so, I decided to have one repository for each publication, presentation or semester/class. My typical directory looks like this: .git .gitignore README.org ana dat doc org The...
null
CC BY-SA 2.5
null
2010-11-13T11:37:51.957
2010-11-13T11:37:51.957
2017-05-23T12:39:26.203
-1
307
null
4507
1
4514
null
5
956
Let $G = (V,E)$ be a directed acyclic graph. Let $i \rightarrow j$ be an edge such that the parents of $j$ are exactly: - the parents of $i$, - and $i$. Let $L\left(G \right)$ be the set defined by {a vertex and its parents, for all vertices in $G$} Let $G' = (V,F)$ where $F$ is $E$ with $j \rightarrow i$ in...
Factorization of a joint density over a directed graph
CC BY-SA 2.5
null
2010-11-13T13:41:20.420
2019-04-29T20:08:37.633
2010-11-13T21:21:50.660
1351
1351
[ "distributions", "data-visualization", "self-study", "graphical-model" ]
4508
2
null
4496
2
null
For the first question try: ``` plot(data2,xlab='',ylab='entropy (bytes)', xaxs = 'i', yaxs = 'i') ```
null
CC BY-SA 2.5
null
2010-11-13T16:04:13.600
2010-11-13T16:54:51.440
2010-11-13T16:54:51.440
1050
1050
null
4509
2
null
4496
2
null
For the second Q, you can use `axis.Date()` with argument `labels = FALSE` to add minor tick marks at locations defined by argument `at`.
null
CC BY-SA 2.5
null
2010-11-13T17:28:45.037
2010-11-13T17:28:45.037
null
null
1390
null
4510
1
4511
null
2
18651
I have fit a linear model using the `lm` function in R... ``` model <- lm(trans.baseline.CD4 ~ hiv$Julian.Date) ``` ... and I would like to assess the quality of the model's fit. Is there a function in R that will do this? Alternatively, I found a formula for goodness-of-fit involving the sum of squared residuals give...
How to compute goodness of fit for a linear model in R
CC BY-SA 2.5
null
2010-11-13T17:47:12.277
2010-11-13T18:17:03.820
2010-11-13T18:17:03.820
930
1973
[ "r", "regression", "goodness-of-fit" ]
4511
2
null
4510
7
null
It all starts with ``` summary(model) ``` after your fit. There are numerous commands to assess the fit, test commands, compare alternative models, ... in base R as well as in add-on packages on CRAN. But you may want to do some reading, for example with Dalgaard's book or another introduction to statistics with R...
null
CC BY-SA 2.5
null
2010-11-13T17:56:39.150
2010-11-13T17:56:39.150
null
null
334
null
4512
2
null
4510
1
null
You should probably take a look at this: [https://stackoverflow.com/questions/1181025/goodness-of-fit-functions-in-r](https://stackoverflow.com/questions/1181025/goodness-of-fit-functions-in-r)
null
CC BY-SA 2.5
null
2010-11-13T17:59:01.260
2010-11-13T17:59:01.260
2017-05-23T12:39:26.150
-1
1540
null
4513
1
null
null
5
327
Can you give me examples of machine learning algorithms which learn from the statistical properties of the dataset not the individual observations itself i.e. employ the statistical query model?
Statistical query model algorithms?
CC BY-SA 2.5
null
2010-11-13T21:43:52.613
2017-01-04T13:16:06.610
null
null
1961
[ "machine-learning", "algorithms" ]
4514
2
null
4507
5
null
What you are looking for is termed a covered edge reversal, which preserves Markov equivalence of directed acyclic graphs. A proof of equivalence is given in Lemma 1 of [A Transformational Characterization of Equivalent Bayesian Network Structures](http://research.microsoft.com/pubs/65664/uai95.pdf), by Max Chickering....
null
CC BY-SA 2.5
null
2010-11-13T22:15:43.690
2010-11-13T22:15:43.690
null
null
495
null
4515
1
null
null
4
534
Lets say we have $T$ tags and $N$ articles and lets say that for each tag $t_{i}$ we know that it has tagged $n_{i}$ articles. Meaning that, frequency($t_{i}$)=$n_{i}$. Given the above information how could I compute the probability P($t_{i}$ to tag a new article) or more generally how could I go about scoring the "imp...
How to measure/weight the importance of tags?
CC BY-SA 3.0
null
2010-11-13T22:59:12.890
2017-11-09T14:10:58.733
2017-11-09T14:10:58.733
101426
null
[ "probability", "predictive-models", "data-mining" ]
4516
2
null
4396
2
null
Actually, if you want ranks, try the RANK command. Or use the menus: Transform>Rank Cases. It can generate ranks within groups. If you prefer the AGGREGATE approach, note that it does NOT require sorting first. HTH, Jon Peck
null
CC BY-SA 2.5
null
2010-11-13T23:21:12.727
2010-11-13T23:21:12.727
null
null
1971
null
4517
1
4518
null
70
201451
Is it possible to have a (multiple) regression equation with two or more dependent variables? Sure, you could run two separate regression equations, one for each DV, but that doesn't seem like it would capture any relationship between the two DVs?
Regression with multiple dependent variables?
CC BY-SA 2.5
null
2010-11-14T02:50:03.993
2022-02-24T14:36:28.833
null
null
1977
[ "regression" ]
4518
2
null
4517
40
null
Yes, it is possible. What you're interested is is called "Multivariate Multiple Regression" or just "Multivariate Regression". I don't know what software you are using, but you can do this in R. [Here's a link that provides examples](https://web.archive.org/web/20181024155136/http://www.public.iastate.edu/%7Emaitra/s...
null
CC BY-SA 4.0
null
2010-11-14T03:32:24.503
2022-02-24T14:28:42.420
2022-02-24T14:28:42.420
11887
485
null
4519
1
5931
null
3
1545
I plotted a set of about 200,000 points and got a triangular shaped region. The shape is roughly like the triangle made by the points $(1,0)$, $(0,1)$ and $(0,0)$. My points have the property that if $(a,b)$ is a member of the set, then $(b,a)$ is also a member. I wanted to do a regression on the variable associated...
Regression on a triangular shaped region of points representing a symmetric relation
CC BY-SA 2.5
null
2010-11-14T05:28:34.397
2011-01-03T19:53:37.627
2010-11-14T20:50:03.263
847
847
[ "regression" ]
4520
2
null
4515
1
null
First for calculating the importance of each tag in a new article I would use the bag of words format to store the corpus information plus the new article added to the last row. I would calculate the tf-idf of the sparse matrix containing the rows with articles and the columns with words. Then I would just Keep the col...
null
CC BY-SA 2.5
null
2010-11-14T09:40:39.110
2010-11-14T09:40:39.110
null
null
1808
null
4521
2
null
4517
2
null
I would do this by first transforming the regression variables to PCA calculated variables, and then I would to the regression with the PCA calculated variables. Of course I would store the eigenvectors to be able to calculate the corresponding pca values when I have a new instance I wanna classify.
null
CC BY-SA 2.5
null
2010-11-14T09:43:19.713
2010-11-14T09:43:19.713
null
null
1808
null
4522
2
null
4517
-4
null
It's called structural equation model or simultaneous equation model.
null
CC BY-SA 2.5
null
2010-11-14T10:44:06.097
2010-11-14T10:44:06.097
null
null
1966
null
4523
1
4524
null
1
742
The following code: ``` require(zoo) data <- read.csv(file="summary.csv",sep=",",head=TRUE) cum = zoo(data$dcomp, as.Date(data$date)) data = zoo(data$compressed, as.Date(data$date)) data <- aggregate(data, identity, tail, 1) cum <- aggregate(cum, identity, sum, 1) days = seq(start(data), end(data), "day") data2 = na....
Tweaking axis properties in a timeseries graph
CC BY-SA 2.5
null
2010-11-14T16:21:47.483
2010-11-14T17:28:03.050
null
null
990
[ "r", "data-visualization" ]
4524
2
null
4523
3
null
Two quick suggestions: - axis.Date() has a format field, set it to `"%Y/%m" to get '2007/07' (but then for all labels) - See help(axTicks) and help(rug) which should help you. Also try the [xts](http://packages.r-project.org/package=xts) package which extends the [zoo](http://packages.r-project.org/package=zoo) pac...
null
CC BY-SA 2.5
null
2010-11-14T17:28:03.050
2010-11-14T17:28:03.050
null
null
334
null
4525
2
null
4500
2
null
I keep a separate repository for each project, with a project being centered around a particular data set or question being addressed. The repo contains the data, code, and Sweave documents/plots that explain and express the results. I maintain a separate repo for each discrete publication or presentation because - A ...
null
CC BY-SA 2.5
null
2010-11-14T17:50:08.343
2010-11-14T17:50:08.343
null
null
1916
null
4526
2
null
4453
5
null
To avoid the ambiguity of a terminology that refers to everything as an "item," let's suppose the set $S$ consists of $n$ distinct "letters." And, because this is a pretty generalization of the Birthday Paradox, let's generalize it a little further and set $P$ to be the set of all $r$-letter words having all distinct ...
null
CC BY-SA 2.5
null
2010-11-14T19:02:45.520
2010-11-30T18:21:49.360
2010-11-30T18:21:49.360
919
919
null
4527
1
4588
null
0
1535
I am exploring the use of the `survreg` function in R to analyze my current experiment. Does anyone know what the "Value" column in the output of the function stands for?
What is the "Value" output of Survreg in R?
CC BY-SA 2.5
null
2010-11-14T19:55:14.707
2010-11-16T11:37:33.347
2010-11-14T19:59:53.407
930
1862
[ "r", "survival", "interpretation" ]
4528
1
4534
null
18
30326
I have been trying to discern what exactly the "coef" and "(exp)coef" output of coxph signify. It seems that the "(exp)coef" are comparisons of the first variable in the model according to the group assigned in the command. How does the coxph function arrive at the values for "coef" and "(exp)coef"? Additionally, how ...
What is the difference between the "coef" and "(exp)coef" output of coxph in R?
CC BY-SA 2.5
null
2010-11-14T20:39:07.227
2010-11-15T22:25:52.023
null
null
1862
[ "r", "survival", "interpretation" ]
4529
2
null
4528
8
null
To quote the documentation for the print method for a coxph object, obtained in R by typing `?survival::print.coxph`: > coefficients the coefficients of the linear predictor, which multiply the columns of the model matrix. That's all the documentation the author of the package provides. The package contains no us...
null
CC BY-SA 2.5
null
2010-11-14T21:10:23.387
2010-11-14T21:10:23.387
null
null
449
null
4530
1
null
null
4
12457
Yesterday, I ran a repeated-measures ANCOVA. The purpose was to determine the usability of two computer systems, call them 1 and 2. Each subject completed three (conceptually different) tasks, call them A B and C, on each system. (The covariate was whether the subject had prior experience with the current system, sy...
When to interpret multivariate tests when performing repeated-measures ANCOVA?
CC BY-SA 3.0
null
2010-11-14T21:14:33.743
2011-10-03T05:24:24.107
2011-10-03T05:24:24.107
183
1977
[ "anova", "spss", "multivariate-analysis", "manova" ]
4531
2
null
4530
8
null
This is not a complete answer as ANOVA with repeated-measures is a complex topic. You can look at your design from a multivariate point of view if you regard your data not as representing realisations of one DV in different conditions, but of (ultimately) different DVs which are to be analysed simultaneously. (Note tha...
null
CC BY-SA 2.5
null
2010-11-14T22:29:08.370
2010-11-14T22:54:11.630
2010-11-14T22:54:11.630
1909
1909
null
4534
2
null
4528
25
null
If you have a single explanatory variable, say treatment group, a Cox's regression model is fitted with `coxph()`; the coefficient (`coef`) reads as a regression coefficient (in the context of the Cox model, described hereafter) and its exponential gives you the hazard in the treatment group (compared to the control or...
null
CC BY-SA 2.5
null
2010-11-15T00:02:10.313
2010-11-15T22:25:52.023
2017-04-13T12:44:45.640
-1
930
null
4535
2
null
4530
5
null
Your question brings up a substantial problem with SPSS... too much automatic output. You are absolutely correct in your implication that the automatic generation of multiple tests is problematic. Some people take the fact that their computer program does this as evidence that it is good procedure. It isn't. Trust ...
null
CC BY-SA 2.5
null
2010-11-15T00:28:09.360
2010-11-15T00:28:09.360
null
null
601
null
4536
2
null
4517
10
null
@Brett's response is fine. If you are interested in describing your two-block structure, you could also use [PLS regression](http://en.wikipedia.org/wiki/Partial_least_squares_regression). Basically, it is a regression framework which relies on the idea of building successive (orthogonal) linear combinations of the va...
null
CC BY-SA 2.5
null
2010-11-15T00:34:37.603
2010-11-15T00:34:37.603
null
null
930
null
4537
2
null
3242
3
null
If you're interested in bivariate power-law functions (as opposed to univariate power-law distributions), then Warton et al. "[Bivariate line-fitting methods for allometry](http://www.maths.unsw.edu.au/statistics/files/preprint-2005-02.pdf)." Biol. Rev. 81, 259-201 (2006) is an excellent reference. In this case, regres...
null
CC BY-SA 2.5
null
2010-11-15T06:44:49.957
2010-11-15T06:44:49.957
null
null
null
null
4538
2
null
4364
9
null
Let $\eta$ and $\xi$ be two independent random variables with a common symmetric distribution such that $$ P\left ( \left |\frac{\xi+\eta}{\sqrt{2}}\right | \geq t \right )\leq P(|\xi|\geq t).$$ Then these random variables are gaussian. (Obviously, if the $\xi$ and $\eta$ are centered gaussian, it is true.) This is ...
null
CC BY-SA 2.5
null
2010-11-15T07:06:37.643
2010-11-15T15:07:17.930
2010-11-15T15:07:17.930
919
223
null
4539
1
4541
null
5
10987
I have kinda puzzled when I heard from the other about the calculation of incidence rate From Kenneth Rothman's Modern Epidemiology, the incidence rate is calculated as `number of cases in a fix period of time` divided by `person-time at risk at that period of time`, which mean if the patient has the disease in the mid...
Calculation of incidence rate for epidemiological study in hospital
CC BY-SA 2.5
null
2010-11-15T10:23:55.267
2011-08-15T13:31:32.683
2010-11-15T11:57:43.427
449
588
[ "epidemiology", "definition" ]
4540
2
null
4539
1
null
I think Rothman's definition should be used. In the second definition all patients seem to be given the same duration (is this correct?) so that the incidence will not be the incidence rate but will be proportional to the cumulative incidence (cases / total in given time frame)
null
CC BY-SA 2.5
null
2010-11-15T11:16:20.133
2010-11-15T11:16:20.133
null
null
1573
null
4541
2
null
4539
4
null
It is commonly admitted that the denominator for IRs is the "population at risk" (i.e., all individuals in which the studied event(s) may occur). Although your first formula is generally used, I found in The new public health, by Tulchinsky and Varavikova (Elsevier, 2009, 2nd. ed., [p. 84](http://books.google.fr/books?...
null
CC BY-SA 2.5
null
2010-11-15T11:33:03.200
2010-11-15T11:33:03.200
null
null
930
null
4542
1
4593
null
4
198
After running a study based on interactive genetic algorithms, I have a univariate data file containing multiple participants each doing multiple generations (blocks) of multiple trials. Is there an established approach used to analyse this? I've looked at using a grand mean on each of the component variables. I've als...
Are there any recommended approaches for analysing data from genetic algorithms?
CC BY-SA 2.5
null
2010-11-15T16:23:13.670
2010-11-16T17:23:45.307
null
null
1950
[ "genetic-algorithms" ]
4543
1
4554
null
11
4636
I am fitting a linear model in R using `glmnet`. The original (non-regularized) model was fitted using `lm` and did not have a constant term (i.e. it was in the form `lm(y~0+x1+x2,data)`). `glmnet` takes a matrix of predictors and a vector of responses. I've been reading `glmnet` documentation, and can find no mention ...
In R, does "glmnet" fit an intercept?
CC BY-SA 2.5
null
2010-11-15T16:35:22.907
2010-11-15T20:54:46.520
2010-11-15T20:54:46.520
439
439
[ "r", "regression", "lasso" ]
4544
1
4549
null
29
47692
Please provide R code which allows one to conduct a between-subjects ANOVA with -3, -1, 1, 3 contrasts. I understand there is a debate regarding the appropriate Sum of Squares (SS) type for such an analysis. However, as the default type of SS used in SAS and SPSS (Type III) is considered the standard in my area. Thu...
How does one do a Type-III SS ANOVA in R with contrast codes?
CC BY-SA 2.5
null
2010-11-15T17:01:36.680
2018-05-06T10:35:31.813
2011-09-13T20:14:59.197
442
196
[ "r", "anova", "contrasts", "sums-of-squares" ]
4545
2
null
4544
10
null
You may want to have a look at this blog post: [Obtaining the same ANOVA results in R as in SPSS - the difficulties with Type II and Type III sums of squares](http://myowelt.blogspot.com/2008/05/obtaining-same-anova-results-in-r-as-in.html) (Spoiler: add `options(contrasts=c("contr.sum", "contr.poly"))` at the beginnin...
null
CC BY-SA 2.5
null
2010-11-15T17:30:52.187
2010-11-15T17:30:52.187
null
null
582
null
4546
2
null
4288
1
null
I'm not sure I understand your question, but you have no other answers, so I thought I'd give it a shot and revive this topic: If I understand you correctly for a number of different sampling units (say people) you have estimates that they have given attribute, e.g. there is a probability that they have eaten turkey t...
null
CC BY-SA 2.5
null
2010-11-15T17:36:43.753
2010-11-17T05:28:47.827
2010-11-17T05:28:47.827
196
196
null
4547
2
null
4462
11
null
The median of medians is not the same as the median of the raw scores. A simple case of this is that when you have an odd number of sales, the median is the middle value; when you have an even number of sales, the median is commonly taken as the average between those two values. A more "real world" challenge to this i...
null
CC BY-SA 2.5
null
2010-11-15T17:50:20.730
2010-11-15T17:50:20.730
null
null
196
null
4548
2
null
4451
1
null
A good resource for finding datasets is: [/r/datasets](http://datasets.reddit.com) on Reddit. A quick glance at that page reveals [this source](http://networkdata.ics.uci.edu/resources.php), which might contain something useful for you.
null
CC BY-SA 2.5
null
2010-11-15T18:07:57.280
2010-12-10T05:46:27.450
2010-12-10T05:46:27.450
115
115
null
4549
2
null
4544
25
null
Type III sum of squares for ANOVA are readily available through the `Anova()` function from the [car](http://cran.r-project.org/web/packages/car/index.html) package. Contrast coding can be done in several ways, using `C()`, the `contr.*` family (as indicated by @nico), or directly the `contrasts()` function/argument. T...
null
CC BY-SA 2.5
null
2010-11-15T18:26:07.910
2010-11-15T18:26:07.910
null
null
930
null
4550
2
null
4544
3
null
Try the Anova command in the car library. Use the type="III" argument, as it defaults to type II. For example: ``` library(car) mod <- lm(conformity ~ fcategory*partner.status, data=Moore, contrasts=list(fcategory=contr.sum, partner.status=contr.sum)) Anova(mod, type="III") ```
null
CC BY-SA 2.5
null
2010-11-15T18:31:59.447
2010-11-15T18:31:59.447
null
null
101
null
4551
1
null
null
254
27187
I'm a grad student in psychology, and as I pursue more and more independent studies in statistics, I am increasingly amazed by the inadequacy of my formal training. Both personal and second hand experience suggests that the paucity of statistical rigor in undergraduate and graduate training is rather ubiquitous within ...
What are common statistical sins?
CC BY-SA 3.0
null
2010-11-15T18:46:37.113
2022-12-07T12:54:23.950
2016-08-11T17:17:48.537
22468
364
[ "fallacy" ]
4552
2
null
4551
25
null
Correlation implies causation, which is not as bad as accepting the Null Hypothesis.
null
CC BY-SA 2.5
null
2010-11-15T18:56:19.547
2010-11-15T18:56:19.547
null
null
1307
null
4553
2
null
4551
42
null
Dichotomization of a continuous predictor variable to either "simplify" analysis or to solve for the "problem" of non-linearity in the effect of the continuous predictor.
null
CC BY-SA 2.5
null
2010-11-15T18:57:56.170
2010-11-15T21:25:05.107
2010-11-15T21:25:05.107
364
364
null
4554
2
null
4543
13
null
Yes, an intercept is included in a [glmnet](http://cran.r-project.org/web/packages/glmnet/index.html) model, but it is not regularized (cf. [Regularization Paths for Generalized Linear Models via Coordinate Descent](http://www-stat.stanford.edu/~jhf/ftp/glmnet.pdf), p. 13). More details about the implementation could c...
null
CC BY-SA 2.5
null
2010-11-15T19:02:36.613
2010-11-15T19:02:36.613
null
null
930
null
4555
2
null
4551
23
null
Analysis of rate data (accuracy, etc) using ANOVA, thereby assuming that rate data has Gaussian distributed error when it's actually binomially distributed. [Dixon (2008)](http://dx.doi.org/10.1016/j.jml.2007.11.004) provides a discussion of the consequences of this sin and exploration of more appropriate analysis appr...
null
CC BY-SA 2.5
null
2010-11-15T19:12:03.287
2010-11-16T15:47:31.527
2010-11-16T15:47:31.527
364
364
null
4556
1
6724
null
8
117711
Having the Transfer Function of a discrete system as such: $$H(z) = \frac{0.8}{z(z-0.8)}$$ I am asked to find the Steady State Gain of the system. I have the solution and it simply states: Steady State Gain: $$H(1) = \frac{0.8}{1-0.8} = 4$$ I have no idea why this is the case, and the book, the slides, the solutio...
How to compute the steady state gain from the transfer function of a discrete time system?
CC BY-SA 2.5
null
2010-11-15T19:12:46.883
2018-01-12T15:20:02.297
2010-11-15T22:57:21.427
159
1994
[ "time-series", "self-study" ]
4557
2
null
4551
4
null
Application of least-squares minimization when maximum-likelihood procedures exist.
null
CC BY-SA 2.5
null
2010-11-15T19:16:20.850
2010-11-15T19:16:20.850
null
null
364
null
4558
2
null
4551
18
null
A current popular one is plotting 95% confidence intervals around the raw performance values in repeated measures designs when they only relate to the variance of an effect. For example, a plot of reaction times in a repeated measures design with confidence intervals where the error term is derived from the MSE of a r...
null
CC BY-SA 3.0
null
2010-11-15T19:26:09.143
2012-03-09T13:33:02.260
2012-03-09T13:33:02.260
601
601
null
4559
2
null
4517
0
null
Did you already come across the term "canonical correlation"? There you have sets of variables on the independent as well as on the dependent side. But maybe there are more modern concepts available, the descriptions I have are all of the eighties/nineties...
null
CC BY-SA 2.5
null
2010-11-15T19:59:37.720
2010-11-15T19:59:37.720
null
null
1818
null
4560
2
null
4551
14
null
My intro psychometrics course in undergrad spent at least two weeks teaching how to perform a stepwise regression. Is there any situation where stepwise regression is a good idea?
null
CC BY-SA 2.5
null
2010-11-15T20:01:39.920
2010-11-15T20:01:39.920
null
null
1118
null
4561
1
null
null
1
2927
For a university paper, I have to compare whether two program versions are statistically significantly different. The comparison in terms of runtime performance is straightforward -- I determine whether the confidence intervals for the two sets of measurements overlap. However, in the case of memory footprint, I have n...
Comparison of two values in a statistically sound manner
CC BY-SA 2.5
null
2010-11-15T20:14:11.647
2010-11-16T00:13:45.617
2010-11-15T22:58:10.100
159
1992
[ "hypothesis-testing", "statistical-significance", "self-study", "inference" ]
4562
2
null
4561
4
null
It is quite simple; memory footprint is constant, this means it has no deviation and thus any difference is significant.
null
CC BY-SA 2.5
null
2010-11-15T20:32:16.927
2010-11-15T20:32:16.927
null
null
null
null
4563
2
null
4551
14
null
Failing to test the assumption that error is normally distributed and has constant variance between treatments. These assumptions aren't always tested, thus least-squares model fitting is probably often used when it is actually inappropriate.
null
CC BY-SA 2.5
null
2010-11-15T21:39:05.163
2010-11-17T16:29:42.977
2010-11-17T16:29:42.977
319
101
null
4564
1
4763
null
7
446
It is known that [belief propagation](http://en.wikipedia.org/wiki/Belief_propagation) gives exact result on trees, are there interesting examples when [Generalized Belief Propagation](http://www.merl.com/publications/TR2001-22/) is exact? (edit junction tree is not interesting because it is exactly solvable without GB...
When is Generalized Belief Propagation exact?
CC BY-SA 2.5
null
2010-11-15T21:47:29.903
2010-11-20T23:51:23.590
2010-11-20T22:30:54.403
511
511
[ "graphical-model" ]
4566
2
null
4561
3
null
You're incorrect about the confidence intervals. Assuming they are 95% confidence intervals then they can overlap quite a bit and be statistically significantly different. What you need is for the confidence interval of the difference between the two to not overlap 0. The standard error of the difference is sqrt(2 *...
null
CC BY-SA 2.5
null
2010-11-16T00:13:45.617
2010-11-16T00:13:45.617
null
null
601
null
4567
2
null
4551
118
null
Most interpretations of p-values are sinful! The conventional usage of p-values is badly flawed; a fact that, in my opinion, calls into question the standard approaches to the teaching of hypothesis tests and tests of significance. Haller and Krause have found that statistical instructors are almost as likely as studen...
null
CC BY-SA 4.0
null
2010-11-16T00:15:32.840
2022-11-28T14:19:15.210
2022-11-28T14:19:15.210
362671
1679
null
4568
1
null
null
5
2880
Thanks for all the answer for the question [Calculation of incidence rate for epidemiological study in hospital](https://stats.stackexchange.com/questions/4539/calculation-of-incidence-rate-for-epidemiological-study-in-hospital). And here come's the second part of the question: What about the prevalence rate then? I ha...
Calculation of incidence rate for epidemiological study -- prevalence rate this time
CC BY-SA 3.0
null
2010-11-16T01:24:41.520
2012-12-28T12:39:49.547
2017-04-13T12:44:40.883
-1
588
[ "epidemiology", "definition" ]
4569
1
4577
null
9
11649
I would like to gather input from people in the field about the Yates continuity correction for 2 x 2 contingency tables. [The Wikipedia article](http://en.wikipedia.org/wiki/Yates%27_correction_for_continuity) mentions it may adjust too far, and is thus only used in a limited sense. The [related post here](https://sta...
Yates continuity correction for 2 x 2 contingency tables
CC BY-SA 3.0
null
2010-11-16T01:27:37.710
2017-11-12T21:25:54.187
2017-11-12T21:25:54.187
11887
696
[ "categorical-data", "chi-squared-test", "yates-correction" ]
4570
2
null
4551
5
null
I would say, doing tests and regressions on a small set of data. Edit: Without looking at the confidence intervals, or when the confidence intervals/error bars are not easy to calculate.
null
CC BY-SA 2.5
null
2010-11-16T02:30:58.087
2010-11-19T09:35:48.883
2010-11-19T09:35:48.883
1709
1709
null
4571
2
null
4569
3
null
If you have counts low enough that the Yates Correction is a worry (as in your example), you probably should be using Fisher's exact test. Otherwise, I recommend that after you use the chi-square test on a 2x2 table, you confirm your test with a log odds-ratio z-test.
null
CC BY-SA 2.5
null
2010-11-16T02:48:09.623
2010-11-16T02:48:09.623
null
null
5792
null
4572
2
null
4551
26
null
The one that I see quite often and always grinds my gears is the assumption that a statistically significant main effect in one group and a non-statistically significant main effect in another group implies a significant effect x group interaction.
null
CC BY-SA 3.0
null
2010-11-16T02:49:20.940
2014-07-01T16:47:32.577
2014-07-01T16:47:32.577
196
196
null
4573
2
null
4451
3
null
visit the Max Planck institute. They have also collected several datasets for OSNs.
null
CC BY-SA 2.5
null
2010-11-16T07:16:21.443
2010-11-16T07:16:21.443
null
null
null
null
4574
2
null
4551
8
null
(With a bit of luck this will be controversial.) Using a Neyman-Pearson approach to statistical analysis of scientific experiments. Or, worse, using an ill-defined hybrid of Neyman-Pearson and Fisher.
null
CC BY-SA 2.5
null
2010-11-16T07:52:02.757
2010-11-16T07:52:02.757
null
null
1679
null
4575
1
4576
null
15
4291
Are there good tutorials on object-oriented programming in R? It would be great if it included the following: - how to define a class; - differences between S3 and S4 classes; - operator overloading (I'd like to be able to write a+b where a and b are instances of the class I have in mind).
Tutorials on object-oriented programming in R
CC BY-SA 2.5
null
2010-11-16T08:10:48.690
2015-08-02T21:11:59.127
null
null
439
[ "r" ]
4576
2
null
4575
10
null
Hadley Wickham's wiki on [devtools](https://github.com/hadley/devtools/wiki/) is a great resource for the necessary information in a concise form. However, if you want an exhaustive resource, the R language manual's [OOP](http://cran.r-project.org/doc/manuals/R-lang.html#Object_002doriented-programming) section may be ...
null
CC BY-SA 3.0
null
2010-11-16T08:20:20.087
2015-08-02T21:11:59.127
2015-08-02T21:11:59.127
30351
1307
null
4577
2
null
4569
6
null
Yates' correction results in tests that are more conservative as with Fisher's "exact" tests. Here is an online tutorial on the use of [Yates’s continuity correction](http://faculty.london.edu/cstefanescu/Yates.pdf), by Stefanescu et al, which clearly points to various flaws of systematic correction for continuity (pp...
null
CC BY-SA 2.5
null
2010-11-16T08:22:44.013
2010-11-16T08:22:44.013
null
null
930
null
4578
2
null
4515
2
null
I am not absolutely sure what you want to achieve but I will give it a try. Measuring Importance The concept of importance without any target is rather ambiguous. Suppose you have the tags "football","crops" and "funny". Now want to create a classification algorithm to determine whether a certain article is in the cate...
null
CC BY-SA 2.5
null
2010-11-16T08:25:35.340
2010-11-16T08:25:35.340
null
null
264
null
4579
1
null
null
2
9871
My question is: plus or minus? Is the Lagrange function: - the objective PLUS lambda times constraints, or - the objective function MINUS lambda times constraints? Example: want to maximize A=xy subject to g(x,y)=2x+y-400=0 is F(x,y,lambda): - xy + lambda (2x+y-400), or - xy - lambda (2x+y-400) I found both no...
Is the Lagrange function objective plus lambda times constraints or objective minus lambda times constraints?
CC BY-SA 3.0
null
2010-11-16T08:27:45.800
2013-01-04T06:11:03.597
2012-11-10T02:07:00.883
183
null
[ "optimization" ]
4580
1
null
null
16
3983
Who of you in this forum uses ">R with the [multicore](http://cran.r-project.org/web/packages/multicore/index.html), [snow](http://cran.r-project.org/web/packages/snow/index.html) packages, or [CUDA](http://www.nvidia.com/object/cuda_home_new.html), so for advanced calculations that need more power than a workstation C...
Who uses R with multicore, SNOW or CUDA package for resource intense computing?
CC BY-SA 2.5
null
2010-11-16T08:28:42.500
2012-10-19T01:57:54.343
2010-11-16T21:05:51.823
930
2006
[ "r", "mathematical-statistics", "computational-statistics", "parallel-computing" ]
4581
2
null
4575
7
null
In addition to [@suncoolsu](https://stats.stackexchange.com/questions/4575/tutorials-on-object-oriented-programming-in-r/4576#4576) excellent response, there is [A (Not So) Short Introduction to S4](http://cran.r-project.org/doc/contrib/Genolini-S4tutorialV0-5en.pdf), by Christophe Genolini. It is available on CRAN web...
null
CC BY-SA 2.5
null
2010-11-16T08:30:14.563
2010-11-16T08:30:14.563
2017-04-13T12:44:55.360
-1
930
null
4582
2
null
4579
1
null
It is exactly the same! You want the constraint to be respected, and you don't care about the sign of g(x,y)
null
CC BY-SA 2.5
null
2010-11-16T09:27:03.307
2010-11-16T09:27:03.307
null
null
1709
null
4584
2
null
4580
4
null
Since you ask, I am using the [foreach](http://cran.r-project.org/web/packages/foreach/index.html) package with the [multicore](http://cran.r-project.org/web/packages/multicore/index.html) backend. I use it to split an [embarrassingly parallel](http://en.wikipedia.org/wiki/Embarrassingly_parallel) workload across multi...
null
CC BY-SA 2.5
null
2010-11-16T09:49:15.153
2010-11-16T09:49:15.153
null
null
439
null
4585
1
4586
null
6
3053
I was reading about [exponential smoothing](http://en.wikipedia.org/wiki/Exponential_smoothing) on Wikipedia. I saw a sentence saying that I could find the optimal parameter $\alpha$ by using the method of least squares. How do I go about doing that? Are there other ways I can find the right $\alpha$? Edit: Also, if...
Optimal parameter $\alpha$ for exponential smoothing using least squares
CC BY-SA 2.5
null
2010-11-16T09:52:30.103
2010-11-16T10:28:32.583
2010-11-16T10:28:32.583
159
847
[ "time-series", "estimation", "optimization" ]
4586
2
null
4585
7
null
Minimize the sum of squared one-step forecast errors. If $\hat{Y}_t$ is the prediction of $Y_t$ given $Y_1,\dots,Y_{t-1}$, then $e_t=Y_t-\hat{Y}_t$ is the one-step forecast error. So minimize $e_2^2+\cdots+e_n^2$. You can also use maximum likelihood estimation as discussed in [my Springer book](http://www.exponentialsm...
null
CC BY-SA 2.5
null
2010-11-16T10:04:36.643
2010-11-16T10:18:31.483
2010-11-16T10:18:31.483
159
159
null
4587
2
null
4580
3
null
I work in academy and I'm using multicore for some heavy benchmarks of machine learning algorithms, mostly on our Opteron based Sun Constellation and some smaller clusters; those are also rather embarrassingly parallel problems so multicore's main role is to spread computation over node without multiplication of memory...
null
CC BY-SA 2.5
null
2010-11-16T10:23:55.127
2010-11-16T10:23:55.127
null
null
null
null
4588
2
null
4527
1
null
The value column simply gives the values for the coefficient estimates.
null
CC BY-SA 2.5
null
2010-11-16T11:37:33.347
2010-11-16T11:37:33.347
null
null
1806
null
4589
2
null
4551
24
null
Especially in epidemiology and public health - using arithmetic instead of logarithmic scale when reporting graphs of relative measures of association (hazard ratio, odds ratio or risk ratio). More information [here](http://www.thelancet.com/journals/lancet/article/PIIS0140-6736%2810%2960541-7/fulltext).
null
CC BY-SA 2.5
null
2010-11-16T12:19:21.080
2010-11-16T12:19:21.080
null
null
22
null
4590
2
null
4551
47
null
Testing the hypotheses $H_0: \mu=0$ versus $H_1: \mu\neq 0$ (for example in a Gaussian setting) to justify that $\mu=0$ in a model (i.e mix "$H_0$ is not rejected" and "$H_0$ is true"). A very good example of that type of (very bad) reasoning is when you test whether the variances of two Gaussians are equal (or not) ...
null
CC BY-SA 3.0
null
2010-11-16T13:30:48.163
2011-09-22T15:00:43.493
2011-09-22T15:00:43.493
6432
223
null
4591
2
null
4341
5
null
Another option using Excel that gives you a fair amount of flexibility over the number & size of bins is the `=frequency(data_array, bins_array)` function. It is an array function that expects two arguments. The first argument is your data, the second is your bins that you define. Let's assume your data is in cells A1 ...
null
CC BY-SA 2.5
null
2010-11-16T14:27:29.113
2010-11-16T14:27:29.113
null
null
696
null
4592
2
null
4551
43
null
Not really answering the question, but there's an entire book on this subject: Phillip I. Good, James William Hardin (2003). Common errors in statistics (and how to avoid them). Wiley. ISBN [9780471460688](http://en.wikipedia.org/w/index.php?title=Special%3ABookSources&isbn=9780471460688)
null
CC BY-SA 2.5
null
2010-11-16T16:24:50.713
2010-11-16T16:24:50.713
null
null
449
null
4593
2
null
4542
3
null
The following approaches might be of interest. In (1) [http://www.chemoton.org/ref31.html](http://www.chemoton.org/ref31.html) a GA was used on image analysis but data was first treated. In order to treat the data, the GA was hybridized with K-means clustering, a well-know data classification procedure. Among classific...
null
CC BY-SA 2.5
null
2010-11-16T17:23:45.307
2010-11-16T17:23:45.307
null
null
null
null
4595
1
null
null
5
342
Genetic algorithms are avoided in econometry literature as often as possible, but still sometimes they are inevitable. The question is: Which well known models are the most difficult to estimate using conventional algorithms? (By Conventional algorithms I mean Gauss-Newton method, Levenberg–Marquardt algorithm, and so ...
Nonlinear models which are hard to estimate
CC BY-SA 2.5
null
2010-11-16T17:25:53.533
2021-07-22T13:45:46.400
2010-11-16T22:59:21.257
159
1643
[ "estimation", "genetic-algorithms", "nonlinear-regression", "optimization" ]