Hi I'm trying to simulate multivariate longitudinal data, I've been trying
for a while now and can get it to be multivarite normal but I don't know how
to get the covariates in
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch
On 9/3/07, Prof Brian Ripley [EMAIL PROTECTED] wrote:
Yes, vectorize, and don't grow vectors. See 'S Programming' (details in
the R FAQ).
It's easy to avoid growing the samples vector but it doesn't seem to
make much difference. Vectorizing would be probably help, but in this
algorithm each
Dear useR,
the CRAN packages 'urca' and 'vars' are now hosted on R-Forge as
projects 'AICTS I' and 'AICTS II', respectively. The packages' summary
page can be directly accessed via:
AICTS I:
http://r-forge.r-project.org/projects/urca/
AICTS II:
http://r-forge.r-project.org/projects/vars/
All
Dear
I have a data.frame, and want to fit a constrained non-linear model:
data:
x
y
-0.08
20.815
-0.065
19.8128
-0.05
19.1824
-0.03
18.7346
-0.015
18.3129
0.015
18.0269
0.03
18.4715
0.05
18.9517
0.065
19.4184
0.08
20.146
0
18.2947
model:
y~exp(a)*(x-m)^4+exp(b)*(x-m)^2+const
I
On 4 Sep 2007, at 08:40, Issac Trotts wrote:
On 9/3/07, Prof Brian Ripley [EMAIL PROTECTED] wrote:
Yes, vectorize, and don't grow vectors. See 'S
Programming' (details in
the R FAQ).
It's easy to avoid growing the samples vector but it doesn't seem to
make much difference. Vectorizing
dear all,
does anybody know if cor.test with method=kendall calculates kendalls
tau a b or c? I need to get p values for kendalls tau c...
thank you very much for any kind of hint.
Barbara
--
Msc Barbara Spillmann
Professur für Projekt- und Regionalplanung
Senckenbergstr. 3
35390 Gießen
Dear listmembers,
I have a little question: I have my data organized as follow
sic level area
a2112.4
b3112.3
b3220.2
b3220.5
c1003.0
c1001.5
c2421.5
d2220.2
where levels and sics are factors. I'm trying to obtain a matrix like
There might be simpler ways, but you can certainly do this with the
reshape package, like this:
library(reshape)
dta - read.table(clipboard,header=TRUE)
sic level area
1 a 211 2.4
2 b 311 2.3
3 b 322 0.2
4 b 322 0.5
5 c 100 3.0
6 c 100 1.5
7 c 242 1.5
8 d
David Barron wrote:
There might be simpler ways, but you can certainly do this with the
reshape package, like this:
library(reshape)
dta - read.table(clipboard,header=TRUE)
sic level area
1 a 211 2.4
2 b 311 2.3
3 b 322 0.2
4 b 322 0.5
5 c 100 3.0
6 c
Hi list,
The function is.integer tests if an object is of type integer:
see e.g.:
is.integer(12) # FALSE
is.real(12) # TRUE
mode(12)# numeric
But how can I test if a number is actually an integer? R seek is
difficult to search in this case because it mainly yields
On 04-Sep-07 09:53:43, Christoph Heibl wrote:
Hi list,
The function is.integer tests if an object is of type integer:
see e.g.:
is.integer(12)# FALSE
is.real(12) # TRUE
mode(12) # numeric
But how can I test if a number is actually an integer? R seek is
On 9/4/07, Christoph Heibl [EMAIL PROTECTED] wrote:
Hi list,
The function is.integer tests if an object is of type integer:
see e.g.:
is.integer(12) # FALSE
is.real(12) # TRUE
mode(12)# numeric
But how can I test if a number is actually an integer? R seek is
CH == Christoph Heibl [EMAIL PROTECTED]
on Tue, 4 Sep 2007 11:53:43 +0200 writes:
CH Hi list,
CH The function is.integer tests if an object is of type integer:
CH see e.g.:
CH is.integer(12) # FALSE
CH is.real(12) # TRUE
CH mode(12)# numeric
Hello R Users,
How to make a variable equidistance with time i.e. how to interpolate a
variable if it is not sampled at equal time interval.
Many thanks,
Regards,
Yogesh
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch
Use approx() if you just want linear interpolation.
On 9/4/07, Yogesh Tiwari [EMAIL PROTECTED] wrote:
Hello R Users,
How to make a variable equidistance with time i.e. how to interpolate a
variable if it is not sampled at equal time interval.
Many thanks,
Regards,
Yogesh
Yogesh Tiwari wrote:
Hello R Users,
How to make a variable equidistance with time i.e. how to interpolate a
variable if it is not sampled at equal time interval.
Hi Yogesh,
Don't know whether this will suit your purpose. I wrote it to enable
color-coded plotting of highly variable data. If
Thank you
Bartjoosen schrieb:
Take a look at the EBImage package at bioconductor:
http://bioconductor.org/packages/2.0/bioc/html/EBImage.html
Bart
mimo-2 wrote:
Hi,
Are there more sophisticated means to access R-images via Rserve than:
Rconnection c=new Rconnection(127.0.0.1);
Hi folks,
Thanks to my esteemed colleagues, I have been grappling with the
analysis of incomplete ranks. These result from questions like:
Number the three most important things from the following list in order
from 1 to 3.
OR
Where some or all respondents or observers have not assigned ranks
Good morning,
I wrote a function to generate tables using LaTex. The function creates a .tex
file with all the layouts I want. I would now like to call pdflatex.exe from
inside this same function. Does anyone know an R command to do this? And
also, what is the form of the pdflatex command
Walter Paczkowski wrote:
Good morning,
I wrote a function to generate tables using LaTex. The function creates a
.tex file with all the layouts I want. I would now like to call pdflatex.exe
from inside this same function. Does anyone know an R command to do this?
And also, what is
HI Yogesh
you can also try regularizing the time series by imputation etc. etc.
---
Regards,
Gaurav Yadav (mobile: +919821286118)
Assistant Manager, CCIL, Mumbai (India)
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Profile: http://www.linkedin.com/in/gydec25
Thanks to both Charles and Jim for such helpful info.
The help file ?[.data.frame is just great. Too bad it is so hard to
find!
I had used na.strings on read.table but had gotten it in my head that it
was for numeric missing value codes. But of course, strings is
strings! That took care of
Perfect, except for one little bit...
topN.2 is missing one comma...
It should read as follows
topN.2 - function(data,n=5) data[order(data[,3], decreasing=T),][1:n,]
Thank you very much.
cn
From: Petr PIKAL [mailto:[EMAIL PROTECTED]
Sent: Mon 9/3/2007
Gabor,
That's very nice! I like your my.transform much better. Too bad about
the incompatibility. Swapping that out would no doubt break some
existing programs. I love that old joke, God was able to create the
universe in just 6 days only because he didn't have an installed base to
worry about!
Try this which gives an object of the required shape and of
class c(xtabs, table) :
xx - xtabs(area ~ sic + level, DF)
You can optionally do it like this to make it class matrix
xx - xtabs(area ~ sic + level, DF)[]
and if you don't want the call attribute:
attr(xx, call) - NULL
On
Hi,
I try to make a simple for loop with a if else statement (First example -
Below) and extend it to a more complex loop (Second example). However, my
results
#First example:
x=c(1,2)
t=for(i in 1:length(x)){
if (x==1){a=x+1}else
if (x==2){a=x}
}
Returned from R:
Warning messages:
1: the
Dear list members,
I have a set of claims data, which are in ranges and the shape of the
distribution is relatively different. I have looked through R help
threads and found out that an ideal way is suggested for the gamma
distribution ML fitting for grouped data.
I just wonder if there is any
Okay, I want to do something similar to SAS proc format.
I usually do this...
a - NULL
a$divisionOld - c(1,2,3,4,5)
divisionTable - matrix(c(1, New England,
2, Middle Atlantic,
3, East North Central,
4, West North
On 9/4/07, Sam Ferguson [EMAIL PROTECTED] wrote:
Thanks for your reply Bruno.
No - as I said, I know how to do that - the movie15 and the
multimedia package are basically the same, and it is relatively
straightforward to get an audio file into a pdf with them. However,
real interactivity
On 9/4/2007 9:59 AM, Hans Ole Ørka wrote:
Hi,
I try to make a simple for loop with a if else statement (First example -
Below) and extend it to a more complex loop (Second example). However, my
results
#First example:
x=c(1,2)
t=for(i in 1:length(x)){
if (x==1){a=x+1}else
if
Not sure why the data.frame function does not capture the name of the column
field when its being built with only one column.
Can anyone help?
data
out pred1 predd2
1 1 2.03.0
2 2 3.55.5
3 3 5.5 11.0
data1=data.frame(data[,1])
data1
data...1.
1 1
2
I need to extract t-test statistics from glm(). For example,
Coefficients:
Estimate Std. Error t value Pr(|t|)
(Intercept) 46.219911.6310 3.974 0.000106 ***
Var1 1.0440 0.5948 1.755 0.081088 .
Var2 -0.4717 2.0257 -0.233 0.816178
Hello R Users,
I am new to R and I have simple problem for R users.
I have CO2 observations defined on time axis(yr,mo,day,hr,min,sec). (DATA
ATTACHED HERE)
First I want to convert time axis as one axis as 'hour' on regular interval
as 1 hour. Say 00 hrs to 24hrs(jan1), 25hrs to 48hrs(jan2) and
Greetings R Help Group,
How does one effect a multiphasic logistic growth model with 4 phases (e.g.
Koops 1986; Weigel, Craig, Bidwell and Bates 1992; Grossman and Koops 2003)
with R.
Before writing to the group, the R help archives were searched, the web was
searched with Google,
Hello,
I apologise in advance for this question; I'm sure it is answered in
the documentation or this mailing list many times, however the answer
has eluded me.
I'm trying to write a function where I don't want external variables
to be scoped in from the parent environment. Given this
I am having trouble finding out how to adjust the position of labels on
pie charts. For the small wedges, many of the labels overlap making it
impossible to read. Is there any way to offset the labels so that they
don't overlap?
Adam Green
USGS Patuxent Wildlife Research Center
Hi all,
thanks to the people who replied to my question! I finally solved the
issue by writing own handlers and using xmlEventParse - which leads
to the following problem which is so odd that its probably a bug.
I use several special charachter in my XML-File, e.g. umlauts or ° or
µ - but
environment(test_func) - baseenv()
will allow it to access the base environment so it can still find exists
but will not find kat. If you issue the command
search()
then each attached package has the next as its parent and base is the
last one.
Regarding your second question, try rm().
f -
Although I am not an expert in NLME modelling, looking at your data it
seems to me that there seems to be no growth pattern in it. Try
library(nlme)
library(reshape)
goat-read.table(clipboard, header=T)
str(goat)
'data.frame': 18 obs. of 15 variables:
$ NoC : int 52 48 54 60 58 42 44 47
Alexander Heidrich wrote:
Hi all,
thanks to the people who replied to my question! I finally solved the
issue by writing own handlers and using xmlEventParse - which leads
to the following problem which is so odd that its probably a bug.
I use several special charachter in my
Hi,
I am trying to capture the console output of program I
call via system() but that always returns only
character(0).
For example:
capture.output(system(pdflatex out.tex) )
will yield:
character(0)
and the output still written to the R console.
Is there a command for intercepting this
Hi all,
I have probably a basic question, but I can't seem to find the answer in
the literature or in the R-archives.
I would like to do a robust ANCOVA (using either rlm or lmRob of the
MASS and robust packages) - my response variable deviates slightly from
normal and I have some outliers. The
Hello,
I have a simple question on rug().
Currently there is only one color possible for the rug.
Is it possible to plot a the rug with different colors, for each rug item ?
Thx.
Bjoern
__
R-help@stat.math.ethz.ch mailing list
Colleagues,
I want to create the following array:
A1, A2, A3, B1, B2, B3, C1, C2, C3
I recall that there is a trick using c or paste permitting me to
form all combinations of c(A, B, C) and 1:3. But, I can't
recall the trick.
Dennis
Dennis Fisher MD
P (The P Less Than Company)
Hi,
paste(rep(LETTERS[1:3], each=3), rep(1:3, 3), sep=)
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 04/09/07, Dennis Fisher [EMAIL PROTECTED] wrote:
Colleagues,
I want to create the following array:
A1, A2, A3, B1, B2, B3, C1, C2, C3
I recall
try this:
paste(rep(LETTERS[1:3], each = 3), 1:3, sep = )
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web:
Dear R users,
I am new to R. I would like to calculate bootstrap confidence intervals
using the BCa method for a parameter of interest. My situation is this: I
already have a set of 1000 bootstrap replicates created from my original
data set. I have already calculated the statistic of interest
I was going through the example below which is taken from the example
section in the R documentation for accessing the function call stack.
I am confused and I have 3 questions that I was hoping someone could
answer.
1) why is y equal to zero even though the call was done with gg(3)
2) what does
I read from external data source containing several columns. Each column
represents value of a metric. The columns are time series data.
I want to sort the resulting dataframe such that the column with the largest
mean is the leftmost column, descending in colMean values to the right.
I see
It is because you have a recursive function call and the value of 'y'
when you print is it 0. I have added another statement that might
help clarify what you are seeing. At the point at which the most
current value of the function 'ggg' is evaluated (last call), the
value of 'y' is zero and you
Hi,
what is the correct way of removing the top and right axes
completely from a lattice xyplot? I would like to have a plot similar
to using the bty=l option for traditional plots.
An example:
--8---cut here---start-8---
rm(list=c(ls()))
library(lattice)
y
Here is one way of doing it by 'skipping' the first column which is a
factor and your 'time':
x - read.table(textConnection( time met-amet-bmet-c
+ 00:0042 18 99
+ 00:0588 16 67
+ 00:1080 27 84), header=TRUE)
x.mean -
Hi, I am using the scatter3d function in Rcmdr to plot
the first 3 principal components, I have a grouping
variable of 2 groups, and tried to plot points with
different colors, somehow I couldn't change the
default colors of the 2 groups (blue and green)by
using option points.col=c('red','blue'),
Leeds, Mark (IED) wrote:
I was going through the example below which is taken from the example
section in the R documentation for accessing the function call stack.
I am confused and I have 3 questions that I was hoping someone could
answer.
1) why is y equal to zero even though the call was
thanks jim : what you said makes a lot of sense so I changed mine to
what you did and I get similar output but everything looks
shifted up by 3 frames. That probably has to do with me running on a
different os ( linux ) or R.2.5.0 rather than R.2.5.1, I guess ?
It makes a lot more sense now so
Hi everyone,
Many of the presentations and posters from UseR! 2007 are now available online:
http://user2007.org/program/
If you presented and your slides or poster isn't up yet, please email
a pdf version to me, [EMAIL PROTECTED], and I'll put it up.
Regards,
Hadley
(And check out
On Tue, 4 Sep 2007, [EMAIL PROTECTED] wrote:
Dear R users,
I am new to R. I would like to calculate bootstrap confidence intervals
using the BCa method for a parameter of interest. My situation is this: I
already have a set of 1000 bootstrap replicates created from my original
data set. I
The best option is to use a bar chart or dot chart instead of a pie chart.
-Original Message-
From: Adam Green [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch r-help@stat.math.ethz.ch
Sent: 9/4/07 10:21 AM
Subject: [R] Pie Chart Labels
I am having trouble finding out how to adjust the
Dear chip,
When there is groups variable specified, scatter3d() colours the
regression surface, points, and residuals for each group according to
the colours specified in surface.col. (Setting surface=FALSE suppresses
the regression surfaces and residuals.)
You can save the rgl graph that
On 5/09/2007, at 9:37 AM, Greg Snow wrote:
The best option is to use a bar chart or dot chart instead of a pie
chart.
Right on, Red Freak!!! :-)
cheers,
Rolf Turner
I am 100% certain that there is an easy way to do this, but after
experimenting off and on for a couple of days, and searching everywhere I
could think of, I haven't been able to find the trick.
I have this piece of code:
...
attach(d)
if (ORDINATE == 'ds')
{ lo - loess(percent ~ ncms *
Let me try a reply, although I wish others wiser than I had responded.
1. How do you know the variances are unequal?
2. If you somehow know what the variances are (or at least their relative
sizes), you can use the weights arguments of the functions you mentions to
weight inversely proportional
The example code below allows the plotting of three different groups per panel.
I can't fathom how to write the panel function to add an additional line for
each group, which in this case is just the mean Y value for each group within
each panel. (i.e. there'd be six lines per panel.)
Spent
D. R. Evans wrote:
I am 100% certain that there is an easy way to do this, but after
experimenting off and on for a couple of days, and searching everywhere I
could think of, I haven't been able to find the trick.
I have this piece of code:
...
attach(d)
if (ORDINATE == 'ds')
{ lo
You can use substitute() for this. The drawback with this approach is
that the formula in the call in the printed value of loess() is ugly.
x - data.frame(y=rnorm(20), x1=rnorm(20), x2=rnorm(20))
loess(y~x2, data=x)
Call:
loess(formula = y ~ x2, data = x)
Number of Observations: 20
Dear All,
I need to use the inverse of some distributions in R for simulation, but I
could not find it, can anyone tell me which package I should install?
thanks
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
Looks like plenty of people have had this problem b4 you - incl myself. Might
be an issue with this function. I had better luck using the function in
QRMlib package (fit.tcopula.rank, etc). Though for some really large data
sets I had to fudge the function itself with noforce=FALSE on the Kendall
To make it specific, I need to simulation Y with inverse beta distribution,
that is, Y~inverseF(X), where F is the CDF of beta distribution. THANKS
On 9/4/07, Lisa Hu [EMAIL PROTECTED] wrote:
Dear All,
I need to use the inverse of some distributions in R for simulation, but I
could not find
On 5/09/2007, at 11:16 AM, Lisa Hu wrote:
To make it specific, I need to simulation Y with inverse beta
distribution,
that is, Y~inverseF(X), where F is the CDF of beta distribution.
THANKS
On 9/4/07, Lisa Hu [EMAIL PROTECTED] wrote:
Dear All,
I need to use the inverse of some
On 9/4/07, Patrick Drechsler [EMAIL PROTECTED] wrote:
Hi,
what is the correct way of removing the top and right axes
completely from a lattice xyplot? I would like to have a plot similar
to using the bty=l option for traditional plots.
There is no direct analog (and I think it would be weird
Try drop=FALSE:
x
out pred1 predd2
1 1 2.03.0
2 2 3.55.5
3 3 5.5 11.0
x[,1]
[1] 1 2 3
data.frame(x[,1])
x...1.
1 1
2 2
3 3
data.frame(x[,1, drop=FALSE])
out
1 1
2 2
3 3
On 9/4/07, Stan Hopkins [EMAIL PROTECTED] wrote:
Not sure why the
Hi Michael,
It's not lattice, but you can easily do this with ggplot2:
install.packages(ggplot2)
library(ggplot2)
qplot(year, yvar, data=df, facets = . ~ week, colour=factor(temp),
geom=line) +
stat_summary(aes(group=1), geom=line, fun=mean, size=2)
Although you don't (currently) get the nice
On 9/4/07, Folkes, Michael [EMAIL PROTECTED] wrote:
The example code below allows the plotting of three different groups per
panel. I can't fathom how to write the panel function to add an additional
line for each group, which in this case is just the mean Y value for each
group within
If your data is in data.txt file you can do the
following:
x - read.table(file=data.txt,header=TRUE)
t-ISOdatetime(x[,1],x[,2],x[,3],x[,4],x[,5],x[,6])
secs - as.numeric(t)
So now secs represents your time in seconds and you
can use any type of interpolation you wish to
interpolate co2obs.
---
Thank you again Deepayan. I was failing to grasp that I could use
panel.groups as a function. But additionally it's still not intuitive
to me where and when I should use ... to pass arguments on.
Additionally, as to why the panel.group function needs to pass the 'lty'
argument isn't terribly
On 9/4/07, Folkes, Michael [EMAIL PROTECTED] wrote:
Thank you again Deepayan. I was failing to grasp that I could use
panel.groups as a function. But additionally it's still not intuitive
to me where and when I should use ... to pass arguments on.
In most cases, it's used to pass on
I am using heatmap with the arguments below. The title size stays the
same no matter what I set cex.main to. Is this expected? Can I adjust
the title size in heatmap?
Also, the position of the main title is at the very upper edge of the
output and if I use a \n to stack the title the upper
Dear all,
I wonder how to increase the height of strips via strip.default or
strip.custom. The following example hopefully illustrates the difficulty
I am facing:
library(lattice)
xyplot(Petal.Length ~ Petal.Width | Species, iris,
strip = strip.custom(par.strip.text = list(cex = 2)))
78 matches
Mail list logo