[R] Question regarding significance of a covariate in a coxme survival model

2010-08-04 Thread Christopher David Desjardins
Hi, I am running a Cox Mixed Effects Hazard model using the library coxme. I am trying to model time to onset (age_sym1) of thought problems (e.g. hearing voices) (sym1). As I have siblings in my dataset, I have decided to account for this by including a random effect for family (famid). My

Re: [R] Survival analysis MLE gives NA or enormous standard errors

2010-07-27 Thread Christopher David Desjardins
Hi Charles, On Fri, 2010-07-23 at 14:40 -0700, Charles C. Berry wrote: On Fri, 23 Jul 2010, Christopher David Desjardins wrote: Sorry. I should have included some data. I've attached a subset of my data (50/192) cases in a Rdata file and have pasted it below. Running anova I get

[R] AIC from coxme

2010-07-27 Thread Christopher David Desjardins
1-none- character -- Christopher David Desjardins PhD student, Quantitative Methods in Education MS student, Statistics University of Minnesota 192 Education Sciences Building http://cddesjardins.wordpress.com __ R-help@r

[R] Survival analysis MLE gives NA or enormous standard errors

2010-07-23 Thread Christopher David Desjardins
on an email as I am a digest subscriber. Thanks, Chris -- Christopher David Desjardins PhD student, Quantitative Methods in Education MS student, Statistics University of Minnesota 192 Education Sciences Building http://cddesjardins.wordpress.com __ R

Re: [R] Survival analysis MLE gives NA or enormous standard errors

2010-07-23 Thread Christopher David Desjardins
CONTROL 46 19.674200 CONTROL 47 14.789870 MAJOR 48 20.054760 MAJOR 49 14.787130 MAJOR 50 19.868580 MAJOR On Fri, 2010-07-23 at 11:52 -0700, Charles C. Berry wrote: On Fri, 23 Jul 2010, Christopher David Desjardins wrote: Hi, I am trying to fit the following model

[R] Multilevel survival model

2010-07-22 Thread Christopher David Desjardins
for this shared variability. How might I do this in R? Can I do it with the survival library? If possible, I'd also like to control for sex. Thanks, Chris -- Christopher David Desjardins PhD student, Quantitative Methods in Education MS student, Statistics University of Minnesota 192 Education Sciences

[R] Displaying additional values on the Y-axis ggplot2

2010-06-24 Thread Christopher David Desjardins
Hi, I am running the following code: mfg0 - ggplot(aes(x=Grade,y=Math,colour=RiskStatic45678),data=math.f) mfg1 - mfg0 + geom_smooth(method=lm, formula=y ~ ns(x,2),size=1) + geom_smooth(aes(y=nalt.math,color=NALT),size=1,data=nalt) + scale_colour_brewer(Risk Status, pal=Set1) +

[R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Christopher David Desjardins
Hi, I am trying to recreate the right graph on page 524 of Gelman's 2006 paper Prior distributions for variance parameters in hierarchical models in Bayesian Analysis, 3, 515-533. I am only interested, however, in recreating the portion of the graph for the overlain prior density for the

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Christopher David Desjardins
Thanks that works. I am presuming that the density on the Y-axis would be wrong in the case of a half-Cauchy distribution and in fact should be doubled if it's folded at 0? Chris On 05/28/2010 09:02 AM, Uwe Ligges wrote: Am 28.05.2010 15:29, schrieb Christopher David Desjardins: Hi, I am

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Christopher David Desjardins
Perfect. Thanks. Also using R 2.11.0 on Fedora I didn't get any warnings with my command. Chris On 05/28/2010 09:09 AM, Berwin A Turlach wrote: curve(2*dcauchy(x, location=0, scale=25), from=0, to=200) __ R-help@r-project.org mailing list

[R] Questions about ggplot2

2010-05-13 Thread Christopher David Desjardins
Hi I have two questions about using ggplot2. First, I have multiple columns of data that I would like to combine into one histogram where each column of data would correspond to one bar in the histogram. Each column has 0 or 1s and I want my bars in the histogram to correspond to the sum of

[R] rjags syntax error

2010-04-09 Thread Christopher David Desjardins
Hi, I am getting the following error when I'm running jags.model() meas1 - jags.model(file=measurement.bug,data=dat.test) syntax error, unexpected '}', expecting ',' or ')' Error in jags.model(file = measurement.bug, data = dat.test) : Parse error on line 1 Below is my JAGS model. Please

[R] SOLVED: Re: Changing gird marks in ggplot2

2009-04-24 Thread Christopher David Desjardins
i solved this thanks On Fri, 2009-04-24 at 23:51 -0500, Christopher Desjardins wrote: Hi, When I zoom into a graph created in ggplot2 with the coord_cartesian(ylim=c(0,5)) option, I have no values labelled on my y-axis. For this graph ggplot2 only puts labels the y-axis at intervals of 10

[R] Randomly splitting a data frame in half

2009-03-19 Thread Christopher David Desjardins
I have a data frame in long format and I would like to randomly divide this data frame in half. The data frame consists of 39622 rows and I initially tried ... randomsample1 - data[sample(nrow(data),19811), ] Where allows me to randomly select half of the rows and assign them to

Re: [R] Randomly splitting a data frame in half

2009-03-19 Thread Christopher David Desjardins
, ] dat[ind2, ] I hope it helps. Best, Dimitris Christopher David Desjardins wrote: I have a data frame in long format and I would like to randomly divide this data frame in half. The data frame consists of 39622 rows and I initially tried ... randomsample1 - data[sample(nrow(data),19811

Re: [R] Unable to run smoother in qplot() or ggplot() - complains about knots

2009-03-13 Thread Christopher David Desjardins
Thanks for the reply. I'll look into this. Chris On Mar 13, 2009, at 8:31 AM, hadley wickham wrote: On Thu, Mar 12, 2009 at 5:37 PM, Christopher David Desjardins cddesjard...@gmail.com wrote: I get the following error when I run qplot() qplot(grade, read,data = hhm.long.m, geom = c(point

[R] Unable to run smoother in qplot() or ggplot() - complains about knots

2009-03-12 Thread Christopher David Desjardins
I get the following error when I run qplot() qplot(grade, read,data = hhm.long.m, geom = c(point, smooth)) Error in smooth.construct.cr.smooth.spec(object, data, knots) : x has insufficient unique values to support 10 knots: reduce k. I am not sure how to tackle this problem. When I take a

[R] Standardized coefficients (std.coef) in graphviz from path.diagram()

2009-03-07 Thread Christopher David Desjardins
I was wondering if there was a way to add the standardized coefficients from SEM that I get from running std.coef() to my graph that I create with path.diagram() for graphviz? Right now the only way I know how is to edit the values in a text editor after creating the graph. Thanks,

[R] AEA 2009 Conference

2009-03-05 Thread Christopher David Desjardins
Colleagues, I am apologize in advance if there is a more appropriate R mailing list for this announcement but this list seems to be the most relevant. I am a Topical Interest Group (TIG) leader for the Quantitative Methods: Theory and Design TIG of The American Evaluation Association. Each

[R] Problem recoding several variables into one

2009-02-03 Thread Christopher David Desjardins
Hi, I am running the following code: ret - data.frame(V1=rep(NA,dim(hhm)[1])) years - c(grade04,grade05,grade06,grade07,grade08) for(i in 1:(length(years)-1)){ ret[,i] - ifelse(hhm[,years[i+1]]==hhm[,years[i]],1,0)} ret$ret.s - ifelse(ret$V1==1 | ret$V2==1 | ret$V3==1 | ret