Questions tagged [sums-of-squares]
sum of squares plays an important role in statistical models based on the normal distribution, like ANOVA.
194
questions
0
votes
1
answer
14
views
Does Residual Sum of Squares always decreases with an additional independent variable? [duplicate]
^ What the question says. Trying to determine whether this statement is true or false.
0
votes
0
answers
8
views
Is there any formal proof that in R type-1 anova() run twice on 2 models with switched terms equals type-2 (looking at the last entry)?
I observed something interesting to me.
Let's assume that I have an unbalanced, additive model (no interactions) with 2 terms.
When I swap the order of the two terms and run type-1 ANOVA over them, ...
0
votes
1
answer
29
views
Synonyms of Residual Sum of Squares
As a novice, I'm finding it difficult to learn statistics, partly because there are often many different words for the same thing. When I'm reading about stats, I don't realize that the thing I'm ...
-3
votes
1
answer
398
views
"Normalized mean squared error" says WHAT?
I know that mean squared error is a public and popular metric to evaluate the efficiency of the model and architecture. Also, it is the tool to evaluate the result in such if, the ...
0
votes
0
answers
36
views
Why type III sum of squares is not recommended to use when there is significant interaction?
I did notice that in the following example, I obtained a insignificant main effect for treatment when including interaction, although the treatment is clearly effective.
Any intuitive explanation?
...
-1
votes
2
answers
87
views
Why calculate Mean Squared Error for Regression?
Once we fit the model to the points why is it necessary to find the mean squared error? What happens if I don't calculate Mean Squared Error?
1
vote
0
answers
27
views
Which type of sum of squares corresponds to the partition of variance formula for two-way ANOVA?
Does anyone have a good reference for the formula for type I and type III sum of squares in two-way ANOVA?
I learned the following formula for partition of total sum of squares in two-way ANOVA. Is it ...
1
vote
1
answer
569
views
The number of clusters in the K-means and the within-cluster SS
Given a collection of observatons $\{X_i\}_1^N$ and prespecify the number of clusters K. The K-means solves
$$
\underset{\{C_k\}_1^K}{\arg\min} \sum_{k=1}^K \sum_{i \in C_k}|| X_i - \mu_k||^2
$$
where ...
4
votes
1
answer
163
views
Conceptual/Math/brainteaser Question: Multiple Linear Regression
This is kind of a brainteaser and I'm struggling to solve it, any ideas on approaching this would be valued:
I thought about using substitution of the different x and z into the third regression ...
6
votes
1
answer
95
views
Confused: Why is lme4 changing techniques from Wald F tests to Wald Chisquare?
I've constructed some LMEMs that use dichotomous variables and their interactions as regressors, and I've become confused by the output. When I only assess a single interaction, using the code below (...
1
vote
0
answers
39
views
Fitting data to sums of squares of sinusoids
I am given some time series data $(t, y(t))$ sampled at regular intervals $t=0,s,2s,3s,\ldots,1$ for some step size $s$, obtained from a function
$$
y(t) = y(t, \vec A, \vec \delta) = \sum_{i=1}^N ...
0
votes
1
answer
41
views
Which type of sums of squares does lm-function in R use?
I ran a two-way ANCOVA in R:
ancova = lm(DV ~ IV1*IV2 + CV1 + CV2 + CV3, data = Data)
summary.aov(ancova)
Anybody know if this uses type III sums of squares?
I ...
2
votes
1
answer
25
views
How unbalanced is unbalanced for factorial ANOVA?
Colleagues and I conducted an experiment with participants randomly allocated to each condition using survey software. Unfortunately, the cell sizes ended up being more unbalanced than we anticipated: ...
10
votes
1
answer
855
views
Is least squares means (lsmeans) statistical nonsense?
I recently came accross this quote from Brian Ripley, who seems to be well-regarded as a statistician.
"Some of us feel that type III sum of squares and so-called ls-means are statistical ...
3
votes
1
answer
413
views
Proof that Regression Sum of Squares and Residual Sum of Squares are independent random variables
Having consulted a number of sources, I still can't find a complete proof that Regression Sum of Squares ($SS_{regression}$) and ($SS_{residual}$) are independent random variables. I'll be doubly ...
1
vote
1
answer
28
views
Shortcut for computing RSS at different split point when building regression trees?
I'm coding regression trees from scratch in R. For a given ordered predictor variable, $X$, obviously I have to compute the RSS at each unique ordered value of $X_i$. When moving over to the next ...
0
votes
1
answer
195
views
Why contrast in ANOVA has one degree of freedom?
I thought I understood the degree of freedom after reading Wikipedia explanation, but came across the sum of squares for contrasts $\{c_i\}$ $$SS_C = \frac{(\sum_i {c_i \bar{y_i}})^2}{\sum_i c_i^2 /...
1
vote
0
answers
213
views
Contrasts in ANOVA - need intuitions to understand its sum of squares and its degree of freedom
I have two questions about contrasts in ANOVA for testing the hypothesis that $\sum_i c_i y_i = 0$.
How is the sum of squares for contrasts $\{c_i\}$, $SS_C = \frac{(\sum_i {c_i \bar{y_i}})^2}{\sum_i ...
1
vote
0
answers
22
views
Distribution of the squared length of a multivariate normal vector [duplicate]
Let $\mathbf{X} \sim \mathcal{N}(\mathbf{\mu}, \mathbf{\Sigma})$ be a multivariate Normal variable with $d$ dimensions. I'm interested in the marginal distribution of $\|\mathbf{X}\|^2 = \sum_{i=1}^d ...
1
vote
1
answer
262
views
In a PCA setting, is there any relationship with the sum of squares of the scores (t1) with the eigenvalue of that principal component?
When one computes the vector of scores (t1) using the principal component (p1) the data is being projected over the direction of biggest variation. One could measure the distance between the point ...
3
votes
1
answer
132
views
What is the lowest sum of squared errors (sse) of a dataset?
Given $X \subset R^d$ a set of data points, $z \in R^d$ a vector, $SSE(X)=\sum_{i=1}^{|X|}||X_i-z||^2$, I wonder what is the best value of $z$ so that $SSE$ is the lowest?
I suspect that $z$ is the ...
1
vote
0
answers
35
views
How are terms in SS (corrected sum of squares) independent?
What does the highlighted test mean? How are the terms not independent? Can someone elaborate in detail?
0
votes
1
answer
166
views
Source for BIC with residual sum of squares?
Wikipedia states that under certain circumstances, $\mathrm{BIC} $ can be calculated as:
$$\mathrm{BIC} = n \ln(\mathrm{RSS}/n) + k \ln(n),$$
where $\mathrm{RSS}$ is the residual sum of squares. ...
1
vote
1
answer
159
views
Kruskal–Wallis one-way analysis of variance is related to what kind of regression?
One-way anova is similar to regular linear regression because both use the F-test which involves sums of squares among other reasons.
Is Kruskal–Wallis one-way analysis of variance similar to some ...
0
votes
0
answers
65
views
Difficulty with averaging corrected sample variances of different degrees of freedom:
I have a number of measurement samples of which some have 2 measurements and some have 3. I wish to make the most accurate estimation of population variance I can, and understand that ignoring data ...
3
votes
3
answers
1k
views
Residual sum of squares in a regression
I understand that in a linear regression model, the residual sum of squares will either remain same or fall with the addition of a new variable.
What if the two models were
$$
I \colon y_i=\...
2
votes
2
answers
765
views
Simplifying the Matrix Form of the Solution to Ridge Regression
I'm trying to understand how to obtain the solution to an objective function by solving for the parameter vector $\theta$ in ridge regression. I found an example here from Naomi which takes an example ...
1
vote
0
answers
968
views
What is the correct implementation of BIC with residual sum of squares?
BIC is most often calculated by maximizing the log likelihood function. However, it is also possible to calculate BIC with residual sums of squares. This is pretty easy to find online and not an issue ...
2
votes
0
answers
196
views
Formula for type III sum of squares of the intercept term in linear multiple regression
assume we have the regression model:
$$Y = b_0 + b_1 x_1 + \dots + b_k x_k + \varepsilon $$
I know the formulas for all type III sum of squares for the regression terms except the formula for SS of ...
6
votes
2
answers
163
views
Coefficient of determination relationship?
$R^2 = \frac{SSREG}{SSTOT}$ or $R^2 = 1-\frac{SSRES}{SSTOT}$
If $X$ is the predictor random variable for science SAT
and $Y$ is the predictor random variable science GPA
given by equation $$\hat Y =...
2
votes
1
answer
1k
views
Sum of Squared Error Chi-Square distribution degree of freedom in Multilinear Regression
In this link it says that $Y$ variables has zero covariance (because covariance matrix has only diagonal terms) which implies they are independent.
Actually in linear regression $Y$ takes its ...
0
votes
1
answer
645
views
What is the difference between the residual, lack of fit and pure error In F test for Regression Analysis?
What is the difference between the residual, lack of fit and pure error and how to calculate each of them in ANOVA F test for nonlinear regression?
2
votes
1
answer
184
views
Two way ANOVA, no difference between tests based on type I vs type II sums of squares
I'm learning about two way ANOVA possibly with interaction.
I'm following this tutorial http://www.sthda.com/english/wiki/two-way-anova-test-in-r
This is their code.
...
0
votes
1
answer
19k
views
Calculating SSE in R
I'm following the "Intro to Statistics" course in Data Camp and I'm having some trouble as it seems that the course is contradicting itself: https://s3.amazonaws.com/assets.datacamp.com/production/...
0
votes
0
answers
53
views
Why is regression line represented as $y = b0 + b1 * x$?
I am new to Data Science and ran into Regression Line formula which is
$ y = b0 + b1 *x $ (where x is dependent variable, y is predicted variable)
I understood the meaning of this formula as a ...
1
vote
1
answer
564
views
Better to Minimize Absolute Error or Sum of Squared Error?
I have an Excel model which predicts the number of customers for a given month. The prediction depends on a churn rate. I have the absolute error (actual vs predicted), along with squared error and ...
4
votes
1
answer
4k
views
Why error sum of squares has n-2 df (possibly not duplicate, please read on)? (Regression Question Series - Part 4)
In simple linear regression, the error sum of squares is given by
$$
\text{SSE} = \sum_{i=1}^n(y_i - \hat{y_i})^2 \\
\hat{\sigma}^2 = s^2 = \dfrac{\text{SSE}}{n-2}
$$
where $n-2$ is the degrees of ...
1
vote
1
answer
301
views
Minimize Logged Sum of Squares?
When numerically maximizing the likelihood function it is standard practice to do this indirectly by minimizing the negative log-likelihood. When numerically minimizing the residual sum of squares (...
3
votes
0
answers
132
views
R: anova(lm): What is the Sum Sq when we have two inputs
What is the formula to calculate the Sum sq column for the inputs?
Answers to some other questions state, that it should be
$RSS = \sum (\hat Y_i -\bar Y)^2$,
yet this is false, it only gives the ...
2
votes
2
answers
1k
views
Showing that $\sum_{i=1}^n (y_i-\hat{y_i})(\hat{y_i} - \bar{y}) = 0$ for the generalized linear model [closed]
Exercise :
Prove that for the generalized linear model, it is :
$$\sum_{i=1}^n (y_i-\hat{y_i})(\hat{y_i} - \bar{y}) = 0$$
Question : How would one proceed with proving that for the generalized ...
1
vote
1
answer
56
views
Squaring floats between -1 and 1 reduces sum of squares, so why do it? [duplicate]
I have been learning basic statistical testing as it relates to agriculture and have become familiar with the common practice of summing squared raw deviation values, whether in something simple like ...
2
votes
2
answers
340
views
Calculating F-statistic, why is SS used instead of just $r^2$?
The calculations and question are for a simple regression (one independent and one dependent variable).
SSres = SSy * (1 - $r^2$)
SSreg = SSy * $r^2$
F = (SSreg / DFreg)/(SSres / DFres)
So, I've ...
1
vote
1
answer
637
views
Understanding ANOVA as regression / type III SS in R
I'm confused about how type III SS are calculated for a "main effect". According to what I have read, Type III SS is calculated by evaluating the change in the SSE by removing only the variable in ...
0
votes
1
answer
1k
views
2-way ANOVA in Python statsmodels yields different Sum of Squares than SPSS
I am learning to use Python for my statistical analyses, and while figuring out how to perform a 2-way ANOVA with statsmodels I found that my Python code yielded slightly aberrant values. Comparing ...
2
votes
0
answers
205
views
In regression, when partitioning SS among predictors, what determines which predictors get the SS that can be attributed to more than one predictor?
In regression analysis, predictors sometimes correlate (and in my field, psychology, they always do; often because they are simply measurements of the same aspects of human psychology).
If predictors ...
6
votes
2
answers
2k
views
How should Type II SS be calculated in a mixed model?
I have a data set (and corresponding mixed model) which gets very different p-values for one of the two-way interactions when tested using Type I (sequential, taking care that it's last), and Type II (...
0
votes
0
answers
37
views
Deriving the F-test from ${{SSE_R-SSE_F}\over{(n-q)-(n-p)}}/{{SSE_F}\over{n-p}}$
Given a Full and Reduced model, the F-test to see if the reduced model is significant is given by
$$
{{SSE_R-SSE_F}\over{(n-q)-(n-p)}}/{{SSE_F}\over{n-p}}
$$
I'm trying to understand how this is ...
2
votes
0
answers
97
views
Find the Sum of Squares and using them complete an F-test for goodness of fit
I have this question ( would be grateful if someone could put it on for me)
https://gyazo.com/5afe5d7c9d12acdff8f9c55db74f97c9
And I am concerned with part b).
I know what $RSS = SSE$ is due to the ...
3
votes
1
answer
4k
views
Which one to choose Type-I, Type-II, or Type-III ANOVA? [duplicate]
I don't understand what the difference is between TypeI and TypeIII?
Since my background is not very mathematics, it's very difficult for me to understand this mathematical notation;
Type I SS: SS(A) ...
0
votes
1
answer
278
views
Does forward model selection by $R^2$ or SSR differ?
I'm trying to implement forward selection and need to add a feature only if it will make the sum of squared residuals (SSR) lower.
I am using Python's statsmodels ...