search for: expit

Displaying 8 results from an estimated 8 matches for "expit".

Did you mean: exit
2011 Mar 19
2
problem running a function
...a and in the console is as follows: > `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3", "4", > "5")) > > RN<-function(y=desman.y,J=5,nsites=39,Nmax=100){ + #### + lik<-function(parms){ + r<-expit(parms[1]) + lambda<-exp(parms[2]) + pvec<-1-(1-r)^(0:Nmax) + gN<-dpois(0:Nmax,lambda) + gN<-gN/sum(gN) + lik<-rep(NA,nsites) + for(i in 1:nsites){ + lik[i]<-sum(dbinom(y[i],J,pvec)*gN) + } + -1*sum(...
2007 Mar 09
1
help with zicounts
...observations from a ZIP model with no intercept and a single covariate x_{i} which is N(0,1). The logit part is logit(p_{i})=x_{i}*beta with beta=1, and the Poisson part is log(?_{i})=x_{i}*gamma with gamma=1. beta.true<-1.0 gamma.true<-1.0 n<-1000 x<-matrix(rnorm(n),n,1) pi<-expit(x*beta.true) mu<-exp(x*gamma.true) y<-numeric(n) # blank vector z<-(runif(n)<pi) # logical: T with prob p_i, F otherwise y[z]<-rpois(sum(z),mu[z]) # draw y_i ~ Poisson(mu_i) where z_i = T y[!z]<-0 # set y_i = 0 where z_i = F Thanks for your time! Jacob Jacob L van Wyk Departme...
2004 Feb 04
1
password expiration warning messages
Hi, I'm using openssh on Solaris. I noticed that the password expitation warning messages are no longer displayed in the login banner. Any idea how to correct this? Thanks, Vanessa Vaz OSS Nokalva, Inc. www.oss.com Tel: 732-302-9669 ext. 112 Fax: 732-302-0023
2013 Jun 24
0
Running MCMC using R2WinBUGS
...:2], T[1:2 ,1:2]) # T is the precision matrix or inverse sigma for MVN for (i in 1:2) { logit(p[j,i])<-p1[j,i] Y[j,i] ~ dbin(p[j,i],n) } } # Hyper-priors: gamma[1:2] ~ dmnorm(mn[1:2],prec[1:2 ,1:2]) mn<-c(-1.59,-2.44) prec<-structure(.Data = c(.001,0,0,.001),.Dim = c(2, 2)) expit[1]<-exp(gamma[1])/(1+exp(gamma[1])) expit[2]<-exp(gamma[2])/(1+exp(gamma[2])) T[1:2 ,1:2] ~ dwish(R[1:2 ,1:2], 2) sigma2[1:2, 1:2] <-inverse(T[,]) rho <- sigma2[1,2]/sqrt(sigma2[1,1]*sigma2[2,2]) R<-structure(.Data = c(.001,0,0,.001),.Dim = c(2, 2)) } # R2WinBUGS code to run MC...
2010 Jul 22
1
function return
...E) pamat<-data[,c("y.1","y.2","y.3")] z<-pamat[,1] M<-length(z) lik<-function(parms){ b0<-parms[1] b1<-parms[2] b2<-parms[3] b3<-parms[4] ones<-rep(1,M) ### Compute binomial success probabilities probs<-expit(b0*ones+b1*elev+b2*(elev^2)+b3*forest) lik<-rep(0,length(z)) ### evaluate log of binomial pmf tmp<-log(dbinom(z,1,probs)) ### substitute 0 for missing values lik[!is.na(z)] <- tmp[!is.na(z)] lik<- -1*sum(lik) return(lik) } out <- nlm(lik,c(0,0...
2008 May 16
1
SE of difference in fitted probabilities from logistic model.
...ence? In a linear model this would just be SE(beta_1.hat)*(x.max-x.mean) (where beta_1.hat is specific to the particular level of `a' being considered). If I am not mistaken. (Please correct me if I am!) But in the logistic model, everything is entangled in the inverse link function (the ``expit'' function as it is called by some), and I can see no way of disentangling. Is there any way of getting at this? I figure that simulation/Monte Carlo inference/ parametric bootstrapping would provide a workaround, but before I go that route, can anyone point me to a simpler method? T...
2004 Nov 05
0
R check passes code and docs that don't match
...consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking Rd files ... OK * checking for missing documentation entries ... WARNING Undocumented code objects: MatrixExp absorbing.mspath coef.mspath crudeinits.mspath deltamethod ematrix.mspath expit expitsum expsum hazard.mspath lik.mspath logit mspath.check.consistency mspath.check.ematrix mspath.check.model mspath.check.qmatrix mspath.check.state mspath.check.times mspath.form.output mspath.process.covs mspath.results observed.mspath odds.mspath plot.mspath pmatrix.mspath pmatrix.p...
2009 Aug 26
2
Statistical question about logistic regression simulation
Hi R help list I'm simulating logistic regression data with a specified odds ratio (beta) and have a problem/unexpected behaviour that occurs. The datasets includes a lognormal exposure and diseased and healthy subjects. Here is my loop: ors <- vector() for(i in 1:200){ # First, I create a vector with a lognormally distributed exposure: n <- 10000 # number of study subjects