Displaying 8 results from an estimated 8 matches for "dy1".
Did you mean:
d1
2013 Apr 21
1
lsoda question from deSolve package
Dear List,
Wonder if you have some thoughts on the following question using lsoda in desolve:
I have the following data and function:
require(deSolve)
times <- c(0:24)
tin <- 0.5
D <- 400
V <- 26.3
k <-0.056
k12 <- 0.197118
k21 <- 0.022665
yini <- c(dy1 = 0,dy2 = 0)
events <- data.frame(var = "dy1",time = c(10,15),value = c(200,100),method = "add")
pkmod <- function(t, y, p) {
if (t < tin) R <- (D/tin) else R <- 0
dy1 <- R - (p["k12"]+p["k"])* y[1] + p["k21"]*y[2]
dy2 <-...
2013 Jun 18
1
deSolve question
...urrently I have this code which produces the expected results:
require(deSolve)
pars <- list(k = 0.08,v=15)
intimes <- c(0,0.5,12)
input <- c(800,0,0)
forc <- approxfun(intimes, input, method="constant", rule=2)
derivs <- function(t, state, pars) {
inp <- forc(t)
dy1 <- - pars$k * state[1] + inp/pars$v
return(list(c(dy1)))
}
model <- function(pars, times=seq(0, 13, by = 0.01)) {
state <- c(y = 0)
return(ode(y = state, times = times, func = derivs, parms = pars,
method="lsoda"))
}
plot(model(pars))
intuitively it would ma...
2008 Oct 15
2
dynlm and lm: should they give same estimates?
...for the code and results.
Can anyone tell my what I am doing wrongly?
Many thanks,
Werner
set.seed(123456)
e1 <- rnorm(100)
e2 <- rnorm(100)
y1 <- ts(cumsum(e1))
y2 <- ts(0.6*y1 + e2)
lr.reg <- lm(y2 ~ y1)
error <- ts(residuals(lr.reg))
error.lagged <- error[-c(99, 100)]
dy1 <- diff(y1)
dy2 <- diff(y2)
diff.dat <- data.frame(embed(cbind(dy1, dy2), 2))
colnames(diff.dat) <- c('dy1', 'dy2', 'dy1.1', 'dy2.1')
ecm.reg <- lm(dy2 ~ error.lagged + dy1.1 + dy2.1,
data=diff.dat)
ecm.dynreg <- dynlm(d(y2) ~ L(error)...
2004 Nov 17
1
how to estimate conditional density
Hi, there.
Suppose I have a bivariate data set y1 and y2. Can anybody tell me how to
estimate the conditional density of f(y1|y2) and vice versa? Thanks.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
734-764-8263(fax)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
2013 May 02
0
modMCMC runs in FME package
...)
intimes <- c(0,0.5,12,12.5,50)
input <- c(800,0,800,0,0)
forc <- approxfun(intimes, input, method="constant")
model <- function(pars, times=seq(0, 50, by = 1)) {
derivs <- function(t, state, pars) {
with(as.list(c(state, pars)), {
inp <- forc(t)
dy1 <- - k* y[1] + inp/v
return(list(c(dy1)))
})
}
state <- c(y = 0)
return(lsoda(y = state, times = times, func = derivs, parms = pars))
}
observed <- matrix (nc=2,byrow=2,data=c(0,0,0.5,19.7,3,17.4,5.5,15.3,8,13.5,11.5,11.3,13,29.8,15.5,26.3,16.5,25,18,23.2,24,17.2,30,12.7,40,7.7,49....
2005 Oct 20
0
[PATCH][VT] disable bogus touchpad device model, which cause annoying dmesg on 2.6 kernel
...high;
} TouchPad;
+#endif
typedef struct KBDState {
KBDQueue queue;
@@ -142,7 +147,9 @@
int mouse_dy;
int mouse_dz;
uint8_t mouse_buttons;
+#ifdef SYNAPTIC
TouchPad touchpad;
+#endif
} KBDState;
KBDState kbd_state;
@@ -399,6 +406,7 @@
dx1 = s->mouse_dx;
dy1 = s->mouse_dy;
dz1 = s->mouse_dz;
+#ifdef SYNAPTIC
if (s->touchpad.absolute)
{
int dz2, dleftnright, dg, df;
@@ -444,6 +452,7 @@
kbd_queue(s, dy1 & 0xFF, 1);
return;
}
+#endif
/* XXX: increase range to 8 bits ? */
if (dx1 > 127)
dx1 = 127...
2010 Nov 28
3
non-linear fourth-order differential equations
I need to solve a system of non-linear fourth-order differential
equations. Is there a command which solves this system?
Thanks in advance.
2000 Feb 08
1
DEC cc doesn't like c++ comments (PR#416)
...if (method == 0) {
GPolyline(ns, xxx, yyy, USER, dd);
@@ -871,7 +871,7 @@
if (gotLabel) {
/* find which plot edge we are closest to */
- int closest; // 0 = index, 1 = index+range
+ int closest; /* 0 = index, 1 = index+range */
double dx1, dx2, dy1, dy2, dmin;
dx1 = fmin2((xxx[index] - dd->gp.usr[0]),
(dd->gp.usr[1] - xxx[index]));
@@ -971,8 +971,8 @@
*/
GConvert(&ux, &uy, USER, INCHES, dd);
GConvert(&vx, &vy, USER, INCHES, dd);
- // 1, 1 => sans serif, basic font
- // 0, .5 => le...