similar to: How does R compute sums of squares?

Displaying 20 results from an estimated 130 matches similar to: "How does R compute sums of squares?"

2011 Jan 03
1
Proof for computing sums of squares
Hi. I know that R computes sums of squares based on the diagonal of t(Q) %*% y %*% t(y) %*% Q, where Q comes from the QR-decomposition of the model matrix. Does anyone know where I can find a proof for this result? All Best and Happy New Year, Ethan [[alternative HTML version deleted]]
2010 Sep 29
2
FW: creating a custom background
Hi. I want to create a plot with Pantone654 as the background. The RGB for this color is (0,61,121), which corresponds to a hex of #003D79. How do I specify the bg parameter for this? All Best, Ethan [[alternative HTML version deleted]]
2010 Oct 20
1
Using Windows Tahoma Font for Graphics Text
Hi. I want to use the text() command to produce graphics text in the (Windows) font Tahoma, but I don't know how to do this. I appreciate any suggestions/ideas you may have. All Best, Ethan [[alternative HTML version deleted]]
2000 Mar 20
3
lm handling of ill-conditioned systems
The lm() function in R seems to handle the inversion of singular X'X matrices (where there is collinearity between regression inputs) in a way where one of the inputs is dropped and this also seems to be the default behavior in SAS (please let me know if i'm wrong about this). In some other packages (i.e. octave ols() function) the pseudo inverse is computed where singular values less
2010 Apr 29
1
randomness in stepclass (klaR) or lda (MASS) ?
Hi, a colleague ran a stepwise discriminant analysis twice in a row and got different results, suggesting some "sochasticity" in the algorithms involved. I looked at her data and found that there was a lot of collinearity, so that I reckoned that maybe "stepclass" (klaR) cannot find a clear winner when trying to include a new variable and makes a random choice. Is that true?
2004 Jun 24
0
tree model with at most one split point per variable
I would like to create a tree model with at most one split point per variable using tree, rpart or other routine. Its OK if a variable enters at more than one node but if it does then all splits for that variable should be at the same point. The idea is that I want to be able to summarize the data as binary factors with the chosen split points. I don't want to have three level or more
2012 Oct 09
1
car::linearHypothesis Sum of Sqaures Error?
I am working with a RCB 2x2x3 ANCOVA, and I have noticed a difference in the calculation of sum of squares in a Type III calculation. Anova output is a follows: > Anova(aov(MSOIL~Forest+Burn*Thin*Moisture+ROCK,data=env3l),type=3) Anova Table (Type III tests) Response: MSOIL Sum Sq Df F value Pr(>F) (Intercept) 22.3682 1 53.2141 3.499e-07 *** Forest
2012 Mar 15
6
Generation of correlated variables
Hi everyone. Based on a dependent variable (y), I'm trying to generate some independent variables with a specified correlation. For this there's no problems. However, I would like that have all my "regressors" to be orthogonal (i.e. no correlation among them. For example, y = x1 + x2 + x3 where the correlation between y x1 = 0.7, x2 = 0.4 and x3 = 0.8. However, x1, x2 and x3
2006 Feb 16
0
sums of absolute deviations about the median as split function in rpart
Dear R community, as stated in Breiman et.al. (1984) and De'Ath & Fabricius (2000) using sums of absolute deviations about the median as an impurity measure gives robust trees. I would like to use this method in rpart. Has somebody already tried this method in rpart? Is there maybe already a script available somewhere? I am aware of the possibility to define usersplits myself with
2009 Aug 22
2
how to check the MD5 sums ISO directory
Ok guys How do i check MD5 SUM in the ISO Directory Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20090822/eac4e80f/attachment-0003.html>
2008 Feb 29
1
Column sums from a data frame (without the column headers)
Does anyone know how to get a vector of column sum from a data frame? You can use colSums(), but this gives you a object of type "numeric" with the column labels in the first row, and the sums in the second row. I just want a vector of the sums, and I can't figure out a way to index the "numeric" object. Thanks!
2006 May 20
1
LiveCD different sums but file size match
Hello, I just downloaded the very great CentOS LiveCD and have some issue with the sum. when I do md5sum -c md5sum.livecd they simply don't match. But when check the size file with the file size posted by johnny in the announce http://lists.centos.org/pipermail/centos-announce/2006-May/012905.html They both match (in 717729792 bytes) Probably I am doing something wrong, just to be sure
2002 Dec 16
1
Partial Sums
Is it possible to calculate partial sums in R? I have the equation: Px = (k / x) * SUM_{from j >= x to infinity} Pj x=1,2,3,... where k is a parameter, Pj is the Poisson probability, and x is a rank. (This is for rank-frequency data.) In other words, the frequency of an entity at rank x depends on the sum of frequencies of all entities at ranks j > x. Many thanks, Andrew
2005 Oct 28
0
lm type of sums of squares
anova.lm() gives the sequential tests: > set.seed(1) > dat <- data.frame(y=rnorm(10), x1=runif(10), x2=runif(10)) > anova(lm(y ~ x1 + x2, dat)) Analysis of Variance Table Response: y Df Sum Sq Mean Sq F value Pr(>F) x1 1 1.1483 1.1483 2.0943 0.1911 x2 1 0.4972 0.4972 0.9068 0.3727 Residuals 7 3.8383 0.5483 > anova(lm(y ~ x2 + x1,
2005 Nov 08
1
Type II and III sums of squares with Error in AOV
I've recently run into the problem of using aov with nested factors, and wanting to get the type II and III sums of squares. Normally Anova from the car package would do fine, but it doesn't like having an Error included, so my.aov <-aov(Response ~ Treatment + Error(Treatment:Replicate)) Anova(my.aov, type="II") yields Error in Anova(nested.anova) : no applicable method
2006 Jun 15
1
Compact sums in functions definitions
I'm trying to make more compact the definition of a function as for example: f <- function(x) 2/x+3/x by simply defining the array of coefficients arr = c(2,3) and setting: g <- function(x) sum((arr/x)) Everything seems to work fine because the values returned by f and g result coincident for different values of their argument, but when I try to plot the function g using: x =
2007 Aug 20
1
Problem mit summaryBy: Group sums gives me "incorrectly" zero for one variable
Hi, first I want to thank all of you for the quick aid which is provided here on the list during all times. Thanks a lot for that! Then, I have a problem using summaryBy which most probably is a problem of wrong use by me or the like: I use this command: summaryBy(total+total.inf~gr, aE, FUN=sum) where aE is a > str(aE) 'data.frame': 127880 obs. of 16 variables: $ gr
2008 Aug 22
0
testing for differences in sums - how to?
If I want to test for a salesman effect on average sale, I model it as "Sale ~ Salesman". But what if I want to test for a salesman effect on total sales? How do I model that? Given a significant salesman effect, how do I follow up with the equivalent of Tukey's HSD to determine who the (indistinguishly) top salesmen are? If I add another factor, say "region" to the
2008 Sep 26
1
Using functions that contain sums
Hello, I'm trying to perform an integration on a function that contains a sum. Similarly I'm hoping whatever acts as a fix will be good enough to aid in a 2nd case as well but I've already put in a work-around for that situation. My code example is here: watermelon=c(0,1,2,3) w<-function(x){ sum(sin(x-watermelon))} integrate(function(x){w(x)},0,2)
2011 Sep 30
0
Data simulation for ANOVA decomposition into sums of squares
Dear listserv, Please consider the following dataset: x <- matrix(nrow = 8, ncol = 2) colnames(matrix) <- c("classification", "soluble_fiber") x[1:4,1] <- "bagel" x[5:8,1] <- "donut" How would I simulate a dataset for a one-way fixed-effect ANOVA (where "classification" is the treatment variable and "soluble_fiber" is the