similar to: Change color of plot points based on values of a variable

Displaying 20 results from an estimated 3000 matches similar to: "Change color of plot points based on values of a variable"

2008 Sep 17
3
Stacked Area Plot
Hi: I've searched the archives and the Internet for hours but have yet to find a way to do stacked area plots (like the kind in Excel) in R. I think that polygon may work but it would require a bit of manipulation of my data. I was hoping for an easier way. An example of what I'm trying to do can be found here: http://jcharts.sourceforge.net/samples/stackedArea.html Thanks, Josip
2008 Aug 27
3
Calculating total observations based on combinations of variable values
Hello: As someone making the move from STATA to R, I'm finding it difficult at times to perform basic tasks in R, so forgive me if I've missed an obvious and easily obtained solution to my problem. I've searched the help guides and the archives and have not been able to find a solution that works. I have a data frame with thousands of observations that looks something like this:
2009 Jan 13
1
Drawing Polygons with xyplot in lattice
Hello: I've come to a dead-end in my search for a solution to a graphing problem that I am encountering. I have used xyplot (from the lattice package) successfully to plot 36 time-series plots (lines) of under-5 mortality for a set of countries in Sub-Sarahan Africa. What I would now like to do is to add vertical bands (rectangles) that correspond to time-periods during which each of the 36
2009 Jan 27
1
Data Frame Manipulation: Time Series
Dear R Helpers: I have a data set where the unit of observation is country-year. I would like to generate a new data set based on some inclusionary (exclusionary) criteria. Here is an example of the type of data that I have. df<-data.frame(cbind("country"=c(rep("Angola", 9), rep("Burundi", 7), rep("Chad", 13)), "year"=c(1975:1983, 1989:1995,
2008 Dec 20
2
Problems installing lme4 on Ubuntu
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 While I'm not an R expert, I have used R on Windows XP. Now I've moved to Ubuntu (Intrepid), and I'm trying to configure R to work with the Gelman and Hill _Data Analysis Using Regression and Multilevel/Hierarchical Models_. So far, it's not working. I start by following the instructions for installing arm and BRugs at
2013 Apr 17
3
Error: could not find function "invlogit" and "bayesglm"
I have installed the arm package and its dependents (e.g MATRIX, etc), but cannot use the functions "invlogit" and "bayesglm" because it gives me the error message "Error: could not find function "invlogit" or Error: could not find function "invlogit". What could be the problem. Regards Carrington [[alternative HTML version deleted]]
2009 Feb 09
2
Generating new variable based on values of an existing variable
Dear R Help-Listers: I have a problem that seems like it should have a simple solution, but I've spent hours on it (and searching the r-help archives) to no avail. What I'd like to do is to generate a new variable within a data frame, the values of which are dependent upon the values of an existing variable within that data frame. Assume that I have the following data:
2008 Dec 10
2
Confusion with Converting Factors to Dates using as.date
Dear R-Helpers: I'm having a problem getting dates into the correct format. I have a data frame, which is based on a .csv file that I imported into R via read.table. R has converted my date variables to factors; when I use the as.Date command, most of the values are converted "correctly" (and by this I guess I mean converted "as I wish them to be") but some have not been.
2006 May 09
1
trying to use standard notation
Hi, all. In setting up my package for post-processing regression models, I am trying to use standard notation as much as possible: thus, I use coef() to access estimated coefficients. I wrote a function called se.coef() to grab standard errors, and se.fixef() and se.ranef() to grab se's from coefficients estimated from lmer(). I also need a function to access sigma-hat (the residual sd
2008 Jan 31
1
R2WinBUGS is broken
Dear R-users, I am trying to use the following code to reproduce results from Prof. Gelman's book, but have the listed error for R2WinBUGS version (the openbugs version is good). I am using R-2.6.1 on windows XP, and all the R packages are most current ones. schools.bug can be found at http://www.stat.columbia.edu/~gelman/bugsR/runningbugs.html . Can anyone help me to figure out what's
2005 May 16
1
A question about bugs.R: functions for running WinBUGs from R
Dear R users, I've found bugs.R : the functions for running WinBUGs from R that is writen by Dr. Andrew Gelman who is a professor from Columbia University. The bugs.R would be very useful for me, and I think many of you know it as well. I followed the instuctions on Dr. Gelman's web to install all of documents that bugs.R needs, but when I try to run the school example the web posted in
2006 Jun 14
2
lmer binomial model overestimating data?
Hi folks, Warning: I don't know if the result I am getting makes sense, so this may be a statistics question. The fitted values from my binomial lmer mixed model seem to consistently overestimate the cell means, and I don't know why. I assume I am doing something stupid. Below I include code, and a binary image of the data is available at this link:
2006 May 20
5
Can lmer() fit a multilevel model embedded in a regression?
I would like to fit a hierarchical regression model from Witte et al. (1994; see reference below). It's a logistic regression of a health outcome on quntities of food intake; the linear predictor has the form, X*beta + W*gamma, where X is a matrix of consumption of 82 foods (i.e., the rows of X represent people in the study, the columns represent different foods, and X_ij is the amount of
2006 May 02
2
evaluation of expressions
Hi, all. I'm trying to automate some regression operations in R but am confused about how to evaluate expressoins that are expressed as character strings. For example: y <- ifelse (rnorm(10)>0, 1, 0) sex <- rnorm(10) age <- rnorm(10) test <- as.data.frame (cbind (y, sex, age)) # this works fine: glm (y ~ sex + I(age^2), data=test, family=binomial(link="logit"),
2006 May 01
3
pulling items out of a lm() call
I want to write a function to standardize regression predictors, which will require me to do some character-string manipulation to parse the variables in a call to lm() or glm(). For example, consider the call lm (y ~ female + I(age^2) + female:black + (age + education)*female). I want to be able to parse this to pick out the input variables ("female", "age",
2003 Apr 18
1
MCMCpack gelman.plot and gelman.diag
Hi, A question. When I run gelman.diag and gelman.plot with mcmc lists obtained from MCMCregress, the results are following. > post.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000, + thin = 10, verbose = FALSE, beta.start = NA, sigma2.start = NA, + b0 = 0, B0 = 0, nu = 0.001, delta = 0.001) > post1.R <- MCMCregress(Size~Age+Status, data
2007 Feb 11
2
problem with Matrix package
I decided to update my packages and then had a problem with loading the Matrix package http://cran.at.r-project.org/bin/windows/contrib/2.4/Matrix_0.9975-9.zip This is what happened when I tried to load it in: > library("Matrix") Error in importIntoEnv(impenv, impnames, ns, impvars) : object 'Logic' is not exported by 'namespace:methods' Error:
2009 Oct 16
2
Invite after bye?
Hi there noticed a strange thing in asterisk 1.6.2x 1.6.1x after one of the clients sends bye asterisk first sends invite to other side then after 200 ok it sends bye I am not sure but that could be some missconfiguration issue or a bug? so it's like this: side A sends bye to asterisk, asterisk responds with 200 OK to side A, then it sends INVITE to side B, expects 200 OK
2009 Oct 22
2
carefulwrite: write() returned error: Broken pipe
Dear, I am getting this in CLI on release candidate version of Asterisk. Any ideas, or points where to look? -- Launched AGI Script /var/lib/asterisk/agi-bin/rad-auth.agi [Oct 22 18:21:45] ERROR[9853]: utils.c:1126 ast_carefulwrite: write() returned error: Broken pipe -- <SIP/916-fc001968>AGI Script rad-auth.agi completed, returning 0 Best regards, Josip
2006 Jan 10
2
lmer(): nested and non-nested factors in logistic regression
Thanks to some help by Doug Bates (and the updated version of the Matrix package), I've refined my question about fitting nested and non-nested factors in lmer(). I can get it to work in linear regression but it crashes in logistic regression. Here's my example: # set up the predictors n.age <- 4 n.edu <- 4 n.rep <- 100 n.state <- 50 n <- n.age*n.edu*n.rep age.id