Displaying 4 results from an estimated 4 matches for "fmla2".
Did you mean:
fmla
2012 Feb 28
2
update.formula has 512 char buffer?
...s the test code:
var1 <- 1:78
x1 <- paste("x", var1, sep="")
f1 <- paste("f", var1[1:10], sep="")
# use first 77 variables
fmla <- as.formula( paste("y ~ ", paste(x1[1:77], collapse=" + ", sep=""),
sep=""))
fmla2 <- update(fmla, paste(". ~ . | ", paste(f1, collapse= " + "), sep=""))
# CHANGE x to all 78 variables
fmla <- as.formula( paste("y ~ ", paste(x1, collapse=" + ", sep=""),
sep=""))
fmla2 <- update(fmla, paste(". ~ ....
2006 Apr 20
1
A question about nlme
Hello,
I have used nlme to fit a model, the R syntax is like
fmla0<-as.formula(paste("~",paste(colnames(ldata[,9:13]),collapse="+"),"-1"))
> fmla1<-as.formula(paste("~",paste(colnames(ldata[,14:18]),collapse="+"),"-1"))
> fmla2<-as.formula(paste("~",paste(colnames(ldata[,19:23]),collapse="+"),"-1"))
> Block=pdBlocked(list(pdIdent(fmla0),pdIdent(fmla1),pdIdent(fmla2)))
> lme(fixed=Score ~ factor(time)-1,data=ldata,random=list(Block),
+ weights=varIdent(form= ~ 1|time),
+ corre...
2012 Apr 19
2
ANOVA in quantreg - faulty test for 'nesting'?
...case. I think my models
are nested despite the anova.rqlist() function saying otherwise. Here is an
example where the GLM ANOVA regards the models as nested, but the quantile
regression ANOVA tells me the models aren't nested:
y = rnorm(100)
x1 = rnorm(100)
x2 = rnorm(100)
fmla1 = y~I(x1+x2)
fmla2 = y~x1+x2
f1 = glm(fmla1)
f2 = glm(fmla2)
anova(f1,f2) #This works
f1.qr = rq(fmla1)
f2.qr = rq(fmla2)
anova(f1.qr,f2.qr) #Error!
#Error in anova.rqlist(object, ...) : Models aren't nested
Are the models in fact not nested? If they are nested, is there an easy
workaround I could use? Many...
2012 Nov 16
2
R-Square in WLS
...fmla1 <- as.formula(paste("Y ~",paste(xnam, collapse= "+"),"-1",sep=""))
fitlm <- lm(formula=fmla1,data = data.frame(cbind(X,Y)))
ResiSqr <- (residuals(fitlm))*(residuals(fitlm))
fmla2 <- as.formula(paste("ResiSqr ~ ", paste(xnam, collapse=
"+"),"-1",sep=""))
fitResi <- lm(formula=fmla2,data = data.frame(cbind(x,ResiSqr))) # This fit
is to calculate the weights
bResi <- coef(fitResi)
Sigma2 <- X%*%bResi...