This following works for me but I still favor the quick and dirty method
suggested originally by David.
options(scipen = 10)
x <- seq(0,2, by = .01)
f <- expression(5*cos(2*x)-2*x*sin(2*x))
D(f, 'x')
f.prime <- function(x){
-(5 * (sin(2 * x) * 2) + (2 * sin(2 * x) + 2 * x * (cos(2 * x) *
Try running this and see if it does what you want. It just uses plain
old plot with the cex arg for size and the col arg for colour...
greyDots <- function() {
# make up some data
x <- runif(50, 0, 10)
y <- runif(50, 0, 10)
valueMax <- 100
value <- sample(valueMax, 50)
# edit these to
I can actually answer this!! I was trying to figure out how to use sapply
for a function I wrote with multiple arguments.
Suppose the function is called
FUN(a,b), where "a" is a number and "b" is a number
You can use mapply(FUN, a = VECTOR, b = VECTOR) where each vector is your
input arguments.
Hi all,
I'm interested in doing a dot plot where *both* the size and color (more
specifically, shade of grey) change with the associated value.
I've found examples online for ggplot2 where you can scale the size of the
dot with a value:
http://had.co.nz/ggplot2/graphics/6a053f23cf5bdfe5155ab53d3
On Aug 12, 2010, at 12:49 AM, Dennis Murphy wrote:
Hi:
Try the following:
f <- function(x) 5*cos(2*x)-2*x*sin(2*x)
curve(f, -5, 5)
abline(0, 0, lty = 'dotted')
This shows rather clearly that your function has multiple roots,
which isn't
surprising given that it's a linear combination of si
Hi,
One way you could do it is to create a separate graph for each
category. The y axis labels would replace the strip labels. You could
then stack the graphs on the page, and add a common legend. The tricky
part would be to make sure the different panels have the same width
and height.
Another o
Hi:
Try the following:
f <- function(x) 5*cos(2*x)-2*x*sin(2*x)
curve(f, -5, 5)
abline(0, 0, lty = 'dotted')
This shows rather clearly that your function has multiple roots, which isn't
surprising given that it's a linear combination of sines and cosines. To
find a specific root numerically, use
On 08/11/2010 04:42 AM, egc wrote:
> # Two test for a class like this:
> setClass("XXX",
> representation=representation(
> "matrix"
> )
> )
>
> i<-new("XXX");
> m=matrix();
> colnames(m)<-c("colA");
> i...@.data=m;
> # >i
> # An object of class “XXX”
> # colA
> #[1,] NA
> #_
Hi:
Try this from package plyr:
library(plyr)
# function to compute sum of squares
f <- function(df) with(df, sum((tapply(value, type, sum)/sum(value))^2))
# apply it to each type of food:
ddply(data, .(food), conc = f(data))
food type value market_con
1 drink water 5 0.5987654
2 drin
Hi,
Thanks a lot. It worked with:-
write.table(data, file = outputModelFilePath, append=T, sep=",",
col.names=F)
Regards,
Harsh Yadav
On Wed, Aug 11, 2010 at 11:53 PM, David Winsemius wrote:
>
> On Aug 11, 2010, at 10:29 PM, harsh yadav wrote:
>
> Hi,
>>
>> I am writing a function that writes
On Aug 11, 2010, at 10:29 PM, harsh yadav wrote:
Hi,
I am writing a function that writes to a csv file for every call.
However, for the subsequent calls, I want to append the data to the
existing
csv file without appending the column names again.
I tried searching in the previous posts, b
Hi,
It seems that write.csv doesn't support append now. Use write.table()
write.table(dataF, file = outputFilePath, append=T,col.names =F)
Regards,
Wu
-
A R learner.
--
View this message in context:
http://r.789695.n4.nabble.com/Append-to-csv-without-header-tp2322115p2322172.html
Sent
Try this:
options(digits=10)
> integrate(f=powerLaw2, lower=0, upper=Inf, l1=1.8980185, l2=-0.0804259, c0=1,
> t0=259.78, rel.tol=1.e-10)
0.01089019946 with absolute error < 3.7e-11
Ravi.
Ravi Varadhan, Ph.D.
Assistant Profe
Hello Stephen,
Please reply to the list, not to me directly so you can get feedback
from others as well.
> Whether you suggested;
>
> RSQLite 0.9-2 on CRAN
> http://cran.r-project.org/web/packages/RSQLite/NEWS
>
> SQLite FTS3 Extension
> http://www.sqlite.org/fts3.html
>
> Package ‘RSQLite’
> Jul
Hello, does anyone know how to compute the following two normality tests
using R:
(1) the Kiefer-Salmon (1983) statistic, Economics Letters 11, p. 123-127
(2) the modified Shapiro-Wilk statistic?
Thank you very much. Geoff
[[alternative HTML version deleted]]
__
Here's another way...
x <- c(2,2,4,6,2,4,4,6,8,6)
match(x, unique(x))
Produces...
[1] 1 1 2 3 1 2 2 3 4 3
On 12 August 2010 01:48, clips10 wrote:
>
> I didn't really know what to post as the topic subject, but I have a vector,
> for instance (2,2,4,6,2,4,4,6,8,6) and I want to create another v
Hi Stephen,
If you are working with just a single file (database table) or a small
number I'd suggest you look at the RSQLite package. It will probably
do everything you want and there is good tutorial info available
(google is your friend).
Michael
On 12 August 2010 12:13, Stephen Liu wrote:
>
Hi,
I am writing a function that writes to a csv file for every call.
However, for the subsequent calls, I want to append the data to the existing
csv file without appending the column names again.
I tried searching in the previous posts, but I am stuck with different
errors.
Here is what I am
On Aug 11, 2010, at 9:21 PM, TGS wrote:
How would I numerically find the x value where the derivative of the
function below is zero?
x <- seq(1,2, by = .01)
y <- 5*cos(2*x)-2*x*sin(2*x)
plot(x,abs(y), type = "l", ylab = "|y|")
Two ideas:
---minimize abs(diff(y))
abline(v=x[which.min(abs(
Hi folks,
I'm prepared building my own datafiles, simple file at start, for testing
wondering how to process? Which software will be used,
MySQL/MS-SQL/MS-Excel/Open Office-Calc etc?
On searching I found r-cran-rmysql on Ubuntu repo.
Further searching I found;
RMySQL: R interface to the My
Hi,
I'm running into a wall when trying to use the integrate function. I
have the following setting:
powerLaw2 <- function(x,l1,l2,c0,t0) {
idx <- which(x <= 0);
if (length(idx) > 0) {
x[idx] <- 0;
}
xl <- (-l1+l2)*log(x/t0);
L <- log(c0)-l1*log(x)-log(1+exp(xl));
L <- e
How would I numerically find the x value where the derivative of the function
below is zero?
x <- seq(1,2, by = .01)
y <- 5*cos(2*x)-2*x*sin(2*x)
plot(x,abs(y), type = "l", ylab = "|y|")
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
On Aug 11, 2010, at 11:16 AM, ba ba wrote:
Dear All,
I tried to plot contour lines using R function contour, but got the
results
which are not expected.
require(RTOMO)
x <- seq(-1,1,0.1)
y <- seq(-1,1,0.1)
xy <- meshgrid(x,y)
z <- xy$x^2+ 3*xy$y^2
contour(x,y,z,col="blue",xlab="x",ylab="y
clips10 lancaster.ac.uk> writes:
> I didn't really know what to post as the topic subject, but I have a vector,
> for instance (2,2,4,6,2,4,4,6,8,6) [... snip to make gmane happy ...],
> so my new vector would be (1,1,2,3,1,2,2,3,4,3).
x <- c(2,2,4,6,2,4,4,6,8,6)
as.numeric(factor(x))
[1] 1 1
On 11/08/2010 11:16 AM, ba ba wrote:
Dear All,
I tried to plot contour lines using R function contour, but got the results
which are not expected.
require(RTOMO)
x <- seq(-1,1,0.1)
y <- seq(-1,1,0.1)
xy <- meshgrid(x,y)
z <- xy$x^2+ 3*xy$y^2
contour(x,y,z,col="blue",xlab="x",ylab="y")
The abo
Hi,
Yes, I am using the 32-bit version of R (version 2.10.0 RC). The OS used is
Windows-7 32 bit.
And I preprocessed the airline csv file using the utilities provided on
bigmemory.org.
The R-environment is empty, with no other objects in memory.
When I test the code provided by you, I am able t
leepama hanmail.net> writes:
> I found some amazing package called "lqa"
[enthusiasm snipped]
> Can I use this package in linaer model(not GLM)?
It's helpful to use informative subject lines in your posts
to the list.
A linear model is a special case of a generalized linear model
with fami
On Wed, Aug 11, 2010 at 4:51 PM, Lorenzo Cattarino
wrote:
> Hi R-users,
>
>
>
> I have a function (myfun) that I want to apply to the rows of a matrix.
> Basically, "myfun" takes the values from the matrix ("exp.des"), which
> represent the different combinations of my experimental design, and pas
On Aug 11, 2010, at 7:51 PM, Lorenzo Cattarino wrote:
Hi R-users,
I have a function (myfun) that I want to apply to the rows of a
matrix.
Basically, "myfun" takes the values from the matrix ("exp.des"), which
represent the different combinations of my experimental design, and
pass
them as
On Aug 11, 2010, at 1:16 PM, kayj wrote:
Hi,
if I use the jpeg driver directly like
one <- read.table("sample.txt",sep="\t")
jpeg(file="sample.JPG)
plot(V2 ~ V1,one)
and it did not plot anything! why is that?
Because you did not "finish the job". Try adding:
dev.off()
the version of
Hi Marcio,
Try this:
x <- rnorm(5)
y <- rnorm(5)
ind <- c(1,0,0,1,0)
plot(x, y, col = ind + 1, pch = 16) # 1 is black, 2 is red
Take a look at the col argument under ?par. Also, ?plot might be of interest
in this case.
HTH,
Jorge
On Wed, Aug 11, 2010 at 7:41 PM, Mestat <> wrote:
>
> Hey fol
Hi R-users,
I have a function (myfun) that I want to apply to the rows of a matrix.
Basically, "myfun" takes the values from the matrix ("exp.des"), which
represent the different combinations of my experimental design, and pass
them as arguments to some other functions (fun1 and fun2). As I wan
Hey folks,
I have a graphic of dispersion...
I would like to color some specific points (x,y) according to another
indicator variable, for example:
x<-rnorm(5)
y<-rnorm(5)
ind<-(1,0,0,1,0)
plot(x,y)
Any suggestion, thanks...
Marcio
--
View this message in context:
http://r.789695.n4.nabble.c
I found some amazing package called "lqa"
one question!!!
Can I use this package in linaer model(not GLM)?
--
View this message in context:
http://r.789695.n4.nabble.com/Hi-tp2321809p2321809.html
Sent from the R help mailing list archive at Nabble.com.
Hi,
The code seems complicate, but it's understandable.
##
food=c('fruit','fruit','fruit','drink','drink','drink')
type=c('apple','apple','orange','water','soda','soda')
value=c(2,3,1,5,7,6)
data=data.frame(food,type,value)
share=c((2+3)/(2+3+1),5/6,1/6,5/(5+7+6),13/18,13/18)
market_con=c(re
Hi,
if I use the jpeg driver directly like
one <- read.table("sample.txt",sep="\t")
jpeg(file="sample.JPG)
plot(V2 ~ V1,one)
and it did not plot anything! why is that?
the version of ghostscript that I installed i from the following link
http://pages.cs.wisc.edu/~ghost/doc/GPL/gpl871.htm
On Wed, 11 Aug 2010, David Winsemius wrote:
On Aug 11, 2010, at 6:45 PM, Charles C. Berry wrote:
On Wed, 11 Aug 2010, David Winsemius wrote:
>
> On Aug 11, 2010, at 6:03 PM, Jarrett Byrnes wrote:
>
> > I have formulae with coefficents that I would like to update. However,
> > I get some
Hi,
i'm searching for an R library able to calculate the Regression Error
Characteristic Curves
as explained in:
http://www.google.it/url?sa=t&source=web&cd=1&ved=0CBgQFjAA&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.93.2744%26rep%3Drep1%26type%3Dpdf&ei=d89iTPrxLMn54
an error in the document format? Good job figuring it out. Did you submit a
bug report?
--
View this message in context:
http://r.789695.n4.nabble.com/odfWeave-Issue-tp2321369p2321833.html
Sent from the R help mailing list archive at Nabble.com.
__
R-
Simple question.
How do you change the standard plotting function so that points are solid
and can have a pretty colour?
Thanks for the help
--
View this message in context:
http://r.789695.n4.nabble.com/Colour-Point-Plot-tp2321433p2321433.html
Sent from the R help mailing list archive at Nabb
I didn't really know what to post as the topic subject, but I have a vector,
for instance (2,2,4,6,2,4,4,6,8,6) and I want to create another vector which
is just numbers from 1 to 4 since there are only 4 unique numbers in my
vector, so for instance 2 would be 1, 4 would be 2, 6 would be 3, and 8
Dear All,
I tried to plot contour lines using R function contour, but got the results
which are not expected.
require(RTOMO)
x <- seq(-1,1,0.1)
y <- seq(-1,1,0.1)
xy <- meshgrid(x,y)
z <- xy$x^2+ 3*xy$y^2
contour(x,y,z,col="blue",xlab="x",ylab="y")
The above code gave me the contour graph for z
Hi,
I wanted to generate a plot which is almost like the plot generated by the
following codes.
category <- paste("Geographical Category", 1:10)
grp1 <- rnorm(10, mean=10, sd=10)
grp2 <- rnorm(10, mean=20, sd=10)
grp3 <- rnorm(10, mean=15, sd=10)
grp4 <- rnorm(10, mean=12, sd=10)
mydat <- data.f
# Two test for a class like this:
setClass("XXX",
representation=representation(
"matrix"
)
)
i<-new("XXX");
m=matrix();
colnames(m)<-c("colA");
i...@.data=m;
# >i
# An object of class “XXX”
# colA
#[1,] NA
#
#First Test
oh, god, please don't tell anybody...
--
View this message in context:
http://r.789695.n4.nabble.com/non-linear-regression-for-3D-data-tp2320982p2321082.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
On Aug 11, 2010, at 6:45 PM, Charles C. Berry wrote:
On Wed, 11 Aug 2010, David Winsemius wrote:
On Aug 11, 2010, at 6:03 PM, Jarrett Byrnes wrote:
I have formulae with coefficents that I would like to update.
However, I get some strange results. For example, see the
following:
For t
On Wed, 11 Aug 2010, David Winsemius wrote:
On Aug 11, 2010, at 6:03 PM, Jarrett Byrnes wrote:
I have formulae with coefficents that I would like to update. However, I
get some strange results. For example, see the following:
For the formula y ~ d+ 3*r+t
Did you really get meaningful re
Thank you for reminding me.
##
food=c('fruit','fruit','fruit','drink','drink','drink')
type=c('apple','apple','orange','water','soda','soda')
value=c(2,3,1,5,7,6)
data=data.frame(food,type,value)
share=c((2+3)/(2+3+1),5/6,1/6,5/(5+7+6),13/18,13/18)
market_con=c(rep(0.833^2+0.167^2,3),r
Hi Yi,
It would be helpful for others to provide a solution if you give your
formulas that calculating the value of share and concentration.
?apply will helps.
Regards,
Wu
-
A R learner.
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-calculate-the-concentration-
On Aug 11, 2010, at 6:03 PM, Jarrett Byrnes wrote:
I have formulae with coefficents that I would like to update.
However, I get some strange results. For example, see the following:
For the formula y ~ d+ 3*r+t
Did you really get meaningful results from that formula? Care to
provide an
I have formulae with coefficents that I would like to update. However, I get
some strange results. For example, see the following:
For the formula y ~ d+ 3*r+t I want to add a variable p, so
> update(y~d+0*r+t, .~.+p)
produces
y ~ d + t + p - 1
If the coefficient is not 0, but rather, somet
?match, look at the %in% operator.
Mestat wrote:
Hi listers,
I made some search, but i didn`t find in the forum.
I have a data set.
I would like to make a search (conditon) on my data set.
x<-c(1,2,3,4,5,6,7,8,9,10)
count<-0
if (CONDITON){count<-1}else{count<-0}
My CONDITION would be: is there
Hi listers,
I made some search, but i didn`t find in the forum.
I have a data set.
I would like to make a search (conditon) on my data set.
x<-c(1,2,3,4,5,6,7,8,9,10)
count<-0
if (CONDITON){count<-1}else{count<-0}
My CONDITION would be: is there number 5 in my data set?
Thanks in advance,
Marci
I'll respond to everyone, but Duncan's response worked, so I'll put that
first. Thank you *everyone* for responding, I really appreciate it
Duncan:
Great idea, it's simple and works. Using the --args causes the final flags
to be ignored by R, but you can still retreive them using commandArgs()
Hi, folks,
##
food=c('fruit','fruit','fruit','drink','drink','drink')
type=c('apple','apple','orange','water','soda','soda')
value=c(2,3,1,5,7,6)
data=data.frame(food,type,value)
share=c((2+3)/(2+3+1),5/6,1/6,5/(5+7+6),13/18,13/18)
market_con=c(rep(0.833^2+0.167^2,3),rep(0.278^2+0
Hi,
Try ?unique please.
x <- c(2,2,9,4,6,2,4,4,6,8,6) # Original vector
unique(x) #New vector only has unique elements
sort(unique(x)) # Ordered
Regards,
Wu
-
A R learner.
--
View this message in context:
http://r.789695.n4.nabble.com/Creating-vectors-tp2321440p2321884.html
Sent fro
It seems very likely you are working on a 32-bit version of R, but it's a
little surprising still that you would have a problem with any single year.
Please tell us the operating system and version of R. Did you preprocess
the airline CSV file using the utilities provided on bigmemory.org? If you
Hi,
?plot will help you.
plot(0:18,col="white")
points(0:18,0:18,pch=0:18,col=rainbow(19),cex=2)
Turn & Fall wrote:
>
> How do you change the standard plotting function so that points are solid
> and can have a pretty colour?
>
-
A R learner.
--
View this message in context:
http://r
On 11/08/2010 4:13 PM, Gene Leynes wrote:
*What I want to do:
*Create a windows shortcut that will start the R gui **and**
simultaneously source a file
*What I have already tried:
*This almost works, but it's not the interactive R GUI:
R --no-save --sdi -file="C:\SomePath\example.R"
These
On Aug 11, 2010, at 4:13 PM, Gene Leynes wrote:
*What I want to do:
*Create a windows shortcut that will start the R gui **and**
simultaneously source a file
Can't you set the file associations to start up RGUI when you launch
an .R file?
*What I have already tried:
*This almost works,
Gene Leynes wrote:
*What I want to do:
*Create a windows shortcut that will start the R gui **and**
simultaneously source a file
*What I have already tried:
*This almost works, but it's not the interactive R GUI:
R --no-save --sdi -file="C:\SomePath\example.R"
These open the R GUI, but d
*What I want to do:
*Create a windows shortcut that will start the R gui **and**
simultaneously source a file
*What I have already tried:
*This almost works, but it's not the interactive R GUI:
R --no-save --sdi -file="C:\SomePath\example.R"
These open the R GUI, but doesn't recognize -f --f
Hi. I need to convert data to time series.
My problem is that when I converted my data to time series the data comes
with time. I just want the date because doesn't work with "blockMaxima()".
> data(bmwRet)
> BMW=as.timeSeries(bmwRet)
> head(BMW)
GMT
BMW.RET
1973-01-02 0.047704097
1973-01-03 0.00
Dear Gui,
Because you're wrapping the calls to summary() in try(), the errors there
shouldn't stop your simulation. It probably makes sense to test whether the
object returned by try() is of class "try-error", and possibly to specify
the argument silent=TRUE, examining the error messages in your c
Classification accuracy is an improper scoring rule, and one of the
problems with it is that the proportional classified correctly can be
quite good even if the model uses no predictors. [Hence omitting the
intercept is also potentially problematic.]
Frank E Harrell Jr Professor and Chair
On Wed, Aug 11, 2010 at 2:44 PM, Gabor Grothendieck
wrote:
> On Wed, Aug 11, 2010 at 2:38 PM, steven mosher wrote:
>> The colMeans comes closest,
>> for a single series the assume you have 100 years of monthly data.
>> The mean you want to scale by is the mean for a restricted period in the
>> ce
Hi, sorry I've gotten around the issue, I there was an error with the
document format itself, I managed to correct by making a new file.
--
View this message in context:
http://r.789695.n4.nabble.com/odfWeave-Issue-tp2321369p2321789.html
Sent from the R help mailing list archive at Nabble.com.
The simplest thing to do is just recreate the plot(s) from scratch at each
iteration with all the accumulated data. Most graphics devices are fast enough
now that you will not notice the redraw. If you really just want to add to the
plots, you can save and restore the graphics parameters, some
If it were just one loop by itself and I was doing the calculation for just
one month for all of my 317 stations, I would agree with. However, this
function itself is inside another loop which goes through each month and
year that I need the calculation for each of the stations.
If you have any s
Dear all,
I have some growth curve data from an experiment that I try to fit using
lm and lmer. The curves describe the growth of classification accuracy
with the amount of training data t, so basically
y ~ 0 + t (there is no intercept because y=0 at t0)
Since the growth is somewhat nonlinear *a
What is wrong with using a loop?
It used to be that loops were much slower than some of the alternatives, but
now days a well crafted loop runs almost as fast (sometime faster) than the
apply functions. So if the loop is working for you, use it and don't worry
about it (though there may be way
Dear R-help list:
I have want seems to be a simple task, but can't find a solution.
I tried querying the archives, but did not succeed.
My goal is to set up two (or more) graphs in one graph window, and
then during execution of a sequential algorithm add points
sequentially to these graphs. The
On Wed, Aug 11, 2010 at 2:38 PM, steven mosher wrote:
> The colMeans comes closest,
> for a single series the assume you have 100 years of monthly data.
> The mean you want to scale by is the mean for a restricted period in the
> center
> of the series.. say 1950-1960
> for this period you have th
The colMeans comes closest,
for a single series the assume you have 100 years of monthly data.
The mean you want to scale by is the mean for a restricted period in the
center
of the series.. say 1950-1960
for this period you have the average jan (1950-1960) average feb, ect.
your final series w
suppose covnames is a vector containing your covariate names (e.g. as
character strings)
Then (warning: untested)
rhs <- paste(covnames, collapse="+")
## makes them into a single string separated by "+"-es and
form <- formula(paste("y", rhs, sep="~"))
## creates your formula.
?substitute can
Hi Adrienne,
I guess apply should be better than for loop.
Code like this:
event.gen2 = function(genmat,use1,use2,num,ortho_obs_used){
onerow.gen <- function(one.row, use1){
one.row[num] <- ifelse(...}
genmat[,num] <- NA ##Add one row with NA values
apply(
This shoul work:
coxph(Surv(intx, status) ~ . + strata(sex) - sex, test1)
On Wed, Aug 11, 2010 at 1:54 PM, Mendolia, Franco wrote:
> Hello!
>
> I have something like this:
>
> test1 <- data.frame(intx=c(4,3,1,1,2,2,3),
> status=c(1,1,1,0,1,1,0),
> x1=c(0,2,1
On Wed, Aug 11, 2010 at 12:22 PM, steven mosher wrote:
> Given a long zoo matrix, the goal is to "sweep" out a statistic from the
> entire length of the
> sequences.
>
> longzoomatrix<-zoo(matrix(rnorm(720),ncol=6),as.yearmon(outer(1900,seq(0,length=120)/12,"+")))
> cnames<-c(12345,23456,34567,4
Thanks for your hint. This works:
form <- formula(paste("Surv( time, event,) ~",paste(covar,
collapse="+"),"+strata(stratum)", sep=" ") )
Franco
From: David Winsemius [dwinsem...@comcast.net]
Sent: Wednesday, August 11, 2010 1:05 PM
To: Mendolia, Franco
Cc
I may be missing something but I don't see how P&B handles errors in
variables any differently than other regression methods that ignore
this problem.
Frank
Frank E Harrell Jr Professor and ChairmanSchool of Medicine
Department of Biostatistics Vanderbilt Uni
On Aug 11, 2010, at 1:53 PM, Mendolia, Franco wrote:
I could do that. However, the function f that I mentioned below is
part of a bigger program and is nested inside another function, say
function A. In function A I determine the covariates that I want to
use and then call my function f.
Hi. I need to convert data to time series.
My problem is that when I converted my data to time series the data comes
with time. I just want the date because doesn't work with "blockMaxima()".
> data(bmwRet)
> BMW=as.timeSeries(bmwRet)
> head(BMW)
GMT
BMW.RET
1973-01-02 0.047704097
1973-01-03 0.00
I could do that. However, the function f that I mentioned below is part of a
bigger program and is nested inside another function, say function A. In
function A I determine the covariates that I want to use and then call my
function f. So even if I use a formula as single argument, I would stil
Hi As hz,
The following might get you started:
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=137
Also, see ?pairs.
HTH,
Jorge
On Wed, Aug 11, 2010 at 1:34 PM, ashz <> wrote:
>
> Hi,
>
> Is it possible to do a Matrix Plot and in the cell perform a linear
> regression also addi
Hi,
Is it possible to do a Matrix Plot and in the cell perform a linear
regression also adding to the cell the r2 and the equation. If so, how?
Thanks,
As hz
--
View this message in context:
http://r.789695.n4.nabble.com/Matrix-Plot-and-linear-regression-tp2321613p2321613.html
Sent from the R
Dear R-help list users,
I have a ts object and I would like to make a new one that contain mean by year.
Is there a direct way of do it?
Thks,
Sebastián.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
>>> Frank Harrell 11/08/2010 17:02:03 >>>
> This problem seems to cry out for one of the many available robust
> regression methods in R.
Not sure that would be much more appropriate, although it would
_appear_ to work. The P&B method is a sort of nonparametric/robust
approach to an errors-in
Dear R users,
I am trying to simulate some multitrait-multimethod models using the packages
sem and psych but whatever I do to deal with models which do not converge I
always get stuck and get error messages such as these:
"Error in summary.sem(M1) : coefficient covariances cannot be computed
Dear R users,
I am trying to simulate some multitrait-multimethod models using the
packages sem and psych but whatever I do to deal with models which do not
converge I always get stuck and get error messages such as these:
"Error in summary.sem(M1) : coefficient covariances cannot be computed"
Are you for some reason against writing your function to accept a single
argument, a formula, that you simply pass on to coxph?
Mendolia, Franco wrote:
Hello!
I have something like this:
test1 <- data.frame(intx=c(4,3,1,1,2,2,3),
status=c(1,1,1,0,1,1,0),
Hello!
I have something like this:
test1 <- data.frame(intx=c(4,3,1,1,2,2,3),
status=c(1,1,1,0,1,1,0),
x1=c(0,2,1,1,1,0,0),
x2=c(1,1,0,0,2,2,0),
sex=c(0,0,0,0,1,1,1))
and I can easily fit a cox mo
Hello Everyone!
Here's what I'm trying to do. I'm working on generating occurrences of
precipitation based upon precipitation occurrence for a station during the
previous day and two stations that have already been generated by joint
probablities and 1st order Markov chains or by the same generat
> What does this mean?
It's impossible to tell. Read the posting guide and figure out all the
details that you left out. If we don't have more information, you
should have low expectations about the quality of any replies to might
get.
--
Max
__
R-he
Given a long zoo matrix, the goal is to "sweep" out a statistic from the
entire length of the
sequences.
longzoomatrix<-zoo(matrix(rnorm(720),ncol=6),as.yearmon(outer(1900,seq(0,length=120)/12,"+")))
cnames<-c(12345,23456,34567,45678,56789,67890)
colnames(longzoomatrix)<-cnames
longzoomatrix[
Frank E Harrell Jr Professor and ChairmanSchool of Medicine
Department of Biostatistics Vanderbilt University
On Wed, 11 Aug 2010, Michal Figurski wrote:
Peter, Frank, David and others,
Thank you all for your ideas. I understand your lack of trust in P&B
meth
Peter, Frank, David and others,
Thank you all for your ideas. I understand your lack of trust in P&B
method. Setting that aside (it's beyond me anyways), please see below
what I have finally came up with to calculate the CI boundaries. Given
the slope and intercept with their 05% & 95% CIs, an
Hi, I'm trying to put a document through odfWeave that has some R code for
coursework in it:
> library(odfWeave)
Loading required package: lattice
Loading required package: XML
> inFile = "~/Documents/Squirrel.odf"
> outFile = "~/Documents/ Squirrel Out.odt"
> inFile = "~/Documents/Squirrel.odt"
>
> Hello:
>
I try to use function "bms" to select the best model with the biggest
posterior probability for different quantile. I have one return and 16
variables. However, I can just select for the linear model, how to change
the code for quantile:
> >bma1=bms(rq(y~.,tau=0.25,data=EQT), burn
Hi,
Look at ?cor.test, it does not give you the standard error, but it
does give you a confidence interval around the correlation coefficient
and a significance test (which is my best guess of what you are
probably looking to do with the standard error). You could also get
it out of a simple regr
Hi Allan,
Thank you for your response. Finally I succeeded. These were the
commands to compile Atlas and R:
Atlas:
../configure -t 4 -Fa alg -fPIC
make
make install
(-fPIC is needed to wrap some of objects of lapack.a as into a shared lib)
R:
../configure --with-blas="/usr/local/lib/libptf
1 - 100 of 125 matches
Mail list logo