search for: claudiapenaloza

Displaying 11 results from an estimated 11 matches for "claudiapenaloza".

2012 Jul 02
4
Removing rows if certain elements are found in character string
I would like to remove rows from the following data frame (df) if there are only two specific elements found in the df$ch character string (I want to remove rows with only "0" & "D" or "0" & "d"). Alternatively, I would like to remove rows if the first non-zero element is "D" or "d".
2010 Apr 11
0
plotting rpart objects, text.rpart, fancy option
I have created plots of rpart objects with the fancy option for text.rpart ("fancy" creates ellipses and rectangles and labels branches with splitting criteria). The ellipses and rectangles are supposed to "interrupt" the tree lines (as seen in Therneau and Atkinson 1997, page 48, Fig. 18, http://www.mayo.edu/hsr/techrpt/61.pdf), but they do not, even when I use Therneau and
2010 May 03
1
rpart, cross-validation errors question
I ran this code (several times) from the Quick-R web page ( http://www.statmethods.net/advstats/cart.html) but my cross-validation errors increase instead of decrease (same thing happens with an unrelated data set). Why does this happen? Am I doing something wrong? # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start,
2009 May 04
0
sm.density.compare
I've been using the sm.denstiy.compare function and would like to know some specifics: a) What kind of bootstrap sampling is used, with or without replacement? b) A p-value is returned after running the following script (for example): library(sm) y <- rnorm(100) g <- rep(1:2, rep(50,2)) sm.density.compare(y, g, model="equal") to what statistic does this p-value correspond?
2010 May 14
1
Cubic B-spline, how to numerically integrate?
(corrected version of previous posting) I fit a GAM to turtle growth data following methods in Limpus & Chaloupka 1997 (http://www.int-res.com/articles/meps/149/m149p023.pdf). I want to obtain figures similar to Fig 3 c & f in Limpus & Chaloupka (1997), which according to the figure legend are "expected size-at-age functions" obtained by numerically integrating
2010 May 17
0
GAM vs. GAMM, how to model increasing error variance?
I fit a GAM to turtle growth data using mgcv: >m1 <- gam(growth~s(mean.size, bs="cr")+s(year,bs="cr",k=7)+s(cohort,bs="cr")+s(age,bs="cr"), data=grow, family=quasi(link="identity")) The errors are skewed (and seem to be correlated with age) (code and plots here:
2011 Jan 24
0
sm.density.compare, date on x axis?
Is it possible to generate a density plot comparing several (6 or 7) groups of data and have the x-axis in date format (e.g.: "%d%b", 10Mar)? When I try to input the data in date format I get an error saying "this function only allows 1-d data". Thank you, Claudia [[alternative HTML version deleted]]
2012 Sep 20
0
Plot to tiff, font size problem in multiple plot figures
I am creating graphs for a publication and would like them to have the same font size... but when I create a figure with multiple plots, the font size decreases even though I haven't changed the tiff() resolution or pointsize specifications, I have increased the figure size according to how many plots it will ultimately have, and I have made sure the margins are equivalent for single and
2010 May 13
1
GAM, GAMM and numerical integration, help please
I am trying to apply methods used by Chaloupka & Limpus (1997) ( http://www.int-res.com/articles/meps/146/m146p001.pdf) to my own turtle growth data. I am having trouble with two things... 1) After the GAM is fit, the residuals are skewed. >m1 <- gam(growth~s(mean.size, bs="cr")+s(year,bs="cr",k=7)+s(cohort,bs="cr")+s(age,bs="cr"), data=grow,
2010 Jul 06
2
How to plot confidence bands for nls
I adjusted an exponential regression to the following data and wish to plot confidence bands as well. Is this possible? Any help greatly appreciated. Claudia x <- c(1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001, 2002,2003,2004,2005,2006,2007,2008,2009) y <- c(987,937,810,749,1087,807,1050,1294,1455,1022,927,403,698,1191,1078, 1176,1125,936,1263,647,868) dat <-
2012 Jul 30
2
Alternating between "for loops"
Dear All, I would like to apply two different "for loops" to each set of four columns of a matrix (the loops here are simplifications of the actual loops I will be running which involve multiple if/else statements). I don't know how to "alternate" between the loops depending on which column is "running through the loop" at the time. ## Set up matrix J <- 10 N