Displaying 3 results from an estimated 3 matches for "mymod1".
Did you mean:
mymod
2005 Nov 17
1
Predicting and Plotting "hypothetical" values of factors
...nts describing the difficulties that we have
found. Are there simpler, less frustrating approaches?
-----------------------------
# Paul Johnson <pauljohn at ku.edu> 2005-11-17
# factorFutzing-1.R
myfac <- factor(c(1.1, 4.5, 1.1, 1.1, 4.5, 1.1, 4.5, 1.1))
y <- c(0,1,0,1,0,0,1,0)
mymod1 <-glm (y~myfac, family=binomial)
p1 <- predict(mymod1, type="response")
plot(myfac,p1)
# Wait, that's not the picture I wanted. I want to see the
# proverbial S-shaped curve!
#
# The contrast variable that R creates is coded 0 and 1.
# I'd like to have a sequence from 0...
2011 Jun 14
0
error message trying to plot survival curves from hypothetical covariate profiles
...2005 2005 2005 2006 2006 ...
$ stop : num 2006 2006 2006 2007 2007 ...
$ risk : num 1 2 3 1 2 3 1 2 3 1 ...
$ evstatus: num 0 0 0 0 0 0 0 0 0 0 ...
I am modelling the survival time until the adoption of the policy as follows:
mod1<-Surv(newdat$start, newdat$stop, newdat$evstatus)
mymod1<-coxph(mod1 ~ news + enviro + partisan + cluster(state) + strata(evstatus), method=c("efron"), robust=TRUE)
Again, following Fox, I try to construct a data frame with a hypothetical covariate profile:
n<-data.frame(news=rep(c(1,4,8)), evstatus=as.factor(1:3), enviro=mean(newdat$en...
2006 Feb 12
1
lme, nlsList, nlsList.selfStart
Dear listers,
I am trying to fit a model using nlsList() using alternately a SSfol()
selfstart function or its developped equivalent formulae.
This preliminary trial works well
mydata<-groupedData(Conc~Tps|Organ,data=mydata)
mymod1<-nls(Conc~SSfol(Dose,Tps,lKe,lKa,lCl),data=mydata)
as well as a developped form:
mymod2<-nls(Conc~Dose * exp(lKe+lKa-lCl) *
(exp(-exp(lKe)*Tps)-exp(-exp(lKa)*Tps)) /(exp(lKa)-exp(lKe)),
data=mydata,
start= c(lKe=-2.77, lKa=-1.41, lCl=-1.13)
)
However when trying to fit the mod...