search for: eta

Displaying 20 results from an estimated 755 matches for "eta".

Did you mean: ata
2012 Sep 11
1
Strange result from GAMLSS
Hi Folks! Just started using the gamlss package and I tried a simple code example (see below). Why the negative sigma? John > y <- rt(100, df=1)> m1<-fitDist(y, type="realline")Warning messages:1: In MLE(ll3, start = list(eta.mu = eta.mu, eta.sigma = eta.sigma, : possible convergence problem: optim gave code=1 false convergence (8)2: In MLE(ll4, start = list(eta.mu = eta.mu, eta.sigma = eta.sigma, : possible convergence problem: optim gave code=1 false convergence (8)3: In MLE(ll4, start = list(eta.mu = eta.mu, et...
2005 Apr 14
0
predict.glm(..., type="response") dropping names (and a propsed (PR#7792)
Here's a patch that should make predict.glm(..., type="response") retain the names. The change passes make check on our Opteron running SLES9. One simple test is: names(predict(glm(y ~ x, family=binomial, data=data.frame(y=c(1, 0, 1, 0), x=c(1, 1, 0, 0))), newdata=data.frame(x=c(0, 0.5, 1)), type="response")) which gives...
2011 Sep 23
4
'save' saved object names instead of objects
Hello, I created an array to hold the results of a series of simulations I'm running: d.eta <- array(0,dim=c(3,3,200)) <simulation goes here and populates the array but it's not important> Then I tried to save the results using this: save(d.eta,file="D:/Simulation Results/sim 9-23-11 deta") When I later tried to reload them using this: d.eta <- load(file=&qu...
2008 Apr 03
1
help with R semantics
...stop (paste("POD.ceiling-POD.floor difference must be greater than ",difference.criterion," to discourage answer-shopping.", sep="")) linkfun <- function(mu) { mu <- qlogis( (mu - POD.floor)/(POD.ceiling - POD.floor) ) } linkinv <- function(eta) { eta <- POD.floor + (POD.ceiling - POD.floor)*plogis(eta) } mu.eta <- function(eta) { (POD.ceiling - POD.floor)*dlogis(eta)# derivitaive of mu with respect to eta } valideta <- function(eta) TRUE link <- paste("logit.FC(", POD.floor, "...
2010 Aug 03
2
incorrect number of dimensions
Hi, How to solve this problem. The following is the code. betabinexch0=function(theta,data) + { + eta=theta[,1] + K=theta[,2] + y=data[,1]; n=data[,2] + N=length(y) + val=0*K; + for (i in 1:N) + val=val+lbeta(K*eta+y[i],K*(1-eta)+n[i]-y[i]) + val=val-N*lbeta(K*eta,K*(1-eta)) + val=val-2*log(1+K)-log(eta)-log(1-eta) + return(val) + } > data(cancermortality)...
2009 Jun 03
2
code for double sum
Hi R-users,   I wrote a code to evaluate double sum as follows:   ff2 <- function(bb,eta,z,k) { r <- length(z) for (i in 1:r) { sm1 <- sum((z[i]*bb/2)*(psigamma((0:k)+eta+1,deriv=0)/(factorial(0:k)*gamma((0:k)+eta+1))))  sm2 <- sum((besselI(z[i]*bb,eta)*log(z[i]*bb/2) - sm1)/besselI(z[i]*bb,eta))  sm2 } ff2(bb,eta,z,10)     but it gave me the following message:   > source(...
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
....fit if two conditions are met simultaneously. Namely, (1) the design matrix is such that the QR algorithm used in the weighted least squares (WLS) step has to pivot columns (lines 81-86) and (2) during the iterations the step size has to be truncated (either lines 98-114 or lines 115-130). More details: In line 90, the variables "start" and "coef" are set to the coefficients of the WLS and "start" is then permuted (line 91) to take a possible pivoting of the QR algorithm into account. Note that "coef" is not permutated. Also, since the weights in the...
2011 May 19
3
problem with optim()
...2 = x[(ncol(X)+1)] x3 = matrix(x[(ncol(X)+2):(ncol(X)+1+ncol(X)*ncol(Y))],nrow=ncol(X),ncol=ncol(Y)) x4 = x[(ncol(X)+1+ncol(X)*ncol(Y)+1):length(x)] gr1 = rep(0,ncol(X)) gr4 = rep(0,ncol(Y)) gr3 = matrix(0,nrow=ncol(X),ncol=ncol(Y)) gr1.b = matrix(0,nrow=nrow(X),ncol=ncol(X)) gr2.b = rep(0,nrow(X)) eta = matrix(0,nrow=nrow(X),ncol=ncol(Y)) d.eta.3 = array(0,dim=c(nrow(X),ncol(X),ncol(Y))) d.eta.4 = matrix(0,nrow=nrow(X),ncol=ncol(Y)) gr3.b1 = array(0,dim=c(nrow(X),ncol(X),ncol(Y))) gr4.b1 = matrix(0,nrow=nrow(X),ncol=ncol(Y)) $B!!(B #Gradiant of alpha and beta for (i in 1:nrow(X)) { gr1.b[i,] =...
2011 Jun 23
0
Fwd: Re: Help with winbugs code
...lam[5]*xi[i,3] mu[i,9]<-lam[6]*xi[i,3] #faktor Desain Antarmuka mu[i,10]<-xi[i,4] mu[i,11]<-lam[7]*xi[i,4] mu[i,12]<-lam[8]*xi[i,4] #faktor Persepsi Kualitas mu[i,13]<-xi[i,5] mu[i,14]<-lam[9]*xi[i,5] mu[i,15]<-lam[10]*xi[i,5] #faktor Persepsi Kemudahan Kegunaan mu[i,16]<-eta[i,1] mu[i,17]<-lam[11]*eta[i,1] mu[i,18]<-lam[12]*eta[i,1] #faktor Persepsi Kegunaan mu[i,19]<-eta[i,2] mu[i,20]<-lam[13]*eta[i,2] mu[i,21]<-lam[14]*eta[i,2] mu[i,22]<-lam[15]*eta[i,2] #faktor Sikap ke arah Penggunaan mu[i,23]<-eta[i,3] mu[i,24]<-lam[16]*eta[i,3] mu[i,25]&...
2010 Mar 15
0
Partial Credit Models using eRm
...cm) # Item location map plotPImap(bart_pcm, item.subset=c(1,2)) but I can't get the person-item plot to work. I receive an error from R saying: Error in xb[, dim(xb)[2]] : incorrect number of dimensions. Secondly, How would you interpret the following parameter estimates i.e. the eta and beta estimates?: > summary(bart_pcm) Results of PCM estimation: Call: PCM(X = mat1) Conditional log-likelihood: -206.1496 Number of iterations: 40 Number of parameters: 19 Basic Parameters (eta) with 0.95 CI: Estimate Std. Error lower CI upper CI eta 1 0.786 0.565...
2005 Jul 22
1
multiplicate 2 functions
Thks for your answer, here is an exemple of what i do with the errors in french... > tmp [1] 200 150 245 125 134 345 320 450 678 > beta18 Erreur : Objet "beta18" not found //NORMAL just to show it > eta [1] 500 > func1<-function(beta18) dweibull(tmp[1],beta18,eta) > func1<-func1(beta18) * function(beta18) dweibull(tmp[2],beta18,eta) Erreur dans dweibull(tmp[1], beta18, eta) : Objet "beta18" not...
2008 Jun 13
1
Writing a new link for a GLM.
Hi, I wish to write a new link function for a GLM. R's glm routine does not supply the "loglog" link. I modified the make.link function adding the code: }, loglog = { linkfun <- function(mu) -log(-log(mu)) linkinv <- function(eta) exp(-exp(-eta)) mu.eta <- function(eta) exp(-exp(-eta)-eta) valideta <- function(eta) all(eta != 0) }, stop(sQuote(link), " link not recognised")) structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta, valideta = valideta, name =...
2008 Mar 15
1
again with polr
...summary, now I have another one eg I estimate > try.op <- polr( > as.ordered(sod.sit.ec.fam) ~ > log(y) + > log(1 + nfiglimin) + > log(1 + nfiglimagg) + > log(ncomp - nfiglitot) + > eta + > I(eta^2) + > uomo + > elem + > laurea + > saluteno + > extra > , > data = dfscale, > method = "probit", >...
2007 Mar 07
1
Failure to run mcsamp() in package arm
...mple: **************************************** > M1 <- lmer (y1 ~ x + (1|group)) > (M1.sim <- mcsamp (M1)) fit using lmer, 3 chains, each with 1000 iterations (first 500 discarded) n.sims = 1500 iterations saved mean sd 2.5% 25% 50% 75% 97.5% Rhat n.eff beta.(Intercept) 0.1 0.7 -1.2 -0.3 0.1 0.5 1.4 1.0 1500 beta.x 2.5 0.4 1.7 2.2 2.5 2.7 3.2 1.0 1500 sigma.y 3.8 0.3 3.3 3.6 3.7 3.9 4.3 1.0 61 sigma.grop.(In) 1.5 0.8 0.0 1.0 1.4 1.9 3.3 1.4 12 eta.group.(Inter...
2011 Aug 18
3
Error message: object of type 'closure' is not subsettable
Dear R-users I need to calibrate kappa, rho, eta, theta, v0 in the following code, see below. However when I run it, I get: y <- function(kappahat, rhohat, etahat, thetahat, v0hat) {sum(difference(k, t, S0, X, r, implvol, q, kappahat, rhohat, etahat, thetahat, v0hat)^2)} > nlminb(start=list(kappa, rho, eta, theta, v0), objective = y, lower...
2006 Mar 01
1
a strange problem with integrate()
Dear all, I am stuck on the following problem with integrate(). I have been out of luck using RSiteSearch().. My function is g2<-function(b,theta,xi,yi,sigma2){ xi<-cbind(1,xi) eta<-drop(xi%*%theta) num<-exp((eta + rep(b,length(eta)))*yi) den<- 1 + exp(eta + rep(b,length(eta))) result=(num/den)*exp((-b^2)/sigma2)/sqrt(2*pi*sigma2) r=prod(result) return(r) } And I am interes...
2008 May 10
2
substitute in graphics - Uwe's help desk
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20080510/28c07d4e/attachment.pl>
2006 Jul 30
1
Parametric links for glm?
...mial permitting the parameters to be passed down to the fitting routines. So, in the Gosset case, for example, had the following passage in make.link, involving a free degrees of freedom parameter nu: }, Gosset = { linkfun <- function(mu) qt(mu,nu) linkinv <- function(eta) { thresh <- -qqt(.Machine$double.eps,nu) eta <- pmin(thresh, pmax(eta, -thresh)) pt(eta,nu) } mu.eta <- function(eta) pmax(dt(eta,nu), .Machine$double.eps) valideta <- function(eta) TRUE }, Just prior to the useR meetin...
2006 Mar 08
1
Want to fit random intercept in logistic regression (testing lmer and glmmML)
...ct parameter estimates from glmmML and lmer, but the information they give on the variance components is quite different. Thanks in advance. Now I paste in the example code ### Paul Johnson <pauljohn at ku.edu> ### 2006-03-08 N <- 1000 A <- -1 B <- 0.3 x <- 1 + 10 * rnorm(N) eta <- A + B * x pi <- exp(eta)/(1+exp(eta)) myunif <- runif(N) y <- ifelse(myunif < pi, 1, 0) plot(x,y, main=bquote( eta[i] == .(A) + .(B) * x[i] )) text ( 0.5*max(x), 0.5, expression( Prob( y[i] == 1) == frac( 1 , 1 + exp(-eta[i] )))) myglm1 <- glm ( y ~ x, family=binomial(...
2012 Aug 10
0
error applying user-defined link function to lmer
...added the corresponding problems I encountered with each of these attempts. 1) I've used the link function as specified at https://stat.ethz.ch/pipermail/r-help/2007-August/138436.html # define link function halflogit=function(){ half.logit=function(mu) qlogis(2*mu-1) half.logit.inv=function(eta) .5*plogis(eta)+.5 half.logit.deriv=function(eta) .5*(exp(eta/2)+exp(-eta/2))^-2 half.logit.inv.indicator=function(eta) TRUE half.logit.indicator=function(mu) mu>.5 & mu<1 link <- "half.logit" structure(list(linkfun = half.logit, linkinv = half.logit.inv, ???????????????????...