Displaying 10 results from an estimated 10 matches for "outmat".
2011 Mar 31
0
dfsane arguments
...v)^2+(Sigma_rr)^2)*(b_2)^2
)
db_2 = -K_rr*b_2+1
da = K_vv*theta_v*b_1+(K_rv*theta_v+K_rr*theta_r)*b_2
})
}
times <- seq(0, 10, by = 0.5)
library(deSolve)
out <- ode(y = state, times = times, func = Kristian, parms = parameters)
# constructing output as a matrix
outmat <- as.matrix(out)
library(BB) #loading BB package
Bo <- function(x, s){
f <- rep(NA, length(x))
f[1] <- (1-exp(outmat[4,4]-outmat[4,3]*x[1]-outmat[4,2]*x[2]))/
( exp(-outmat[1,4]-outmat[1,3]*x[1]-outmat[1,2]*x[2])
+ exp(-outmat[2,4]-outmat[2,3]*x[1]-outmat[2,2]*x[2])
+ exp(-outmat[3,4]-...
2011 Dec 07
1
Output table from for loop
Hi, this might be basic but can't get it to work and it is hampering my R
usage:
#the loop is checking variance of rows, and cutting out rows with
var>numVec[i]
#I define outMat as object names I want to output to (does this make sense?
how else
#can I define sequential numbered output?)
#numVec is numbers I use in the loop
head(Counts)
AN1 AN2 AN3 AN4 var
GENE1 99 0 6 0 2360
GENE2 183 136 137 160 496
GENE3 301...
2011 Apr 28
1
DLSODA error
...olver will continue
anyway.
In above, R1 = 0.2630651367072D+01 R2 = 0.2055665829864D-15
....
Error in optim(par = par, fn = U, method = "Nelder-Mead", control =
list(maxit = 100), :
function cannot be evaluated at initial parameters
...
Error in BBsolve(par = par, fn = Bo, s = s, outmat = outmat, method = c(1,
:
object 'ans.best' not found
In addition: Warning messages:
1: In lsoda(y, times, func, parms, ...) :
an excessive amount of work (> maxsteps ) was done, but integration was
not successful - increase maxsteps
2: In lsoda(y, times, func, parms, ...) :
Return...
2011 Sep 02
1
Using capture.output within a function
..._1*b_2+0.5*
((w[6])^2+(w[7])^2)*(b_2)^2)
db_2 = -w[3]*b_2+1
da = w[1]*w[4]*b_1+(w[2]*w[4]+w[3]*w[5])*b_2
list(c(db_1, db_2, da))
})
}
# time making a sequence from t to T evaluated at each delta seq(t, T,
by = delta)
times <- seq(0, 10, by = 0.5)
outmat <- ode(y = state, times = times, func = Kristian, parms = w)
print(w)
print(outmat)
.
.
.
f<-rep(NA, 1)
f[1] <- 1/(T-1)*sum(log(pJ$p)-log(pJ$J))
f
capture.output(outmat, file = "spgoutput.txt", append = TRUE)
}
fit <- spg(fn =loglik, ...)
[[alternative HTML version d...
2011 Aug 05
2
Which is more efficient?
Greetings all,
I am curious to know if either of these two sets of code is more efficient?
Example1:
## t-test ##
colA <- temp [ , j ]
colB <- temp [ , k ]
ttr <- t.test ( colA, colB, var.equal=TRUE)
tt_pvalue [ i ] <- ttr$p.value
or
Example2:
tt_pvalue [ i ] <- t.test ( temp[ , j ], temp[ , k ], var.equal=TRUE)
-------------
I have three loops, i, j, k.
One to test the all of
2009 Nov 27
1
generating a matrix after a for loop..
Hi all,
I have to ask this and I know that the reason is that I am a newbie with R
programming. So apologize if it is too obvious but I didn't find an answer
after googling and reading "An introduction to R". So i have return
data from 30 instruments and I am fitting a mixture of normal
distributions for the asymmetric marginal distributions and then simulating
from those
2004 Sep 21
3
how to take this experiment with R?
How about:
x <- data.frame(matrix(rnorm(1550),c(50,31)))
model <- step(lm(x[,1] ~ as.matrix(x[,2:31])))
--Matt
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of rongguiwong
Sent: Monday, September 20, 2004 20:52 PM
To: r-help at stat.math.ethz.ch
Subject: [R] how to take this experiment with R?
This message uses
2009 Feb 25
1
leaps question
Colleagues,
please help me with the simple question.
How can I find R2 and p while doing best subsets regression? Also how
can I see B and p for coefficients?
Maybe you can advice me detailed manual, because in manual for the
package this is not described.
Thank you
2007 Aug 08
1
Regsubsets statistics
Dear R-help,
I have used the regsubsets function from the leaps package to do subset
selection of a logistic regression model with 6 independent variables and
all possible ^2 interactions. As I want to get information about the
statistics behind the selection output, I?ve intensively searched the
mailing list to find answers to following questions:
1. What should I do to get the statistics
2002 Feb 11
0
profile
..., maxpts = 100, alphamax = 0.01,
delta.t = cutoff/5)
{
f.summary <- summary(fitted)
std.err <- f.summary$parameters[, "Std. Error"]
npar <- length(std.err)
nobs <- length(resid(fitted))
cutoff <- sqrt(npar * qf(1 - alphamax, npar, nobs - npar))
outmat <- array(0, c(nobs, npar))
out <- list()
prof <- profiler(fitted)
on.exit(prof$setDefault())
for (par in which) {
pars <- prof$getFittedPars()
prof$setDefault(varying = par)
sgn <- -1
count <- 1
varying <- rep(TRUE, npar)...