search for: m2b

Displaying 10 results from an estimated 10 matches for "m2b".

Did you mean: 2b
2011 Sep 03
2
problem in applying function in data subset (with a level) - using plyr or other alternative are also welcome
...rep(3, 3)) y <- rnorm(10, 8, 2) # variable set 1 M1a <- sample (c(1, 2,3), 10, replace= T) M1b <- sample (c(1, 2,3), 10, replace= T) M1aP1 <- sample (c(1, 2,3), 10, replace= T) M1bP2 <- sample (c(1, 2,3), 10, replace= T) # variable set 2 M2a <- sample (c(1, 2,3), 10, replace= T) M2b <- sample (c(1, 2,3), 10, replace= T) M2aP1 <- sample (c(1, 2,3), 10, replace= T) M2bP2 <- sample (c(1, 2,3), 10, replace= T) # variable set 3 M3a <- sample (c(1, 2,3), 10, replace= T) M3b <- sample (c(1, 2,3), 10, replace= T) M3aP1 <- sample (c(1, 2,3), 10, replace= T) M3bP2 &lt...
2012 Apr 10
1
compare two matrices
Dear Members, I have two estimated transition matrices and I want to compare them. In fact I want to check the hypothesis if they come from the same process. I tried to look for some test but all I found was independence test of contingency tables. The following code shows that the usual chi-squared test statistic does not follow chisq distribution. MCRepl <- 5000 khi12 <- rep(0,MCRepl)
2011 May 04
0
Fwd: simple question
...rrected version: Dear R experts I have simple question, please execuse me: #example data, the real data consists of 20000 pairs of variables K1 <- c(1,2,1, 1, 1,1); K2 <- c(1, 1,2,2, 1,2); K3 <- c(3, 1, 3, 3, 1, 3) M1a <- rep( K1, 100); M1b <- rep(K2, 100) M2a <- rep(K1, 100); M2b <- rep(K1, 100) M3a <- rep(K1, 100); M3b <- rep(K3, 100) mydf <- data.frame(M1a, M1b, M2a, M2b, M3a, M3b) # matrix operation nmat <- matrix(c(paste('M', 1:3, 'a', sep = ''), paste('M', 1:3, 'b', sep = '')), 3) coffin <- function(x...
2010 Jan 27
1
term.formula error when updating an nls object
...directly with nls m2a <- nls(Response ~ Rm * Contrast^ex/(Contrast^fx + sig^fx), data = dd, start = list(Rm = 30, sig = 0.05, ex = 3, fx = 3.1)) nor with fitting the model with the data transformed (though it is not necessarily the way I would like to fit the model in this case). m2b <- update(m1, log(.) ~ log(.)) m3 <- update(m2b, . ~ log(Rm * Contrast^ex/(Contrast^fx + sig^fx)), start = list(Rm = 30, sig = 0.05, ex = 3, fx = 3.1)) sessionInfo() R version 2.10.1 Patched (2010-01-25 r51051) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/...
2007 Feb 13
1
lme4/lmer: P-Values from mcmc samples or chi2-tests?
...m2a: number_pollinators ~ logpatch + landscape_diversity + (1 | site) m2: number_pollinators ~ logpatch + loghab + landscape_diversity + (1 | site) Df AIC BIC logLik Chisq Chi Df Pr(>Chisq) m2a 4 84.713 91.850 -38.357 m2 5 84.834 93.755 -37.417 1.8793 1 0.1704 ## m2b=update(m2,~.-logpatch) anova(m2,m2b,test="Chi") Data: primula Models: m2b: number_pollinators ~ loghab + landscape_diversity + (1 | site) m2: number_pollinators ~ logpatch + loghab + landscape_diversity + m2b: (1 | site) Df AIC BIC logLik Chisq Chi Df Pr(>Chisq) m2b...
2006 Jan 19
1
nls profiling with algorithm="port" may violate bounds (PR#8508)
...--- library(stats4) mfun <- function(a,b,s) { if (a<0 || b<0 || s<0) stop("bounds violated") -sum(dnorm(y,a*x/(1+a*b*x),sd=s,log=TRUE)) } m2 = mle(minuslogl=mfun, start=list(a=1,b=1,s=0.1), method="L-BFGS-B",lower=c(0.002,0.002,0.002)) confint(m2) m2b = mle(minuslogl=mfun, fixed=list(b=0),start=list(a=1,s=0.1), method="L-BFGS-B",lower=c(0.002,0.002,0.002)) ## set boundary slightly above zero to avoid ## boundary cases dev <- 2*(-logLik(m2b)+logLik(m2)) as.numeric(pchisq(dev,lower.tail=FALSE,df=1))
2014 Mar 17
5
LD50
Quiero comparar varias dosis letales 50% (LD50) usando análisis probit. He seguido un ejemplo que viene en paquete DRC, pero no obtengo el resultado esperado. Lo que quiero es saber si las LD50s, son diferentes y si la diferencias son estadísticamente significativas. Gracias de antemano. José Arturo e-mail. jafarfan@uady.mx <grejon@uady.mx> e-mail alterno. jafarfan@gmail.com
2011 Jun 30
0
CCF of two time series pre-whitened using ARIMA
...reg argument. I have some sample code: set.seed(66) x = arima.sim(list(order=c(1,1,0), ar=.9), n=100) + 50 y=c(x[-1:-3],x[98:100]) # Method 1 m1a=arima(diff(x),order=c(1,0,0)) m1b=arima(diff(y),order=c(1,0,0)) a=ccf(resid(m1a),resid(m1b)) # Method 2 m2a=arima(x,order=c(1,1,0),xreg=1:length(x)) m2b=arima(y,order=c(1,1,0),xreg=1:length(y)) b=ccf(resid(m2a),resid(m2b)) My question is why do the two methods generate different results for the CCF (one having a peak correlation at lag 4 and the other at lag 3, and the correlations are also of slightly different values)? I am assuming Method 2 is...
2006 Jan 17
0
nls profile with port/constraints
...------ library(stats4) mfun <- function(a,b,s) { if (a<0 || b<0 || s<0) stop("bounds violated") -sum(dnorm(y,a*x/(1+a*b*x),sd=s,log=TRUE)) } m2 = mle(minuslogl=mfun, start=list(a=1,b=1,s=0.1), method="L-BFGS-B",lower=c(0.002,0.002,0.002)) confint(m2) m2b = mle(minuslogl=mfun, fixed=list(b=0),start=list(a=1,s=0.1), method="L-BFGS-B",lower=c(0.002,0.002,0.002)) ## set boundary slightly above zero to avoid ## boundary cases dev <- 2*(-logLik(m2b)+logLik(m2)) as.numeric(pchisq(dev,lower.tail=FALSE,df=1)) -- 620B Bartram Hall...
2005 Dec 21
9
question about changejournal
Hi, I''ve got a newbie question--sorry if this is covered elsewhere, I parsed through the archives for awhile and didn''t see it. I''d like to listen for whenever a file is renamed (e.g. foo.txt -> foo.old) and then magically change it back. This sounds odd, but I''m working with a stubborn application and this will actually make things work nice. So, if I do: