Federico,
you might also want to have a look at packages flexclust or flexmix,
so you can take into account that you have binary data. The mclust
package can be used to estimate mixtures of Gaussian distributions.
flexclust implements kmeans-like algorithms, but you can specify a
distance
Hello!
I am using for logistic regression in survey data the svyglm procedure.
I wondered how does the strata effect estimates SE (in addition to the
weights given proportional to population size).
I know that for simple regression measurements of each strata is assumed to
have different variance.
Feldman, Maximilian Jeffrey wrote:
Dear Community,
I am very new to the world of Linux and R and I have stumbled upon a problem
that I cannot seem to resolve on my own. Here is the relevant background:
I am working on a 64-bit Linux Fedora Core 6 OS. I using R version 2.5.1. I
have 3.8 Gb
For all who sent help on topic Classification:
Thank you very much folks.
I have got some inspiration how to solve this task.
Michael
- Original Message -
From: Marc Schwartz [EMAIL PROTECTED]
To: Ing. Michal Kneifl, Ph.D. [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Sent:
ONKELINX, Thierry wrote:
Dear useRs,
Lately I noticed a strange warning in the summary of a lm-object. Any
idea what this warning is about? I'm using R 2.5.1 on Win XP pro.
x - rnorm(100)
y - rnorm(100)
summary(lm(y~x))
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q
The problem also exists in a clean workspace. But I've found the
troublemaker. I had set options(OutDec = ,). Resetting this to
options(OutDec = .) solved the problem.
Thanks,
Thierry
ir. Thierry Onkelinx
Instituut
hello,
i want to compute the mean of a variable (aps) for every class
(1,2, and 3).
every id have a few obs., aps and class are constant over id.
like this:
id aps class
1 11 2
1 11 2
1 11 2
1 11 2
1 11 2
2 83
2 8
Dylan Arena darena at stanford.edu writes:
Hi,
I'm trying to use R to get eigenvalues and eigenvectors of a matrix
whose elements are of the form (2 * lambda), -(lambda + mu), etc. I'd
like R to treat this matrix as a numeric matrix without treating lambda
and mu as variable names but
Dear all!
W2k, R 2.5.1
I am working with an ongoing malting barley variety evaluation within
Sweden. The structure is 25 cultivars tested each year at four sites, in
field trials with three replicates and 'lattice' structure (the replicates
are divided into five sub blocks in a structured way).
Hi all,
I was just informed that the plots in the radial.plot family in the
plotrix package do not plot correctly when using mfrow or mfcol to
subdivide the plot window. I found one related message, an answer from
Deepayan Sarkar to a question about lattice graphics, but that shed no
light on
Hello R users,
I am a newby using R 2.5.0 on a Apple Power Book G4 with Mac OS X
10.4.10.
when I use the write.table function, I always get the output in Unix
linebreaks that I have to change to McIntosh linebreaks to be able to
Import the data in Excel 2004 for Mac.
Is there a
Hello all, I am trying to use the garchFit function in the fSeries Package
to fit a Garch(1,1) Model with t distribution. I am using the following
codes.
fit - garchFit(~garch(1,1),data,cond.dist=dstd)
fitted(fit)
I was expecting the fitted(fit) would return the fitted volatility, but the
I'd ask the plotrix maintainer to fix his code!
radial.plot saves and restores all the par() values, including mfrow and
mfg. When you do par(mfrow=c(2,2)) the plot position is reset to the
bottom right, and the next plot will advance to the top left (but
par(new=TRUE) negates that).
Please
Prof Brian Ripley wrote:
I'd ask the plotrix maintainer to fix his code!
radial.plot saves and restores all the par() values, including mfrow and
mfg. When you do par(mfrow=c(2,2)) the plot position is reset to the
bottom right, and the next plot will advance to the top left (but
I have installed fast all packages for copula,
I have installed package 'gnml' and the others from the Jim Lindsey's web
site and the other packages like 'repeted' which is necessary for
calculating copula.
but when I start with copula it write:
'gausscop' function is not found. And also
I have multicolumn data.frames with the first comumn giving ordinal
observation index ( ex.: 1 4 7 9 11 13 etc). I would like to fill up the
missing observations (i.e. 2 3 5 6 8 etc) with NAs.
Thank you
__
R-help@stat.math.ethz.ch mailing list
What do you think the 'eol' argument to write.table is for?
I don't have a Mac to hand, but eol='\r' does this on Linux and Windows.
On Thu, 19 Jul 2007, Birgit Lemcke wrote:
Hello R users,
I am a newby using R 2.5.0 on a Apple Power Book G4 with Mac OS X
10.4.10.
when I use the
Hi,
one question about TukeyHSD in R:
it seems to work only for models without Error terms but not when an
Error is specified:
Examples:
aov1-aov(MMN_ind~(GenCond*Lang)+Error(VP),data=cutie_all)
TukeyHSD(aov1,Lang,ordered=TRUE,conf.level = 0.95)
-- the German error message tells me its not
ONKELINX, Thierry wrote:
The problem also exists in a clean workspace. But I've found the
troublemaker. I had set options(OutDec = ,). Resetting this to
options(OutDec = .) solved the problem.
Thanks,
Thierry
Oups. That sounds like there's a bug somewhere. Can you cook up a
minimal
Dear Peter,
Here's an example. Notice the warning in the last two lines of the summary with
options(OutDec = ,). It's not present with options(OutDec = .).
Cheers,
Thierry
x - runif(100)
y - rnorm(100)
options(OutDec = ,)
summary(lm(y~x))
Call:
lm(formula = y ~ x)
Residuals:
Min
On Thu, 19 Jul 2007, Peter Dalgaard wrote:
ONKELINX, Thierry wrote:
The problem also exists in a clean workspace. But I've found the
troublemaker. I had set options(OutDec = ,). Resetting this to
options(OutDec = .) solved the problem.
Thanks,
Thierry
Oups. That sounds like there's a
Dear all,
I would like to know how can I test which are the intervals of my data that
have significant less or more counts than the other intervals.
Example:
Interval[1:200][200:400][400:600][600:800] ... more 900
hundred columns
Count 1228
I do not understand what you want. If aps is constant
over each class then the mean for each class is equal
to any value of aps.
Using your example you can do
tapply(icu1$aps, icu1$d, mean)
but it does not give you anything new. Can you
explain the problem a bit more?
--- sigalit
Good morning,
I'd like to estimate a simple multinomial logit model in R (not a McFadden
conditional logit). For instance, I'd like to estimate the probability of
someone having one of eight titles in a company with the independent variables
being the company characteristics. A binary logit
TukeyHSD, and glht in the multcomp package, are designed for
aov objects. They do not have methods for aovlist objects.
The workaround is to download and install the HH package and look at the
maiz example.
library(HH)
?MMC
In that example I show how to get the same sequential sum of squares
Prof Brian Ripley wrote:
On Thu, 19 Jul 2007, Peter Dalgaard wrote:
ONKELINX, Thierry wrote:
The problem also exists in a clean workspace. But I've found the
troublemaker. I had set options(OutDec = ,). Resetting this to
options(OutDec = .) solved the problem.
Thanks,
Thierry
Hi, see below:
df
index value
1 1 1
2 4 6
3 7 4
4 9 5
511 3
613 2
foo - function(x){
+ index - ifelse(x %in% df$index, df$value[which(df$index %in% x)], NA)
+ return(index)
+ }
df_ok - data.frame(index=1:13, value=sapply(1:13, foo))
Ah, in printCoefmat() there is Cf which is at some point:
Cf
Estimate Std. Error t value Pr(|t|)
(Intercept) 0,2542 0,1875 1,356
x -0,5346 0,3463 -1,544
and
cat(Cf)
0,2542 -0,5346 0,1875 0,3463 1,356 -1,544
(i.e. values are character) and then
x0 -
Walter Paczkowski wrote:
Good morning,
I'd like to estimate a simple multinomial logit model in R (not a McFadden
conditional logit). For instance, I'd like to estimate the probability of
someone having one of eight titles in a company with the independent
variables being the company
CG Pettersson wrote:
Dear all!
W2k, R 2.5.1
I am working with an ongoing malting barley variety evaluation within
Sweden. The structure is 25 cultivars tested each year at four sites, in
field trials with three replicates and 'lattice' structure (the replicates
are divided into five
zhihua li wrote:
Hi netters,
I have a matrix X of the size (1000,100). The values are from -3 to +3.
When I tried
heatmap(X,
distfun=function(c),dist(c,method=bin),hclustfun=function(m),hclust(m,method=average))
I got the error message: Error: evaluation nested too deeply:
Hi all,
You can consult help of the functions multinom (library(MASS))
and vglm (library(VGAM)).
hope this help,
Pierre
Selon Walter Paczkowski [EMAIL PROTECTED]:
Good morning,
I'd like to estimate a simple multinomial logit model in R (not a McFadden
conditional logit). For instance,
On Thu, 19 Jul 2007, Peter Dalgaard wrote:
Prof Brian Ripley wrote:
On Thu, 19 Jul 2007, Peter Dalgaard wrote:
ONKELINX, Thierry wrote:
The problem also exists in a clean workspace. But I've found the
troublemaker. I had set options(OutDec = ,). Resetting this to
options(OutDec = .)
Nikola Markov wrote:
I have multicolumn data.frames with the first comumn giving ordinal
observation index ( ex.: 1 4 7 9 11 13 etc). I would like to fill up the
missing observations (i.e. 2 3 5 6 8 etc) with NAs.
Please specify reproducible examples, they make it much easier to help!
If
I need to perform maximum likelihood estimation on R, but I am not sure
which command to use. I searched on google, and found an example using the
function mlogl, but I couldn't find the package on R. Is there such
function? Or how should i perform my mle?
I also don't understand, but perhaps:
with(df, tapply(aps, list(class, id), mean))
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 19/07/07, sigalit mangut-leiba [EMAIL PROTECTED] wrote:
hello,
i want to compute the mean of a variable (aps) for every class
Dear friends,
My R*C table is as follow:
better
good
bad
Goup1
16
71
37
Group2
0
4
61
Group3
1
6
57
Can I test if there are statistical significant between Group1 and
Group2, Group2 and Group3, Group1 and Group2, taking into the multiple
comparisons?
The table can be set
Hi,
I have just started using R. Now I have the following problem:
I want to create an Empirical Cumulative Distribution Function and I only
came so far:
F10 - ecdf(x)
plot(F10, verticals= TRUE, do.p = TRUE, lwd=3)
x=c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2)
Now I'd like to use arguments such
Dear R user,
I need plot an histogram for the occurrence of a dataset, and then add a line
corresponding to the freuqnecy of another similar dataset. in order to do this
i used the function
hist_data1=hist(data1, breaks= seq(0,50,5), plot=FALSE)
hist_data2=hist(data2, breaks= seq(0,50,5),
Thanks a lot.
But an ignorant R user, like me, needed the code example from Jim Holtman
posted outside the list earlier today to understand that:
x62_samvar$cn - x62_samvar$cn[,drop=TRUE]
was the way to code. Thank you both!
/CG
On Thu, July 19, 2007 3:01 pm, Uwe Ligges said:
CG Pettersson
Sorry, that was a typo. Actually there wasn't a comma after 'function(m)'
in my expression.
So I'll try to increase the threshould to see if that works.
Thanks a lot!
From: jim holtman [EMAIL PROTECTED]
To: zhihua li [EMAIL PROTECTED]
Subject: Re: [R] Error: evaluation nested too deeply
Dear Users,
I have a problem with as.timeSeries() function. When I am using this function,
I can not assign my own date column. Is it possible to do this. For example, my
data frame is like below,
Datex1 x2...
01/01/2005 2.31.5...
01/02/2005 1.22.2...
This is great.
I haven't seen as.Date function before, and was using as.date from
library(date).
(note the lowercase 'd')
I have an alternative which might or might not be faster...
If the date is formatted mmdd (e.g. 20070719)
library(date)
formatted - gsub(^(\\d{4})(\\d{2})(\\d
hello,
I need to groupe some means and I wonder how to do to get critical range table
for tukey or for Neuman-Keuls
I think it's possible to do that with the qtukey() function?
thanks.
_
[[alternative
On Thu, 19 Jul 2007, Fluss wrote:
Hello!
I am using for logistic regression in survey data the svyglm procedure.
I wondered how does the strata effect estimates SE (in addition to the
weights given proportional to population size).
I know that for simple regression measurements of each strata
Yes, it's a quesion of rights. My system administrator just confirme that.
And I also try with a small Oracle client, and same as R, no permission to read
tables.
On R with RODBC I could list the tables but no permission to read or import
tables.
But I get confused because I was using the same
You might try running top while R runs, to get a better idea of what is
happening. 64-bit R takes more memory than 32-bit (longer pointers) and
for a large problem I would say that 2GB RAM is a minimum if you want
any speed. Slowness is likely related to needing to use swap space. The
cannot
I'm sorry for the unfocused questions, i'm new here...
the output should be:
classaps_mean
1 na
2 11.5
3 8
the mean aps of every class, when every id count *once*, for example: class
2, mean= (11+12)/2=11.5
hope it's clearer.
sigalit.
Sorry, I just realized I didn't send this to the list! (See below)
Thanks for all the help! All is working fine now.
If anyone knows of a more straightforward way to change the Value string
for the Key, please let me know (just to satisfy my curiosity). I got it to
work by modifying the source
sigalit mangut-leiba wrote:
I'm sorry for the unfocused questions, i'm new here...
the output should be:
classaps_mean
1 na
2 11.5
3 8
the mean aps of every class, when every id count *once*, for example: class
2, mean= (11+12)/2=11.5
hope it's
Hello R users,
I am a newby using R 2.5.0 on a Apple Power Book G4 with Mac OS X
10.4.10.
Sorry that I ask again such stupid questions, but I haven´t found how
to label the points created with plot3d (rgl).
Hope somebody can help me.
Thanks in advance.
Birgit
Birgit Lemcke
Institut für
Try this. It makes a copy of heatmap.2 whose scope is changed to
first look within heatmap.3 for functions like mtext. We redefine mtext
to intercept the text argument and change it appropriately. Then
we call our copy of heatmap.2. With this there is no need to change
the source of heatmap.2.
The documentation has:
text3d(x, y = NULL, z = NULL, texts, adj = 0.5, justify, ...)
Do this do it for you?
On 7/19/07, Birgit Lemcke [EMAIL PROTECTED] wrote:
Hello R users,
I am a newby using R 2.5.0 on a Apple Power Book G4 with Mac OS X
10.4.10.
Sorry that I ask again such stupid
Dear All,
I'm trying to do 'glm' analysis by groups just like in SAS you use by
variable. I don't know how to do it in R, anyone can help with this?
i.e.
groupline rep value
1 1 1 0.2
1 1 2 0.3
1 1 3 0.23
1 2
Check the following example for by():
require(stats)
attach(warpbreaks)
by(warpbreaks, tension, function(x) lm(breaks ~ wool, data = x))
or just type:
example(by)
b
On Jul 19, 2007, at 1:18 PM, Hongmei Jia wrote:
Dear All,
I'm trying to do 'glm' analysis by groups just
Dear all,
is Sweave working on MAC ?
I installed R-2.5.1 but seems like Sweave is not coming with the
distribution as it comes on linux.
Do I need to install it separately ?
In that case is there a .dmg for mac ?
Thanks for the help!
Regards
Marco
[[alternative HTML version deleted]]
Hi all,
Looking for tips on how I might more optimally solve this. I have
time series data (samples from a force sensor) that are not
guaranteed to be sampled at the same time values across trials. ex.
trial timex
1 1 1
1 5 4
1 7 9
1 12 20
Marco,
Yes, absolutely sweave comes with the binary Mac OS X distribution; it
works great for me.
Regards,
Tom
marco.R.help marco.R.help wrote:
Dear all,
is Sweave working on MAC ?
I installed R-2.5.1 but seems like Sweave is not coming with the
distribution as it comes on linux.
Do I
This should do it for you:
x - read.table(textConnection(trial timex
+ 1 1 1
+ 1 5 4
+ 1 7 9
+ 1 12 20
+ 2 1 0
+ 2 3 5
+ 2 9 10
+ 2 13 14
+ 2 19 22
+ 2 24 32), header=TRUE)
Thsi can be done compactly using the zoo package.
The first statement after library converts the rows for each trial into
a separate zoo object and then uses by to merge these into a
single zoo object with one column per trial.
The second statement converts it from zoo to ts which has
the effect
R
I am taking an excel dataset and reading it into R using read.table.
(actually I am dumping the data into a .txt file first and then reading data
in to R).
Here is snippet:
head(data);
Date Price Open.Int. Comm.Long Comm.Short net.comm
1 15-Jan-86 673.25175645 65910
thank you!
sigalit.
-- Forwarded message --
From: sigalit mangut-leiba [EMAIL PROTECTED]
Date: Jul 19, 2007 7:03 PM
Subject: tapply
To: r-help r-help@stat.math.ethz.ch
I'm sorry for the unfocused questions, i'm new here...
the output should be:
classaps_mean
1
Hi Meeryana,
It seems you have not loaded the package. To use a package that you
already installed, do:
library(copula)
I recommend you review the R documentation. There are several good
references and tutorial on the CRAN site:
http://cran.r-project.org/manuals.html
Jim Holtman's solution works great, and will try the zoo method just
for fun as well.
Thanks to all of you :)
Mike
--
Mike Lawrence
Graduate Student, Department of Psychology, Dalhousie University
Website: http://memetic.ca
Public calendar: http://icalx.com/public/informavore/Public
The
Dear all,
I've recently switched from EViews to R with RMetrics/fSeries (newest
version of july 10) for my analysis because of the much bigger
flexibility it offers. So far my experiences had been great -prior I
had already worked extensively with S-Plus so was already kind of
familiar with the
As for (3) below, we are also interested in the xi parameter from the
gpdFit function from fExtremes. It seems the fit classes returned by the
associated functions don't have the full properties as finMetrics has
for its classes.
My solution was to modify the appropriate fMetrics code, build a
I'm using pairs() to generate a scatterplot matrix;
pairs(~ Fuzzy.gray.white.ratio+Fuzzy.gw.t.score+AgeWhenTested+signal_mean.noise,
data=datam,subset=status==control,main=Controls,
labels=c(G/W,Peak Separation,Age,S/N))
How can I add regression lines to the plots?
Try some of the following:
head(subset(df, Yr %in% c(00,01,02,03)))
subset(df, (Yr = '00') (Yr = '03')) # same as above
subset(df, (Yr == '00') | (Yr == '01') | (Yr == '02') |(Yr == '03')) # same
On 7/19/07, Alex Park [EMAIL PROTECTED] wrote:
R
I am taking an excel dataset and reading
It is ok to bury a reg expression '\n' when using 'cat', but not 'paste'.
e.g.
cat ('I need to move on to a new line', '\n', 'at here') # change line!
paste ('I need to move on to a new line', '\n', 'at here') # '\n' is just a
character as it is.
Is there a way around pasting '\n' ? Thanks a
On 19/07/2007 7:41 PM, runner wrote:
It is ok to bury a reg expression '\n' when using 'cat', but not 'paste'.
e.g.
cat ('I need to move on to a new line', '\n', 'at here') # change line!
paste ('I need to move on to a new line', '\n', 'at here') # '\n' is just a
character as it is.
Is
Notice the difference:
cat ('I need to move on to a new line', '\n', 'at here') # change line!
I need to move on to a new line
at here paste ('I need to move on to a new line', '\n', 'at here') #
'\n' is just a
[1] I need to move on to a new line \n at here
cat(paste ('I need to move on to a
Dear Users,
Still having troubles with sharing my results, I'm trying to display a
contingency table using summary.formula.
Computing works well but I'd like to display information on redundant
entries say, males AND females.
I wonder if this code is correct :
desqualjum -
Dear all,
May anyone help me to use this package for the R software?
My procedure have been:
dir()
[1] line1.ind line1.out line1.txt line2.ind
line2.out line2.txt regressao.odc
boa.menu()
Bayesian Output Analysis Program (BOA)
Version 1.1.6 for i386, mingw32
Hello to all of you, R-expeRts!
I am trying to compute the cor.test for a matrix that i labelled mydata
according to mydata=read.csv...
then I converted my csv file into a matrix with the
mydata=as.matrix(mydata)
NOW, I need to get the p-values from the correlations...
I can successfully get the
Yes. After I increase the threshould to 1 it got through. Thanks a lot!
From: Uwe Ligges [EMAIL PROTECTED]
To: zhihua li [EMAIL PROTECTED]
CC: r-help@stat.math.ethz.ch
Subject: Re: [R] Error: evaluation nested too deeply when doing heatmap
with binary distfunction
Date: Thu, 19 Jul 2007
Hello,
This is a speed question. I have a dataframe genoT:
dim(genoT)
[1] 1002 238304
str(genoT)
'data.frame': 1002 obs. of 238304 variables:
$ SNP_A.4261647: Factor w/ 3 levels 0,1,2: 3 3 3 3 3 3 3 3 3 3
...
$ SNP_A.4261610: Factor w/ 3 levels 0,1,2: 1 1 3 3 1 1 1 2 2 2
...
$
it looks like that whatever method you used to genotype the 1002
samples on the STY array gave you a transposed matrix of genotype
calls. :-)
i'd use:
genoT = read.table(yourFile, stringsAsFactors = FALSE)
as a starting point... but I don't think that would be efficient (as
you'd need to
Is this what you want? It took 0.01 seconds to convert 20 rows of the
test data:
# create some data (20 rows with 1000 columns)
n - 20
result - list()
vals - c(AA, AB, BB)
for (i in 1:n){
+ result[[as.character(i)]] - sample(vals,1000, replace=TRUE,
prob=c(9000,1,1))
+ }
result.df
78 matches
Mail list logo