search for: cfriedalek

Displaying 10 results from an estimated 10 matches for "cfriedalek".

2009 Jun 22
1
Error when using step
I have two questions about the built-in function step. Ultimately I want to apply a lm fitting and subsequent step procedure to thousands of data sets groups by a factor defined as a unique ID. Q1. The code below creates a data.frame comprising three marginally noisy surfaces. The code below fails when I use step in a function but summary seems to show the model fits are legitimate. Any ideas on
2010 May 17
2
Problem with ldply
I've examining a number of linear regression models on a large dataset following the basic ideas presented here http://www.r-bloggers.com/r-calculating-all-possible-linear-regression-models-for-a-given-set-of-predictors/ Calculating all possible linear regressions . I run into a problem with ldply when I have a formula that includes no intercept. Here's a simple test to show what happens.
2009 Jun 17
2
Re gression by groups questions
I have a large dataset grouped by a factor and I want to perform a regression on each data subset based on this factor. There are many ways to do this, posted here and elsewhere. I have tried several. However I found one method posted on the R wiki which works exactly as I want, and I like the elegance and simplicity of the solution, but I don't understand how it works. Its all in the formula
2009 Aug 20
1
ggsave to .png bug in ggplot2 (?)
Text is really small and legend boxes are huge in this plot when saved to .png with ggsave. Plot is correct (i.e. looks the same as the screen) when saved with dev.print. Saving to .pdf with ggsave give the correct output. I'm a noob at ggplot2 so this may be user error rather than a bug. However the interface to ggsave seems simple enough to exclude many possibilities for screwing this up
2009 Aug 19
2
ggplot2 legend problem
I'm trying to overlay two histograms using transparency to enable viewing of multiple distributions on a single scale. So far ggplot2 seems to do what I want. However I'm having a problem generating the legend coloring appropriate to each distribution in the plot. Here is a test case to show my best (failed) effort so far: library(ggplot2) x <- data.frame(X=rnorm(1000, mean=0)) y
2010 Jun 09
1
specifying plot symbol sizes in qplot or ggplot2
Hi. first things first ... thanks for ggplot2. Now my question. I'm using qplot to generate a plot as follows where X,Y,Z, A are columns in a dataframe. qplot(X, Y, data=XYDATA, color=Z, geom=c("point"), size=A) This works as expected. Factor A has three levels so there are three sizes of the point plot symbol. I understand that the factor levels are mapped to symbol sizes.
2008 Mar 04
1
ggplot2 - Problem with grid plot
Hi R-help I'm trying to create a grid plot in which each plot in the grid contains two density plots (colored by factor) and two vertical lines at the respective medians (also colored by the factor). Using the diamonds dataset as an example, the following commands give me price density plots by factor cut in a single, ungridded plot. p <- ggplot(data=diamonds, aes(x=price)) +
2009 Jun 23
1
How to exclude insignificant intercepts using "step" function
I posted this question way down at teh end of another thread realted to an error in step, but that was stupid since it really is another matter altogether. I should have posted it separately, as I have now done. The code below creates a data.frame comprising three marginally noisy surfaces. The code below (including a fix courtesy of David Winsemius that avoids a step function error through use
2008 Feb 27
1
ggplot2 boxplot confusion
Ultimately my aim is to get a plot of density faceted by 2 factors with a horizontal boxplot overlaid on each density plot in the grid to indicate summary stats. So I've been experimenting with creating boxplots and density plots. Here's some representative data. series = c('C2','C4','C8','C10','C15','C20') ids =
2008 Feb 27
1
how to specify ggplot2 facet plot order
Hi, new to R and ggplot2. I've been trying to get a facet plot in which the order of the facets is as I require, rather than ordered numerically, alphabetically, by Roman numerals, mean (answers to these were posted here after much searching). Here's some test code to demonstrate what I get. series = c('C2','C4','C8','C10','C15','C20') ids =