Dear all R-members
I have a problem with R when i wanted to call WinBUGS from R as following:
#Call WinBUGS
model<-bugs(data,inits,parameters,model.file="D:/Run/model.txt",
n.chains=2,n.iter=5000,n.burnin=1000,n.thin=1,'DIC=True',
bugs.directory="c:/Program Files/WinBUGS14/",
worki
Hey, read and follow the posting guide -- go through a tutorial or
two, post some code and data, perhaps. Also check out CRAN's time
series task view here:
http://cran.r-project.org/web/views/TimeSeries.html.
You might also try stats.stackexchange.com , as this seems to have
more to do with statis
Hey I'm trying to fit the non-linear dynamical model as shown in the
image to some time series data. The idea is also to utilize k-fold cross
validation to estimate the prediction error. The term Po will be
assumed to be constant over a certain timer period and will have to be
estimated for eac
Another approach to to make a table and extract your summaries from the
table:
> tbl <- with(Test, table(ID, IsZero=X==0))
> tbl
IsZero
ID FALSE TRUE
1 31
2 02
3 03
> sum(tbl[,"FALSE"] == 0)
[1] 2
> sum(tbl[,"FALSE"] == 0 & rowSums(tbl)>=3)
[
.. that should have been either
myProc <- function(FUN, ...) do.call(FUN,list(...))
or
myProc <- function(FUN, ...) FUN(...)
My other comments still apply.
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is
"Automate" is vague and ill-defined. But perhaps ?do.call is what
you're looking for; e.g.
myProc <- function(FUN, ...) do.call(FUN,...)
This is one of the cool things about functional type programming --
you can pass functions as arguments.
If this is not it, maybe someone else will groc what y
How do I specify the type of regression in calling a procedure/
In the following I call the procedure to do a probit regression. Of
course, I can change "probit" into "lm" in procedure "myreg" to do a
linear regression.
My question is, how do I automate this (choice of lm or probit) in
callin
Unfortunately for you, there is a no-homework policy on this list. Please read
the Posting Guide.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go..
From my Android phone on T-Mobile. The first nationwide 4G network.
Messaggio originale
Da: ESMERALDA PODA
Data:12/22/2014 02:44 PM (GMT+01:00)
A: r-help@r-project.org
Oggetto: VaR and ES in R
Hi everybody,
This is the homework I am trying to solve.
Ex. Assume that y
Dear all,
I'm using the package "survival" for adjusting the Cox model with multiple
events (Prentice, Williams and Peterson Model). I have several covariates,
some of them are time-dependent.
I'm using the function"cox.zph" to check the proportional hazards. Due to
the nature of the time-depende
> tmp <- split(Test, Test$ID)
>
> # number of subjects with X=0 (all periods)
> x <- lapply(tmp, function(x) all(x$X ==0))
> length(x[unlist(x)])
[1] 2
>
> # number of subjects with X=0 (at least three weeks)
> x <- lapply(tmp, function(x) sum(x$X==0)>=3)
> length(x[unlist(x)])
[1] 1
>
Is this wh
Spend a little time with aggregate()
?aggregate
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of najuzz
Sent: Monday, Dec
#Hi guys,
#I would like to count the number of individuals that receive X=0 troughout
their observational period.
#example dataset:
ID<-c(1,1,1,1,2,2,3,3,3)
X<-c(0,1,2,1,0,0,0,0,0)
Time<-c(1,2,3,4,1,2,1,2,3)
Test<-data.frame(ID,X,Time)
# Individuals 2 and 3 have x=0 during all their periods. Th
Hi everybody,
This is the homework I am trying to solve.
Ex. Assume that you have a position of 144530 shares of Bill inc.. The
object Y2 contains an iid sample of the returns for these shares. Assume
that data follow a Student distribution.
1.
Compute the maximum likelihood estimate for
Here's the answer to my question that I came up with after working with all
of your suggestions. It's not elegant by any means but gets the job done:
MERGE_PViol.Detail.Per.Case <-
read.csv("~/FOIA_FLSA/MERGE_PViol.Detail.Per.Case_for_rtf10.csv",
stringsAsFactors=TRUE)
# select only certain colum
15 matches
Mail list logo