similar to: loess lines in xyplot with two or more variables on the left side of a formula

Displaying 20 results from an estimated 6000 matches similar to: "loess lines in xyplot with two or more variables on the left side of a formula"

2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up the thread, so I''m starting over. I''m trying to built a document upload system. The system has a main Document model with different subclasses for different types of documents. With the code below, if I attempt to create a Document, it works fine, but if I attempt to use one of the subclasses, I
2007 Feb 07
1
Problem with subsets and xyplot
Hello I have a dataframe that looks like this MSA CITY HIVEST YEAR YR CAT 1 0200 Albuquerque 0.50 1996 1996 5 2 0520 Atlanta 13.00 1997 1997 5 3 0720 Baltimore 29.10 1994 1994 1 4 0720 Baltimore 13.00 1995 1995 5 5 0720 Baltimore 3.68
2008 Dec 17
1
Extract Data from a Webpage
Hi All: I would like to extract the provider name, address, and phone number from multiple webpages like this: http://oasasapps.oasas.state.ny.us/portal/pls/portal/oasasrep.providersearch.take_to_rpt?P1=3489&P2=11490 Based on searching R-help archives, it seems like the XML package might have something useful for this task. I can load the XML package and supply the url as an argument to
2009 Sep 10
1
Exporting the formula for a LOESS fit
I'm at my wit's end, and have searched all of my sources. I need to generate a relatively large number of individual LOESS fits each month of data (I have about 16 months of data). Fitting the polynomial is not my problem, figuring out what the formula that describes that polynomial is. apologies in advance if this is so simple, but I need a hand here. Thanks. -- View this message in
2010 Apr 29
3
control span in panel.loess in xyplot
Dear R gurus.. Is it possible to control span settings for different values of a grouping variable, when using xyplot? an example code shown below d=data.frame(x=rep(sample(1:5,rep=F),10),y=rnorm(50),z=rep(sample(LETTERS[1:2],rep=F),25)) xyplot(y~x,data=d,groups=z,panel=panel.superpose,panel.groups=panel.loess(span=c(2/3, 3/4,1/2)) or something like..
2004 Aug 27
1
predict.mvr error message
What version of R, what version of pls.pcr, and on what OS? Have you checked whether your versions of software are up to date? I get: > n <- 1350 > p <- 180 > y <- rnorm(n) > x <- matrix(sample(0:1, n*p, replace=TRUE), n, p) > fit <- mvr(x, y, method="SIMPLS", validat="none", ncomp=2) > xt <- matrix(sample(0:1, 312*p, replace=TRUE), 312,
2007 Apr 30
0
Intercept Coefficient in a Model with Orthogonal Polynomials
This very likely falls in the category of an unexpected result due to user ignorance. I generated the following data: time <- 0:10 set.seed(4302007) y <- 268 + -9*time + .4*(time^2) + rnorm(11, 0, .1) I then fit models using both orthogonal and raw polynomials: fit1 <- lm(y ~ poly(time, 2)) fit2 <- lm(y ~ poly(time, degree=2, raw=TRUE)) > predict(fit1, data.frame(time =
2006 Jun 19
3
can''t dump anonymous class Class
I''m trying to create a document upload system, where most of the code is the super class Document and just the path to file on the system is controlled by the sub classes. When I attempt to use my code, I get the following when I try to save the document. can''t dump anonymous class Class Any ideas? ** Migration ** class CreateDocuments < ActiveRecord::Migration def
2008 Jul 29
1
Problem reading a particular file with read.spss()
Hi All: I have a seemingly typical SPSS data file with 219 rows and 486 variables. When I attempt to read this file into R with read.spss() in the foreign package, I consistently get a "crash". This is the sequence of events: > library(foreign) > sessionInfo() R version 2.7.1 Patched (2008-07-24 r46120) i386-pc-mingw32 locale: LC_COLLATE=English_United
2008 Jan 18
1
Assigning into each of a list of dataframes
What is the right way to assign a new variable into each a of list of data frames? Here is my failed attempt: mylist <- list(df1 = data.frame(A = runif(5), B = runif(5)), df2 = data.frame(A = runif(5), B= runif(5))) lapply(mylist, function(x){x$Y <- x$A * x$B}) $df1 [1] 0.25589928 0.03446026 0.94992362 0.21388326 0.08668821 $df2 [1] 0.08771839 0.05643553 0.09036894
2006 Feb 18
2
Conversion to Adjacency Matrix
I have data in the following form: ID COUPON0 COUPON1 COUPON2 COUPON3 1 1 1000 1001 1002 2 2 NA NA NA 3 1000 1003 NA 1004 4 1001 NA 1005 NA 5 1002 NA NA NA 12 1003 NA NA 1006 7 1005 NA NA NA 8 1004 1007 NA NA 9 1006 NA NA NA 26
2010 Dec 13
2
Does a formula object have a "left hand side"
Hello, Does anyone know of a function that will determine whether or not a formula object has a left hand side? I.e., can differentiate between y ~ x + z and ~ x + z Perhaps I'm overlooking the obvious... Thanks!
2006 Apr 25
1
by() and CrossTable()
I am attempting to produce crosstabulations between two variables for subgroups defined by a third factor variable. I'm using by() and CrossTable() in package gmodels. I get the printing of the tables first and then a printing of each level of the INDICES. For example: library(gmodels) by(warpbreaks, warpbreaks$tension, function(x){CrossTable(x$wool, x$breaks > 30,
2007 Oct 23
1
Compute R2 and Q2 in PLS with pls.pcr package
Dear list I am using the mvr function of the package pls.pcr to compute PLS resgression using a X matrix of gene expression variables and a Y matrix of medical varaibles. I would like to obtain the R2 (sum of squares captured by the model) and Q2 (proportion of total sum of squares captured in leave-one-out cross validation) of the model. I am not sure if there are specific slots in the
2013 Mar 02
2
Multiple left hand side variables in a formula
The lattice package uses special logic to allow for multiple left-hand-side variables in a formula, e.g. y1 + y2 ~ x. Is there an elegant way to do this outside of lattice? I'm trying to implement a data summarization function that logically takes multiple dependent variables. The usual invocation of model.frame( ) causes R to try to do arithmetic addition to create a single dependent
2004 Jan 16
2
Weird problem with trying to change a variable
I have a dataframe called cvar, with two variables (among many others) called MSA and ACTUP. Both are numeric. This was working fine. Then I found out that for two MSAs, ACTUP should be 1, not 0. so I tried cvar$ACTUP[cvar$MSA == 6840] <- 1 cvar$ACTUP[cvar$MSA == 5360] <- 1 but when I try table(cvar$MSA, cvar$ACTUP) the level of ACTUP for those two MSAs has not changed, and is still
2009 Oct 26
1
Cbind() on the right-side of a formula in xYplot()
Hi, Using the latest rms package I am able to make nice plots of model predictions +/- desired confidence intervals like this: # need this library(rms) # setup data d <- data.frame(x=rnorm(100), y=rnorm(100)) dd <- datadist(d) options(datadist='dd') # fit model l <- ols(y ~ rcs(x), data=d) # predict along original limits of data l.pred <- Predict(l) # plot of fit and
2005 Jul 12
1
getting panel.loess to use updated version of loess.smooth
I'm updating the loess routines to allow for, among other things, arbitrary local polynomial degree and number of predictors. For now, I've given the updated package its own namespace. The trouble is, panel.loess still calls the original code in package:stats instead of the new loess package, regardless of whether package:loess or package:lattice comes first in the search list. If I
2004 Apr 09
1
loess' robustness weights in loess
hi! i want to change the "robustness weights" used by loess. these are described on page 316 of chambers and hastie's "statistical models in S" book as r_i = B(e_i,6m) where B is tukey's biweight function, e_i are the residulas, and m is the median average distance from 0 of the residuals. i want to change 6m to, say, 3m. is there a way to do this? i cant
2008 May 13
9
A Very Simple Question
On 5/13/2008 10:27 AM, Yukihiro Ishii wrote: > Hi Rusers! > > I am ashed of asking such a simple question. > > X<-matrix(rnorm(24), 4) > X0<-apply(X,2,mean) > > What I want is a matrix which consists of colums such as X[,1]--X0[1]. > > X-X0 doesn't work. > > Perhaps apply function? scale(X, scale=FALSE) ?scale > Thanks in advance. > >