I have a symmetric matrix B (17x17), and a (17x17) square matrix A. If do
the following matrix multiplication I SHOULD get a symmetric matrix, however
i don't. The computation required is:
C = t(A)%*%B%*%A
here are some checks for symmetry
(max(abs(B - t(B
[1] 0
C = t(A)%*%B%*%A
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of statfan
Sent: Saturday, October 22, 2011 10:45 PM
To: r-help@r-project.org
Subject: [R] symmetric matrix multiplication
I have a symmetric matrix B (17x17), and a (17x17)
On 23-Oct-11 07:00:07, Daniel Nordlund wrote:
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org]
On Behalf Of statfan
Sent: Saturday, October 22, 2011 10:45 PM
To: r-help@r-project.org
Subject: [R] symmetric matrix multiplication
I have a
Just to avoid possible confusion, let me correct a typo
(at step [2] in the example below). Apologies!
-FW: xfmail.111023084327.ted.hard...@wlandres.net-
Date: Sun, 23 Oct 2011 08:43:27 +0100 (BST)
Sender: r-help-boun...@r-project.org
From: (Ted Harding) ted.hard...@wlandres.net
To:
Hi David,
Thanks for the reply,
f=function(x){quantile(x, c(0.25, 0.75),na.rm = TRUE) - matrix(IQR(x,na.rm =
TRUE) * c(1.5), nrow = 1) %*% c(-1, 1)}
Here parameter 1.5 is set for example in the above function as argument, it
can be even more may be 3.0 after analyzing actual data. Here
I think I am missing something with the chol() function. Here is my calculation:
mat
[,1] [,2] [,3] [,4] [,5]
[1,] 1 3 0 0 0
[2,] 0 1 0 0 0
[3,] 0 0 1 0 0
[4,] 0 0 0 1 0
[5,] 0 0 0 0 1
eigen(mat)
$values
[1] 1 1 1
That's fantastic, thank you very much, the qnorm option is interesting, I
will have to play around with it.
Many thanks again
Philip
-Original Message-
From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com]
Sent: Sunday, 23 October 2011 10:28 AM
To: Philip Robinson
Cc:
On Sun, 23 Oct 2011, Ron Michael wrote:
I think I am missing something with the chol() function. Here is my calculation:
mat
[,1] [,2] [,3] [,4] [,5]
[1,] 1 3 0 0 0
[2,] 0 1 0 0 0
[3,] 0 0 1 0 0
[4,] 0 0 0 1 0
[5,] 0 0
Hi,
I have the following data about courses (504) in a university, two
attributes about the proportion of resources used (#resources_used /
#resources_available), namely the average and the standard deviation.
Thus I have:
[1] n=504 rows
[2] 1 id column and 2 attributes
Here's a sample of the
Hi Josh,
Thank you for your feedback, after lot of trial and error the problem is
finally solved.
To solve this problem, I tried in this order:
1) uninstalling the two packages Matrix and lme4 and reinstalling them.
2) uninstalling doBy and reinstalling it with and without 1)
3) upgrading to
On Sun, Oct 23, 2011 at 8:10 AM, Giovanni Azua brave...@gmail.com wrote:
Hi Josh,
Thank you for your feedback, after lot of trial and error the problem is
finally solved.
To solve this problem, I tried in this order:
1) uninstalling the two packages Matrix and lme4 and reinstalling them.
It seems like the relevant plot would depend on what you are trying to
investigate, but usually a scatterplot would well work for bivariate
data with no other assumptions needed. I usually find ecdf() plots
rather hard to interpret without playing around with the data
elsewhere first and I'm not
here is one way
df1 - data.frame(c(1:20), c(21:40), c(31:50))
list1 - c(3, 6, 20)
df2 - df1[-list1,]
hanansela wrote:
Hello
I have a list of row names that needs to be deleted from a data frame. How
do i do that?
one of the columns in the data frame contains the row names as numbers.
I think that only works because the rows are ordered and have no
names: try something more like this:
df1 - data.frame(1:20, 21:40, 31:50)
rownames(df1) - sample(letters, 20)
toDrop - sample(rownames(df1), 5)
df1[ !(rownames(df1) %in% toDrop), ]
or alternatively
toKeep - sample(rownames(df1),
Október 19-től 21-ig irodán kívül vagyok, és az emailjeimet nem érem el.
Sürgős esetben kérem forduljon Kárpáti Edithez (karpati.e...@gyemszi.hu).
Üdvözlettel,
Mihalicza Péter
I will be out of the office from 19 till 21 October with no access to my emails.
In urgent cases please contact Ms.
Dr. Harrell,
Thanks for your response. The predictor variables I initially included in
the model were based on the x mean plots and whether they exhibited
ordinality and whether they appeared to meet the CR assumptions. Only 7 of
16 potential variables fit that designation and those are the
Hello
I have a list of row names that needs to be deleted from a data frame. how
do i do that.
one of the columns in the data frame contains the row names as numbers I can
also select by this column(will it be easier?).
Thank you
--
View this message in context:
Hello,
I am just starting with R and I am having a (most probably) stupid problem by
creating a new variable in a data.frame based on a part of another character
variable.
I have a data frame like this one:
A B C
AWI-test1 1 i
AWI-test5
Use regular expressions
?grepl
On Sunday, October 23, 2011, Philipp Fischer philipp.fisc...@awi.de wrote:
Hello,
I am just starting with R and I am having a (most probably) stupid problem
by creating a new variable in a data.frame based on a part of another
character variable.
I have a data
Perhaps to clarify Prof. Ripley's remarks below , the part that you missed
was symmetric, which your matrix obviously is not.
-- Bert
2011/10/23 Prof Brian Ripley rip...@stats.ox.ac.uk
On Sun, 23 Oct 2011, Ron Michael wrote:
I think I am missing something with the chol() function. Here is
Hello,
I used R a lot one year ago and now I am a bit rusty :)
I have my raw data which correspond to the list of runtimes per minute (minute
1 2 3 in two database modes sharding and query and two workload types
query and refresh) and as a list of char arrays that looks like this:
str(data)
That's not reasonable for 2 reasons. First, selecting variables based on
apparent assumption satisfaction is an unexplored technique. Second, you
failed to account for variable selection during resampling validation. You
will need to give the model all CANDIDATE variables and use the bw=TRUE
R. Michael Weylandt michael.weylandt at gmail.com writes:
It seems like the relevant plot would depend on what you are trying to
investigate, but usually a scatterplot would well work for bivariate
data with no other assumptions needed. I usually find ecdf() plots
rather hard to interpret
I think your question is answered by
http://cran.r-project.org/web/packages/fOptions/ChangeLog
2010-04-23 chalabi
* ChangeLog, DESCRIPTION: updated DESCR and ChangeLog
* src/085A-LowDiscrepancy.f: fixed sobol RVS on 64 bit platform
* ChangeLog, DESCRIPTION: updated
Dear R Users, Beginners and Experts,
I want to fit to my data an exponential function with following functional form:
y=exp(a*x)
I used the function nls but this gives me exponential fits with
following functional form:
y=l*exp(a*x)
With l being an scaling factor. What do I need to change in my
Hi
I have tried to estimate race winning probabilities with mlogit in R. I have
different amount of contestors in the races and mlogit has a bug so that in
those situations the mlogit does not work. So i tried to add dummy contestors
to the race so that every race has an equal amount of
I guess I must be misunderstanding the point of checking the ordinality
assumptions prior to fitting a model. Are you saying that a response
variable that does not behave in an ordinal fashion can still be included in
the initial and final model?
--
View this message in context:
Hi:
Here's one approach:
# Function to process a list component into a data frame
ff - function(x) {
data.frame(time = x[1], partitioning_mode = x[2], workload = x[3],
runtime = as.numeric(x[4:length(x)]) )
}
# Apply it to each element of the list:
do.call(rbind,
Henri Mone henriMone at gmail.com writes:
I want to fit to my data an exponential function with following
functional form:
y=exp(a*x)
I used the function nls but this gives me exponential fits with
following functional form:
y=l*exp(a*x)
With l being an scaling factor. What do I need
Hi Ravi,
Thank you for your reply and please excuse my late response.
Plugging w2 = k/w1 from (A) into (B) yields
(C) f(w1') = (w1-w1)^2 + (w2-k/w1)^2
The partial derivative wrt w1' is
(D) df(w1')/ dw1' = -2(w1-w1) + 2(w2-k/w1)*k/(w1')^2
in order for this to be a minimum the f.o.c.
On 10/22/2011 08:03 AM, Omphalodes Verna wrote:
Thanks Martin.
Here is my ''updated'' code.
setClass(myClass, representation(ID.r = numeric, ID.c = character, DAT =
matrix))
to.myClass- function(ID.r, ID.c, DAT) {
out- new(myClass, ID.r = ID.r, ID.c = ID.c, DAT = DAT)
return(out)
Hi Dennis,
Thank you very nice :)
Best regards,
Giovanni
On Oct 23, 2011, at 6:55 PM, Dennis Murphy wrote:
Hi:
Here's one approach:
# Function to process a list component into a data frame
ff - function(x) {
data.frame(time = x[1], partitioning_mode = x[2], workload = x[3],
Hello,
This is one problem at the time :)
I have a data frame df that looks like this:
time partitioning_mode workload runtime
1 1 shardingquery 607
2 1 shardingquery 85
3 1 shardingquery 52
4 1 shardingquery
On Oct 23, 2011, at 1:29 PM, Giovanni Azua wrote:
Hello,
This is one problem at the time :)
I have a data frame df that looks like this:
df -read.table(textConnection( time partitioning_mode workload
runtime
+ 1 1 shardingquery 607
+ 2 1 sharding
Suppose I have data like this:
A - sample(letters[1:3], 1000, replace=TRUE)
B - sample(LETTERS[1:2], 1000, replace=TRUE)
x - rnorm(1000)
I can get a table of means via
tapply(x, list(A, B), mean)
and I can add the marginal means to this using cbind/rbind:
main - tapply(x, list(A,B), mean)
If you just want the same symbol at each point, you could use Weylandt's
approach, tho' personally I think it's tidier to create a new vector
x10 - x[seq(1,length(x),by=10)] and plot that.
If you would like a different symbol at each point, then take a look at
?text.
quote
From: R.
Hello,
I am running R remotely on my university's network from my laptop (Macbook Pro,
running leopard, in case this is useful). I have a strict limit on how much
disk space I can take up on my network account at school, which is insufficient
for the size of some of the objects I need to
You misused nls(). Observe:
x- 1:101
y2 - 5*exp(x/20) + runif(101)/100 # nls will NOT converge for perfect data.
nls(y2 ~ exp(A*x), start=list(A=.1))
Nonlinear regression model
model: y2 ~ exp(A * x)
data: parent.frame()
A
0.06709
residual sum-of-squares: 136703
Number of
On Sun, Oct 23, 2011 at 7:46 PM, Molly Davies mollymdav...@gmail.com wrote:
Hello,
I am running R remotely on my university's network from my laptop (Macbook
Pro, running leopard, in case this is useful). I have a strict limit on how
much disk space I can take up on my network account at
On 23-Oct-11 19:03:05, Carl Witthoft wrote:
You misused nls(). Observe:
x- 1:101
y2 - 5*exp(x/20) + runif(101)/100 # nls will NOT converge for perfect
data.
nls(y2 ~ exp(A*x), start=list(A=.1))
Nonlinear regression model
model: y2 ~ exp(A * x)
data: parent.frame()
A
Thank you for the suggestions! I'm actually running simulations in R over two
separate networks (and thus will need to smile sweetly (and authentically, of
course!) twice). In one, I am ssh-ing from my Mac laptop into one Mac machine
with 32 cpu. In the other, I am ssh-ing into a cluster and am
Thank you Dan and Ted for these helpful comments. I will implement this
simple force symmetry code you suggested and make sure I familiarize with
this floating-point calculation problem so I can recognize such issues in
the future.
--
View this message in context:
This could be done with aggregate but I am unfamiliar with it so I'll give what
I think you want from your message using the library 'reshape' that you'll have
to doneload. If you're problem is large the data.table library would be much
faster.
You haven't really said what you'd like to get
I had to set it up as a data frame and then it workd beautifully with the
reshape package.
DF-data.frame(A,B,x)
library(reshape)
cast(DF, A ~ B, fun.aggregate=mean,
margins=c(grand_row, grand_col))
Cheers
Tyler
Date: Sun, 23 Oct 2011
Thank you, Michael
This is what i need. It works fine
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-delete-rows-by-a-list-of-rownames-tp3930206p3931200.html
Sent from the R help mailing list archive at Nabble.com.
__
Hello,
I have a list of dates in which I am going use for a time series analysis. I
want to break these dates up into 2 week intervals and count the number of
times a date appears in this interval.
For example from Nov. 19, 2000 to Dec 2 ,2000 with the data listed below I want
to return
Hi,
When I plot text and use cex to change the text size, I notice that the cex
multiplier is not exact. It looks as if the real size of text can take only
certain discrete values. Is there a workaround to get text to follow the cex
value more closely, or at least to be able to figure out what
Hello all,
I really appreciate how helpful the people in this list are. Would it be too
much to ask to send a small script to have it peer-reviewed? to make sure I am
not making blatant mistakes? The script takes an experiment.dat as input and
generates system Throughput using ggplot2. It
You also did unaccounted for stepwise selection. Regarding the proportional
odds assumption, if you assessed it correctly, something that is not
operating proportionally would have to be associated with the outcome for at
least one cutoff of Y, so you could say that you are doing reverse
I am a very new user of R and I need some suggestions on how perform a
diptest.
I dowloaded the package diptest. following instructions given by the file I
attach R I performed a diptest on the dataset statfaculty.
However I do not manage to do it with my dataset that consists of a single
column
Hello,
I am trying to do a manova test in r, and have used the manova function to
test differences between two dependent variables. The results were
significant for the whole model, but the sources I've read say that in order
to do a post-hoc multiple comparison, I have to do separate aovs for
On Oct 23, 2011, at 4:18 PM, sparklegirl...@hotmail.com sparklegirl...@hotmail.com
wrote:
Hello,
I have a list of dates in which I am going use for a time series
analysis. I want to break these dates up into 2 week intervals and
count the number of times a date appears in this
Another package to consider, especially if your dataframe is large, is
'data.table':
tp - read.table(textConnection( time partitioning_mode workload runtime
+ 1 1 shardingquery 607
+ 2 1 shardingquery 85
+ 3 1 shardingquery 52
+ 4
Does your point about proportionality also hold for ordinality? In other
words, if I have several X variables that do not behave in an ordinal
fashion with Y, should I still include them in the full model? My
understanding or perhaps misunderstanding of the ordinality assumption was
that all X
Hello,
I hope this is the right place to ask for help with a problem I am
having with RGtk2 installation with R on Windows XP.
I am running R 2.11.1 and have installed the package RGtk2 from CRAN.
I also have GTK 2.10.11 installed as well as GTK2-runtime 2.22.0. I
have added the environment
On Oct 23, 2011, at 7:37 PM, apeer wrote:
Does your point about proportionality also hold for ordinality? In
other
words, if I have several X variables that do not behave in an ordinal
fashion with Y, should I still include them in the full model? My
understanding or perhaps
On Sun, Oct 23, 2011 at 11:48 AM, Robert McDonald rmcd1...@gmail.comwrote:
I think your question is answered by
http://cran.r-project.org/web/packages/fOptions/ChangeLog
2010-04-23 chalabi
* ChangeLog, DESCRIPTION: updated DESCR and ChangeLog
* src/085A-LowDiscrepancy.f:
And the plyr version of this would be (using DF as the data frame name)
## transform method, mapping length(runtime) to all observations
## similar to David's results:
library('plyr')
ddply(DF, .(time, partitioning_mode), transform, n = length(runtime))
# or equivalently, the newer and somewhat
Dear R People:
I've been trying to get R Portable from sourceforge.net all day today
and there is a problem accessing the site.
Has anyone else run into that, please?
Thank you!
Sincerely,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University
59 matches
Mail list logo