Displaying 5 results from an estimated 5 matches for "tianchan".
2010 Dec 14
3
Question about cut()
...as.factor(as.numeric(cut(r,c(0,2,4,6,8,10,100))))
> levels(col_no) <- c("<2%","2-4%","4-6%","6-8%","8-10%",">10%")
> col_no
[1] <2%? <2%? 2-4% <2%? <2%? <2%
Levels: <2% 2-4% 4-6% 6-8% 8-10% >10%Thanks,
Tianchan
2010 Sep 16
1
More accurate ODE solver?
Dear All,
I was using rk4 and lsoda to solve a ODE system. However, both of them gave
bad accurate solutions, especially compared with Matlab solver ODE45. For
example, ODE45 gave solutions that can go to a stable level (about 1.6) when
time goes to infinity, however, the solutions from lsoda are decreasing to
very very small (about 1e-130) numbers.
Does R have more accurate ODE solvers as
2010 Sep 20
1
ERROR: Object not found
Dear All,
I am trying to use ode solver "rk4" to solve an ODE system, however, it
keeps saying: Error in eval(expr, envir, enclos) : object "dIN" not found.
The sample codes are enclosed as follows, please help me. Thank you very
much!
rm(list=ls())
library(odesolve)
# The ODE system
ode <- function(t,x,p){
with(as.list(c(x,p)),{
2010 Sep 20
1
Ask for help with Error: Object not found
Dear All,
I am trying to use ode solver "rk4" to solve an ODE system, however, it
keeps saying: Error in eval(expr, envir, enclos) : object "dIN" not found.
The sample codes are enclosed as follows, please help me. Thank you very
much!
rm(list=ls())
library(odesolve)
# The ODE system
ode <- function(t,x,p){
with(as.list(c(x,p)),{
2010 Nov 16
1
Error: invalid type(list) for variable when using lm()
Try this:
y <- rnorm(100)
X <- matrix(runif(100 * 10), ncol = 10)
lm(y ~ ., data = cbind.data.frame(y, X))
On Tue, Nov 16, 2010 at 5:07 PM, Tianchan Niu <niu@isis.georgetown.edu>wrote:
> Dear All,I would like to do multiple regression in R. I used: lm(y~X),
> where y is a n by 1 vector, and X is a n by m matrix. I kept getting the
> error
> message:Error in model.frame.default(formula = y ~ X, : invalid type
> (list) for...