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 pl
> I'm not sure it works, but try the following.
>
>
> for(j in which(dtp)){
> for (q in 1:N){
> if(y[q, j] %in% c("d", "D")) break
> [...etc...]
>
> and in the other loop the same,
>
>
> for (j in which(!dtp)) {
> for (q in
p) y[q, j] <- "A"
}
} else {
if (observable) {
if (runif(1, 0, 1) <= c) y[q, j] <- "A"
}
}
}
}
On Wed, Aug 8, 2012 at 2:04 PM, Claudia Penaloza
wrote:
> Answers inserted in BLUE below
>
> On Thu, Aug 2, 2012 at 5:34 PM, Claudia
Answers inserted in BLUE below
On Thu, Aug 2, 2012 at 5:34 PM, Claudia Penaloza
wrote:
> Thank you very much for all your suggestions. I am very sorry my code is
> so crude (it gives me a headache too!), I'm very new to R programing. I
> will have to look at your suggestions/
ado<=PsiAd){
>> y[q,j]="d"
>> }else(y[q,j]="D")
>>
>
> # ---Perhaps
> deado <- runif(N, 0,1)
> y[ , j] <- ifelse( deado<=PsiAd, "d", "D")
> #--
uot;A" "B" "1" "2" "A" "B" "1" "2"
> [8,] "1" "2" "A" "B" "1" "2" "A" "B" "1" "2"
> [9,] "1"
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 "run
Got it! Thank you Rui!
cp
On Tue, Jul 3, 2012 at 10:14 AM, Rui Barradas wrote:
> Hello,
>
> I'm glad it helped. See answer inline.
>
> Em 03-07-2012 17:09, Claudia Penaloza escreveu:
>
> Thank you Rui and Jim, both 'i1' and 'i1new' worked perfectl
2 00d000**00 0.002456
>>> 3 0T0000**00 0.007368
>>> 4 0DT000**00 0.007368
>>>
>>> 5 0T**00 0.0024
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".
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 vers
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,74
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:
https://docs.google.com/fileview?
(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 "e
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
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 rpar
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://w
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.densit
18 matches
Mail list logo