Displaying 20 results from an estimated 400 matches similar to: "Using apply() with a function involving ode()"
2012 Oct 23
1
repeat takes along time
Hi
I want help for "repeat" because it takes a long time
repeat{
for (i in 1:n){
probb[i]=sum(Wc[z[,j]>=yb[i]])
}
deltab[,b]=rbinom(n,1,probb)
if(length(which(is.na(deltab[,b])==T))==0){break}
}
This code works but takes much computation time.
Anyone could help me to find a solution to take a shor time.
Thanks
Jorge
--
View this message in context:
2006 May 16
1
Cannot load irr package
The irr package seems to install correctly:
> install.packages("irr")
trying URL 'http://cran.us.r-project.org/src/contrib/irr_0.61.tar.gz'
Content type 'application/x-tar' length 13848 bytes
opened URL
==================================================
downloaded 13Kb
* Installing *source* package 'irr' ...
** R
** data
** help
>>>
2008 Aug 22
3
simple generation of artificial data with defined features
Dear R-colleagues,
I am quite a newbie to R fighting my stupidity to solve a probably quite
simple problem of generating artificial data with defined features.
I am conducting a study of inter-observer-agreement in
child-bronchoscopy. One of the most important measures is Kappa
according to Fleiss, which is very comfortable available in R through
the irr-package.
Unfortunately medical doctors
2006 Jun 18
1
bug with boot.sw98 function (PR#8999)
Full_Name: Nuno Monteiro
Version: 2.3.1
OS: Windows XP HE
Submission from: (NULL) (84.9.38.207)
I'm using the FEAR library to perform Data Envelopment analysis with a 36,000
obs dataset.
The function dea is working fine but then when I try to use the boot.sw98 to
come up with some sensitivity analysis I get the following error:
2008 Jan 03
1
KernSmooth: bkde and dpik bandwidth questions
Hi,
I have two separate questions relating to the KernSmooth package. I am
using the dpik function from the KernSmooth package and receive the error
Warning message:
In kappam * Gcounts :
longer object length is not a multiple of shorter object length
I saw an earlier post , but the issue was using the bkde fxn and the
person appeared to be using too small of a bandwidth.
2012 Sep 02
1
glmulti runs indefinitely when using genetic algorithm with lme4
Dear List,
I'm using glmulti for model averaging in R. There are ~10 variables in my
model, making exhaustive screening impractical - I therefore need to use
the genetic algorithm (GA) (call: method = "g").
I need to include random effects so I'm using glmulti as a wrapper for
lme4. Methods for doing this are available here
2002 May 27
0
fitting a model for enumerated datatypes
Saket Joshi asks:
> -----Original Message-----
> From: Saket Joshi [mailto:joshi at engr.orst.edu]
> Sent: Monday, May 27, 2002 6:15 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] fitting a model for enumerated datatypes
>
> Hi,
>
> I have used the scan() function to read data from a file as follows:
>
> x <- scan("myfile",
2009 Jul 13
3
Help With Fleiss Kappa
Hi All,
I am using fleiss kappa for inter rater agreement. Are there any know
issues with Fleiss kappa calculation in R? Even when I supply mock data
with total agreement among the raters I do not get a kappa value of 1.
instead I am getting negative values.
I am using the irr package version 0.70
Any help is much appreciated.
Thanks and Regards
M
[[alternative HTML version deleted]]
2003 Jan 21
1
Orders of terms in formulae
Hi,
Given that R reports Type I sums of squares, isn't it a bit anachronistic
that it re-orders terms in formulae?
> d <- expand.grid(y=rnorm(8),
+ A=factor(c(1,2)),
+ B=factor(c(1,2)),
+ C=factor(c(1,2)))
> summary(aov(y ~ A+B+A:B+C,data=d))
Df Sum Sq Mean Sq F value Pr(>F)
A 1 8.294e-34 8.294e-34 1.027e-33 1
2013 Jan 11
0
Weighted Kappa for m Raters
Hello, I have 50 raters and 180 cases which are rated as malignant, probably malignant, probably benign, and benign. I want to compare all the raters but I want a weighted kappa to penalize differences between malignant and benign more than differences between malignant and probably malignant. I only found the weighted option in the 2-rater functions (kappa2, wkappa, cohen.kappa). The
2002 Jul 16
2
ANOVA-like tests of geometrically-distributed data
I have a statistical problem which has given me no end of grief recently,
and am posting here in the hope that somebody can give me a straight
answer. I'm a IT postgrad, not a statistician, so people may have to
speak really slowly and clearly for me to get it :)
I am collecting simulation data, and the results are geometrically
distributed (or approximately so). From what I can gather
2007 Nov 30
2
Quantiles and QQ plots
I have 20 variables:
5,9,6,1,5,9,7,4,5,6,3,2,4,8,9,6,1,8,4,8
How do I calculate the corresponding quantiles from a normal distribution
with the same mean and variance as the sample?
Also, how do I draw a QQ plot of the data?
Thanks for any help!
--
View this message in context: http://www.nabble.com/Quantiles-and-QQ-plots-tf4925742.html#a14097909
Sent from the R help mailing list archive at
2008 Sep 01
3
convenient way to calculate specificity, sensitivity and accuracy from raw data
Dear R-colleagues,
this is a question from a R-newbie medical doctor:
I am evaluating data on inter-observer-reliability in endoscopy. 20
medical doctors judged 42 videos filling out a multiple choice survey
for each video. The overall-data is organized in a classical way:
observations (items from the multiple choice survey) as columns, each
case (identified by the two columns "number of
2002 Jun 06
1
sampling from data frame
Hello,
after searching through the archives and
not finding a thread that answers this question,
I thought I'd pass it on to the list.
Given a data frame and given a factor variable
that assigns a class to each case in the data frame,
what is the most efficient way to sample
a given number of cases from each class?
I've found a roundabout solution that works as follows:
for each class:
2003 Jan 11
2
beta-binomial
Does anyone have R functions or library to fit a beta-binomial distribution
with glm? Thanks.
2002 May 17
2
Blue Book
I came across a very cheap of the infamous blue book - The New S Language
(1988). Is this book still relevant to modern S or R or am I wasting my
time?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the
2002 Oct 23
1
vectorizing a function
Dear R-xperts
I have just written a little hypergeometric function, included below
[the hypergeometric function crops up when solving a common type of
ODE].
It works fine on single values of the primary argument z, but
vectorizing it is getting confusing.
The best I have come up with so far just tests for z being longer than
1 and if so, uses sapply() recursively. This is fine, except that it
2010 Dec 23
0
epidemiology ode likelihood, hierarchical model
Hi all,
I study epidemiology of soilborne disease.
I have this ode model
dS/dt = - (rp(t) X + rs(t) I) * S
with X=1 ; rp(t) = ap exp( - bp*t) ;
rs(t) = as exp (-0.5 ( ln (t/ds) / bs)? )
The data I have are not directly the infected individuals (which is a
hidden state) but the Diseases ones (individuals who show aerial
symptoms). I have studied with experiments the relationship between
the
2018 Apr 12
1
ODE
Hello All,
I'm struggling to solve this ODE using R,
vdpol <- function (h, v, t) (
list(c (
-0.1*v/(pi*(2*10*h-h^2)),
(v = (-0.1*v/(pi*(2*10*h-h^2))^2) + 2*9.81*h))
))
library(deSolve)
yini <- (c(h = 20, v=0))
nonstiff <- ode(y = yini, func = vdpol,
times= seq(0, 30, by =
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