search for: yhat1

Displaying 4 results from an estimated 4 matches for "yhat1".

Did you mean: yhat
2004 Aug 25
1
brlr function
...egression function. However, I am not sure why I am encountering errors. I hope to seek your advice here. (output below) Thank you! Your help is truly appreciated. Min-Han #No error here, the glm seems to work fine > genes.cox1.glm1<-glm(as.formula(paste(paste('as.integer(sim.cv.cox.yhat1)~'),paste('sim.dat.tst[',genes.cox1.rows,',]',sep="",collapse='+')))) #Something happened here ... I only substituted brlr for glm > genes.cox1.glm1<-brlr(as.formula(paste(paste('as.integer(sim.cv.cox.yhat1)~'),paste('sim.dat.tst[',genes...
2004 Apr 13
0
In-sample / Out-of-sample using R
...# Sorting just makes d more readable cat("Subset of insample points --\n"); print(d) # Estimate a linear regression using all points m1 = lm(y ~ x, D) # Estimate a linear regression using only the subset m2 = lm(y ~ x, D, subset=d) # Get to predictions -- yhat1 = predict.lm(m1, D); yhat2 = predict.lm(m2, D) # And standard deviations of errors -- full.s = sd(y - yhat1) insample.s = sd(y[d] - yhat2[d]) outsample.s = sd(y[-d] - yhat2[-d]) cat("Sigmas of prediction errors --\n") cat(" All points used in estimation, in samp...
2010 Jan 16
2
predict.glm
...>Error in eval(predvars, data, env) : numeric 'envir' arg not of length one yhat=predict(reg1,data=x2) ##works fine ##using offset ofst=rep(0.5,100) reg1=glm(y1~x1,binomial,offset=ofst) yhat=predict(reg1) yhat1=predict(reg1,newdata=x2) ##gives error message yhat2=predict(reg1,data=x2) ##works fine % ================================================= % Maurice CHARBIT % Ecole Nationale Supérieure des Télécommunications % Département TSI % 37,39 rue Dareau, pièce A321 % 75634 - PARIS cedex...
2008 Apr 04
2
predict.glm & newdata
Hi all - I'm stumped by the following mdl <- glm(resp ~ . , data = df, family=binomial, offset = ofst) WORKS yhat <- predict(mdl) WORKS yhat <- predict(mdl,newdata = df) FAILS Error in drop(X[, piv, drop = FALSE] %*% beta[piv]) : subscript out of bounds I've tried without offset, quoting binomial. The offset variable ofst IS in df. Previous postings indicate possible