Displaying 3 results from an estimated 3 matches for "fit11".
Did you mean:
fit1
2023 Aug 31
1
simulating future observations from heteroscedastic fits
Hello, All:
I want to simulate future observations from fits to heteroscedastic
data. A simple example is as follows:
(DF3_2 <- data.frame(y=c(1:3, 10*(1:3)),
gp=factor(rep(1:2, e=3))))
# I want to fit 4 models
# and simulate future observations from all 4:
fit11 <- lm(y~1, DF3_2)
fit21 <- lm(y~gp, DF3_2)
library(nlme)
(fit12 <- lme(y~1, data=DF3_2, random=~1|gp))
(fit22 <- lme(y~gp, data=DF3_2, random=~1|gp))
library(lme4)
(fit12r <- lmer(y~1+(1|gp), data=DF3_2, REML=FALSE))
(fit22r <- lmer(y~gp+(1|gp), data=DF3_2, REML=FALSE))
# I can...
2009 Dec 30
1
glm error: cannot correct step size
...an error message that I don't understand when I try to run GLM. The error only occurs when I have all independent variables in the model. When I drop one independent variable, the model runs fine. Can anyone help me understand what the error means and how I can correct it?
Thank you,
John
> fit11<-glm(AAMTCARE~BMI+BMIsq+SEX+jPHI+jMEDICAID+factor(AgeCat)+
+ factor(jINDINC)+jMARSTAT+jEDUCATION+factor(jsmokercat)+factor(jrace),data=SimData,family=Gamma(link="log"))
Warning: step size truncated due to divergence
Error in glm.fit(x = X, y = Y, weights = weights, start = start, etast...
2013 Jan 10
1
Semi Parametric Bootstrap
...amma(link=log))
x.betahat1<-fit1s$fitted.values
res1<-fit1s$residuals
b<-1000
for (i in 1:b){
b.i <- sample(index, size=n, replace=T)
res.star1=res1[b.i]
bst1=x.betahat1+res.star1
mydata1 <-data.frame(age,age2,sex,bst1)
########Modeling ################
fit11 <-glm(bst1~age+age2+sex, family=Gamma(link=log),data=mydata1)
}
Can someone help me correct this code? Kindly advice on Binomial data
as well
Happy New year2013!
-- _______________________________
Paul K. Musingila