search for: modb

Displaying 5 results from an estimated 5 matches for "modb".

Did you mean: mod
2011 Jul 18
1
nls() and lines()
...;, ylim=c(10,30)) nls.2009 <- nls(mpg~(alpha*(as.numeric(x)^2))+(bravo*as.numeric(x))+(charlie), data=mileage[year==2009,], start=list(alpha=-2e-14, bravo=5e-5, charlie=-31407), ? trace=T, na.action=na.omit, nls.control(minFactor=0.000000000000000000001)) plot(mpg~x, data=mileage[year==2009,]) ? modb=seq(min(as.numeric(x)), max(as.numeric(x)), by=10000) ? lines(modb, predict(nls.2009, lines(as.numeric(x)=modb))) Unfortunately, when I run the final line of this code, I get the following: Error: unexpected '=' in "? lines(modb, predict(nls.2009, lines(as.numeric(x)=" In other...
2010 Mar 02
1
sem package and growth curves
I have been working through the book "Applied longitudinal data analysis: modeling change and event occurrence" by Judith D. Singer and John B. Willett. I have been working examples using SAS and also using it as an opportunity for learning to use R for statistical analysis. I ran into some difficulties in chapter 8 which deals with using structural equation modeling. I have tried to
2012 Jan 23
2
model non-nested random effects in nlme library
...asured in more than one year. So as I understand it, I should not nest individual in year or visa versa. Someone suggested I do it as above. But I am accustomed to nlme, and dont know how one would code non-nested random effects. In the Pinheiro and Bates book there is an example coded like this: modB <- lme(y~x, + random = pdBlocked(list(pdIdent(~year-1), pdIdent(~individual-1)))) But when I try it I keep getting an error message saying: "Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups" What am I doing wrong? Thank you, -- View this message i...
2006 Dec 11
2
How to write a two-way interaction as a random effect in a lmer model?
Dear All, I am working with linear mixed-effects models using the lme4 package in R. I created a model with the lmer function including some main effects, a two-way interaction and a random effect. Now I am searching how I could incorporate an interaction between the random effect and one of the fixed effects. I tried to express the interaction in:
2004 Apr 06
0
Extracting the survival function estimate from a survreg object.
...ents reported by summary(<survreg object>). I am enclosing an outline of my code for reference if anyone is interested. Thanks in advance, Sixten --------------------------------------------------------------------- sure <- survreg(formula = Surv(time, dead) ~ age + group + sex, data = modb) nd <- data.frame( age=50, group=factor("A", levels=c("A", "B", "C")), sex=factor("M", levels=c("F", "M"))) y <- seq(0, 1, 0.001) # # For a range of p-values, predict the quantiles. # sufu <- list( y=1-y, x...