search for: ssq

Displaying 20 results from an estimated 39 matches for "ssq".

Did you mean: ss
2006 Feb 14
0
ANOVA: Help with SSQ decomposition and contrasts
# Dear R list, # # A have a doubt about SSQ decomposition and contrasts with ANOVAs. # So, I would like a tip from more advanced R users. # Below my data, the basic script and my doubts: # Data r = paste('r', gl(3, 8), sep='') e = paste('e', rep(gl(2, 4), 3), sep='') tra = sort(paste('t', rep(1:6...
2006 Feb 16
0
SSQ decomposition and contrasts with ANOVA
Dear R list, Please, could someone help me with SSQ decomposition and contrasts. Below my data, graphic, ANOVAs and my doubt: # Data a = paste('a', gl(3, 8), sep='') b = paste('b', gl(2, 4, 24), sep='') tra = sort(paste('t', rep(1:6, 4), sep='')) y = c(26.2, 26.0, 25.0, 25.4, 24.8, 24.6, 26.7, 2...
2008 Jan 24
1
Calculating sum of squares from density estimates
...the sum of squares of these. As the x values of the estimates are not the same, and I would prefer not to restrict the estiomate to a certain range of x values, how can I do the calculation? Lets say: d1 <- density(Data1) d2 <- density(Data2) If the x values would be the same, I would: ssq <- sum( (d1$y - d2$y)^2 ) but as it isn't, I can't do that. is there an easy way to get the sum of squares? Thanks, Rainer
2008 Jan 26
2
using facet_grid() from ggplot2 with additional text in labels
Hi I am using ggplot2 at the moment and I must say it is definitely better then ggplot - good work. My problem is that I am using facet_grid() in the following way: > p <- ggplot(ssq, aes(x=year, y=-log(ssq))) > p + geom_point() + facet_grid(me*gi~cs*rz) and it works nicely, except that I would like to have, in naddition to the values of me, gi, cs and rz the name of the variable. I.e: if gi is 1, 2 and 3 I would like to have "gi = 1:", "gi = 2" and &...
2015 Mar 02
2
R-devel does not update the C++ returned variables
Hi, Within my R code, I am using a C++ function as below: overlaps <- matrix(0, nrow=B, ncol=length(N)) overlaps.P <- matrix(0, nrow=B, ncol=length(N)) .C("speedUp", D, S, pD, pS, nrow(D), as.integer(N), length(N), ssq[i], i, as.integer(B), overlaps, overlaps.P, DUP=FALSE) the function "speedUp", is supposed to update matrices overlaps and overlaps.P and it works with official R versions. However, using the same code in R-devel, it does not update matrices and they remain all zero without returning a...
2011 Jul 20
0
The C function getQ0 returns a non-positive covariance matrix and causes errors in arima()
...ues and that this gives a negative gain in the Kalman filter, which in turn gives a likelihood equal to NaN. Here is a reproducible example where I forced the use of 'ML'. > set.seed(1) > x <- arima.sim(100,model=list(ar=phi,ma=theta)) > KalmanLike(x,mod=out,fast=FALSE) $Lik ssq NaN $s2 ssq 0.971436 > arima(x,order=c(1,0,1),seasonal=list(period=12,order=c(1,0,0)),include.mean=FALSE,init=c(phi1,theta,phis),method='ML') Erreur dans optim(init[mask], armafn, method = optim.method, hessian = TRUE, : valeur non-finie fournie par optim If needed, I can...
2002 Jun 08
3
contour plot for non-linear models
...trace = T) > bc <- coef(storm.fm) > se <- sqrt(diag(vcov(storm.fm))) > dv <- deviance(storm.fm) > par(pty = "s") > b1 <- bc[1] + seq(-3*se[1], 3*se[1], length = 51) > b2 <- bc[2] + seq(-3*se[2], 3*se[2], length = 51) > bv <- expand.grid(b1,b2) > ssq <- function(b) + sum((Time - b[1]*Viscosity/(Wt-b[2]))^2) > dbetas <- apply( bv, 1 , ssq) > attach(stormer) > cc <- matrix(Time - rep(bv[,1],rep(23,2601)) * + Viscosity/(Wt - rep(bv[,2], rep(23, 2601))), 23) > dbetas <- matrix(drop(rep(1,23) %% cc^2), 51) > fstat <- ma...
2002 Nov 01
0
Re: gregmisc version 0.7.3 now available
> From: kjetil halvorsen [mailto:kjetilh at umsanet.edu.bo] > > Martin Hoyle wrote: > > > > Dear Greg, > > Thanks for the new release. The decomposition of the SSQ is > just what I need! > > > I thought decomposition of the SSQ can be obtained with the split= > argument to summary.aov? That argument seems tro be new --- it didnt > exist two years ago, and I was reacently made aware of it. > It might not be well known? You are correct t...
2005 Nov 24
2
type III sums of squares in R
...n R? Not that I would like to use them, I know they are problematic. I would like to know how to calculate them in order to demonstrate that strange things happen when you use them (for a course for example). I know you can use drop1(lm(), test="F") but for an lm(y~A+B+A:B), type III SSQs are only calculated for the A:B interaction. If I specify lm(y~A+B), it calculates type II SSQ for the main effects (as type III only differs from type II if interactions are included). Thus, this approach doesn't help. Another approach is the Anova(, type="III") function within...
2015 Mar 02
2
R-devel does not update the C++ returned variables
...es this work for my code with R but not R-devel? And another question is related to using .Call. Based on the manual page, I do not need to change the function parameters when using .Call. So I can run like this: .Call("sppedUp", D, S, pD, pS, nrow(D), as.integer(N), length(N), ssq[i], i, as.integer(B), overlaps, overlaps.P) But I am receiving the memory(?) related error: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Now that I am running the code using .Call. Thanks. On Mon, Mar 2, 2015 at 2:01 PM, Duncan Murdoch <mur...
2015 Mar 02
0
R-devel does not update the C++ returned variables
...ed in the NEWS file. > And another question is related to using .Call. Based on the manual > page, I do not need to change the function parameters when using > .Call. So I can run like this: > .Call("sppedUp", D, S, pD, pS, nrow(D), as.integer(N), length(N), > ssq[i], i, as.integer(B), overlaps, overlaps.P) > > But I am receiving the memory(?) related error: > terminate called after throwing an instance of 'std::bad_alloc' > what(): std::bad_alloc > Now that I am running the code using .Call. Code using .Call is quite different fr...
2002 Oct 31
1
Re: gregmisc version 0.7.3 now available
Dear Greg, Thanks for the new release. The decomposition of the SSQ is just what I need! Regards, Martin. Martin Hoyle, School of Life and Environmental Sciences, University of Nottingham, University Park, Nottingham, NG7 2RD, UK Webpage: http://myprofile.cos.com/martinhoyle >>> gregory_r_warnes at groton.pfizer.com 10/30/02 07:16PM >>> Versi...
2016 Mar 10
2
Introduction and Doubts
...combined into the final result. Further, the approach induces during execution a dynamic hierarchical grid that will better fit the dataset w.r.t. classical grid approaches that exploit a fixed grid instead. Finally, the algorithm exploits the analytical properties of the Quadratic Sums of Squares (SSQ in the following) function to minimize the cost of merge and split operations. you can refer the paper for more details about time complexity and performance http://web.cs.ucla.edu/~zaniolo/papers/chp%253A10.1007%252F978-3-642-37456-2_10.pdf for implementing it,we can use Documentsource class in...
2010 Jan 12
2
optimization challenge
I have a challenge that I want to share with the group. This is not homework (but I may assign it as such if I teach the appropriate class again) and I have found one solution, so don't need anything urgent. This is more for fun to see if others can find a better solution than I did. The challenge: I want to read a book in a given number of days. I want to read an integer number of
2005 Oct 26
2
AOV with repeated measures
...ith repeated measurements. I have 2 species with several strains (12) per species, each of which has been measured twice with for a given trait. No particular covariance, just two measures. Now I want to analyze the data with an ANOVA (aov) considering these repeated measures to get the MSq and SSq for the species and strain level. I would like to know how to write the ANOVA model in R. I have done the following: aov(trait ~ species + strain/replicate) Is it accurate? Thanks a lot, Christian
2016 Mar 09
3
Introduction and Doubts
Hello All,I am Nirmal Singhania from NIIT University,India. I am interested in Clustering of search results Topic. I have been in field of practical machine learning and information retrieval from quite some time. I took various courses/MOOC on Information retrieval and Text Mining and have been working on real life datasets(KDD99,AWID,Movielens). Because the problems you face in real life ML/IR
2005 Jun 26
0
Factor correlations in factanal
...ores = c("none", "regression", "Bartlett"), rotation = "varimax", control = NULL, ...) { sortLoadings <- function(Lambda) { cn <- colnames(Lambda) Phi <- attr(Lambda, "covariance") ssq <- apply(Lambda, 2, function(x) -sum(x^2)) Lambda <- Lambda[, order(ssq), drop = FALSE] colnames(Lambda) <- cn neg <- colSums(Lambda) < 0 Lambda[, neg] <- -Lambda[, neg] if(!is.null(Phi)) { unit <- ifelse(neg, -1, 1)...
2015 Mar 02
0
R-devel does not update the C++ returned variables
...gt; > Within my R code, I am using a C++ function as below: > > overlaps <- matrix(0, nrow=B, ncol=length(N)) > overlaps.P <- matrix(0, nrow=B, ncol=length(N)) > > .C("speedUp", D, S, pD, pS, nrow(D), as.integer(N), length(N), > ssq[i], i, as.integer(B), overlaps, overlaps.P, DUP=FALSE) > > > the function "speedUp", is supposed to update matrices overlaps and > overlaps.P and it works with official R versions. > However, using the same code in R-devel, it does not update matrices and > they remai...
2000 Feb 23
0
Thank you!
...W Test > # for Normality to Large Samples" from Applied Statistics, 31 no.2 > # pp. 115-124. > # > n <- length(x) > index <- 1:n > m <- qnorm((index - 0.375)/(n + 0.25)) > y <- sort(x) > mu <- mean(y) > SSq <- sum((y - mu)^2) > astar <- 2 * m > ends <- c(1, n) > astar.p <- astar[ - ends] > if(n <= 20) > m <- n - 1 > else m <- n > if(m < 20) > aa <- gamma(0.5 * (m + 1))/(sq...
2013 Apr 01
2
Is DUD available in nls()?
SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear regression, does R offer this option for nonlinear regression? I have read the helpfile for nls() and could not find such option, any suggestion? Thanks, Derek [[alternative HTML version deleted]]