a=[0.1,0.2,0.1,0.3,0.4]
b=[0.2,0.3,0.1,0.2,0.5]
c=[1,1,1,1,1]
log(c+a-x*b) where x=unknown scale variable.
int=$$log(c+a-x*b)dadb, where $ denotes integral sign.
Actually, how could I calculate the integral's approximation?
double summation?
best,
moohwan
cortest.bartlett() in the psych package.
I've never seen a non-significant Bartlett's test.
Jeremy
On 17 June 2011 12:43, thibault grava thibault.gr...@gmail.com wrote:
Hello Dear R user,
I want to conduct a Principal components analysis and I need to run two
tests to check whether I can
Hi:
Perhaps the self-starting functions may be helpful. See ?selfStart.
There are self-starting functions for both the logistic and Gompertz
models (SSlogis and SSgompertz, respectively). Go through the examples
to see how they work.
HTH,
Dennis
On Fri, Jun 17, 2011 at 2:14 PM, Sean Bignami
Hi,
I would like to do a regression like:
reg - lm(y~log(.), data)
where the log function is applied to . in the form:
log(x1)+ log(x2)+ log(x3)...
instead of in the form
log(x1+x2+x3+...)
Is this possible?
Thank you,
Scott
[[alternative HTML version
Yes, it's possible, but if you want to do prediction on future
x-values, you will likely have a problem.
One way to do it would be something like (assuming y is the first column of dat)
reg - lm(y ~ log(as.matrix(dat[, -1])), dat)
but the output would be pretty ugly (see summary(reg)). Another
To add to Jeremy's comment below: The Bartlett test is very
sensitive to non-normality in the data, so can readily give
significant results even for non-correlated data.
Ted.
On 18-Jun-11 06:47:52, Jeremy Miles wrote:
cortest.bartlett() in the psych package.
I've never seen a non-significant
maybe another way is by reconstructing the formula using paste(), e.g.,
data - data.frame(y = rnorm(5), x1 = runif(5),
z = runif(5), age = runif(5))
nameRsp - y
nams - names(data)
namsX - nams[!nams %in% nameRsp]
form - as.formula(paste(nameRsp, ~ ,
paste(log(, namsX, ), sep = ,
On Jun 17, 2011, at 23:14 , Sean Bignami wrote:
I am trying to fit a curve to a cumulative mortality curve (logistic) where y
is the cumulative proportion of mortalities, and t is the time in hours (see
below). Asym. at 0 and 1
y
[1] 0. 0.04853859 0.08303777 0.15201970 0.40995074
On Jun 18, 2011, at 10:48 , (Ted Harding) wrote:
To add to Jeremy's comment below: The Bartlett test is very
sensitive to non-normality in the data, so can readily give
significant results even for non-correlated data.
Hmm, I wouldn't bet on that. Correlation tests are usually fairly robust.
Thanks a lot to all who responded. This is a little less confusing now,
although
it's hard for me to fathom the (practical) use of a dataframe within a
dataframe. If one mixes different notations, or, put in a different way,
different underlying classes (data.frame vs. numeric), these rather
Hi Justin:
I'm not dead certain this is what you were after, but try this:
dat-data.frame(id = rep(1:5, each = 200),
state=sample(1:3, 1000,
replace=TRUE, prob=c(0.7,0.05,0.25)),
V1=runif(1000, 1, 10), V2=rnorm(1000))
## input a data
Dear R Group
Here is what i am trying to do.. but couldnt figure out how..
string-ABC DEFG HIJKLM NOPQ RSTUV WXY
string1-substr(string,1,4)
I want to create an R object string 2 ( following the logic shown).. R does
not allow string subtraction.. any suggestions how to achieve this?
Much better..nice!
Dennis
On Sat, Jun 18, 2011 at 1:53 AM, Dimitris Rizopoulos
d.rizopou...@erasmusmc.nl wrote:
maybe another way is by reconstructing the formula using paste(), e.g.,
data - data.frame(y = rnorm(5), x1 = runif(5),
z = runif(5), age = runif(5))
nameRsp - y
nams -
Hi:
It's also simpler to use transform() or within(), especially if you
want to create and/or modify multiple variables in a data frame. For
example,
df- data.frame(weight=round(runif(10, 10, 100)),
sex=round(runif(100, 0, 1)))
df - transform(df, pct = 100 * weight/ave(weight,
Dear R-Users,
I am currently trying my luck with Hidden Markov Chains and use the
package mhsmm. I was very shocked to see how the initial values for
the transition matrix and probability distributions affected the
outcomes. The results were extremely different even for small changes
in the
Hello Vijayan,
Depending on your end goal the following could possibly help
substr(string,nchar(string1)+1, nchar(string))
or
strsplit(string, )
HTH,
Santosh
On Sat, Jun 18, 2011 at 2:06 PM, Vijayan Padmanabhan
padmanabhan.vija...@gmail.com wrote:
Dear R Group
Here is what i am trying to
I have an unexpected result with the functions lag() and diff() in the plm
(panel data) package when used with transform(). These plm-specific
functions are supposed to generate lags and first differences within each
panel.
lag() does not work properly the first time (it reproduces the same
Is this what you're looking for?
string - ABC DEFG HIJKLM NOPQ RSTUV WXY
unlist(strsplit(string, ))
[1] ABCDEFG HIJKLM NOPQ RSTUV WXY
HTH,
Dennis
On Sat, Jun 18, 2011 at 1:36 AM, Vijayan Padmanabhan
padmanabhan.vija...@gmail.com wrote:
Dear R Group
Here is what i am trying to do..
Hi:
I think I misread your intentions the first time. Is this more in line
with what you want?
f - function(s) {
ssp - unlist(strsplit(string, ))
n - length(ssp)
splits - grep(' ', ssp)
sapply(splits, function(x) paste(ssp[-(1:x)], collapse = ))
}
f(string)
[1] DEFG
Yes, Bartlett's is not a good way to justify a PCA.
David Cross
d.cr...@tcu.edu
www.davidcross.us
On Jun 18, 2011, at 1:47 AM, Jeremy Miles wrote:
cortest.bartlett() in the psych package.
I've never seen a non-significant Bartlett's test.
Jeremy
On 17 June 2011 12:43, thibault
Hi all,
I´m trying to recuperate old files I wrotte and I´m trying to execute on R
version 2.13.0 (2011-04-13), the thing is I execute my old file and nothing
happens...I suposse I need to install some library but there no appears no
message, no text telling required grafics library or something
On 11-06-17 10:35 AM, Oliver Jones wrote:
Hi
A client of mine has asked me to investigate the installation of R-software.
Could anyone tell me whether the software works only on a client machine or
whether it sits on a server with clients attaching to it?
Not immediately clear from the
On 11-06-17 3:43 PM, Vickie S wrote:
Hi friends,
I have a matrix with following format.
group var1 var2 ...varN
c1 group1 1.2399 1.4990-1.4829
c2 group4 0.8989 0.7849.1.8933
...
...
c100 group10 .
I want to draw a profile plot
of each condition c1 to c100, which
On 11-06-17 9:07 AM, Yang Lu wrote:
Hi,
I used R CMD build to build a package but realized that the .Rnw file was
deleted after the .tar.gz file was generated. Is it supposed to be the case? If
not, any idea as to why it happened?
No, R should not delete .Rnw files. No idea why it
Hi Loo,
This topic has been asked a lot.
I've complied a bunch of tutorials and relevant functions here:
http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/
If you find resources which I haven't listed, please let me know...
Best,
Tal
Contact
Hi Thibault,
Not that I think you'll use this after the above responses, but for the
record, have a look at:
?bartlett.test
Cheers,
Tal
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me:
Apologies for the obvious, but just to clarify: there is no reason to
justify a PCA -- it's just an eigen decomposition of a matrix and is
therefore justified by linear algebra.
If one wants to determine whether some subset of the eigenvectors =
principal components suffice to represent the data
Hi,
Can someone advise why the followind did not produce the array, given
the condition specified?
s - 1
a1 - array(dim=c(1,4))
a2 - array(dim=c(2,4))
arr - ifelse(s==0,a1,a2)
Thanks.
Muhammad
__
R-help@r-project.org mailing list
On 11-06-18 10:45 AM, Muhammad Rahiz wrote:
Hi,
Can someone advise why the followind did not produce the array, given
the condition specified?
s- 1
a1- array(dim=c(1,4))
a2- array(dim=c(2,4))
arr- ifelse(s==0,a1,a2)
See the Value section of ?ifelse.
Duncan Murdoch
Try using 'if':
s - 1
a1 - array(dim=c(1,4))
a2 - array(dim=c(2,4))
arr - if (s == 1) a1 else a2
str(arr)
logi [1, 1:4] NA NA NA NA
On Sat, Jun 18, 2011 at 10:45 AM, Muhammad Rahiz
muhammad.ra...@ouce.ox.ac.uk wrote:
Hi,
Can someone advise why the followind did not produce the array,
Understood now. Thanks Duncan.
Muhammad
On Sat, 18 Jun 2011, Duncan Murdoch wrote:
On 11-06-18 10:45 AM, Muhammad Rahiz wrote:
Hi,
Can someone advise why the followind did not produce the array, given
the condition specified?
s- 1
a1- array(dim=c(1,4))
a2- array(dim=c(2,4))
arr-
Hi,
Another easy option would be to convert your data to long format and then use
ggplot2 or lattice. Something like (though not exact without a reproducible
example):
require(ggplot2)
long.dat - melt(your_data, arguments)
ggplot(long.dat, aes(x = variable, y = value)) +
From: oliver.jo...@digred.com
To: r-help@r-project.org
Date: Fri, 17 Jun 2011 15:35:38 +0100
CC: rebeccahard...@deltaeconomics.com
Subject: [R] Server question
Hi
A client of mine has asked me to investigate the installation of R-software.
Could anyone tell me
Dear Dennis/Santosh
Got some ideas from both your suggestions.. Here is what finally i derived
as a solution to my problem..
The final R object string2 holds what i want now as a vector of substrings
of the desired length derived from the main string.
string-ABC DEFG HIJKLM NOPQ RSTUV WXY
Hi,
I've noticed I get different results fitting a function to some data on
my laptop to when I do it on my computer at work.
Here's a code snippet of what I do:
##--
require(circular) ## for Bessel function I.0
## Data:
dd -
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Albert-Jan Roskam
Sent: Saturday, June 18, 2011 2:44 AM
To: Brian Diggs; R-help@r-project.org
Subject: Re: [R] is this a bug?
Thanks a lot to all who responded. This is a
Hi,
On Fri, Jun 17, 2011 at 10:35 AM, Oliver Jones oliver.jo...@digred.com wrote:
Hi
A client of mine has asked me to investigate the installation of R-software.
Could anyone tell me whether the software works only on a client machine or
whether it sits on a server with clients attaching to
I do not understand why that would be the case as the only input involving
the relationship of the data is the determinant of the correlation matrix.
For what you suggest to be true, the non-normality of the data would have
to introduce correlation.
If what you are saying is true, we would
On Jun 18, 2011, at 15:48 , Tal Galili wrote:
Hi Thibault,
Not that I think you'll use this after the above responses, but for the
record, have a look at:
?bartlett.test
That's the other Bartlett's test, namely the one for comparison of variances.
That test is well known to rely on higher
On Jun 18, 2011, at 16:26 , Bert Gunter wrote:
Apologies for the obvious, but just to clarify: there is no reason to
justify a PCA -- it's just an eigen decomposition of a matrix and is
therefore justified by linear algebra.
If one wants to determine whether some subset of the eigenvectors
Hi ,
I have a function which passes a vector from R to C. However the size of the
vector is decided inside the c program. But as I have to pass the size while
calling the function from R lot of my space is getting wasted. Is there any
other alternative?
I call c function as :
Thanks for the clarification. That makes sense.
To summarize, bartlett.test() in the base distribution of R is not the
sphericity test, and it relies on the higher moments of the normal
distribution. The sphericity test can be computed with the formula provided
or the one implemented in the psych
Dear R Helpers,
I have a list that contains a number of objects, each of them financial
statement data from quantmod (although I don't think that knowledge of
quantmod is necessary to help with this problem).
str(listfinobj)
chr [1:4815] A.f AA.f AACC.f AAME.f AAN.f AAON.f AAP.f
AAPL.f AAT.f
On Jun 18, 2011, at 23:05 , Sparks, John James wrote:
Dear R Helpers,
I have a list that contains a number of objects, each of them financial
statement data from quantmod (although I don't think that knowledge of
quantmod is necessary to help with this problem).
str(listfinobj)
chr
(1) Repeatedly sending the same message to this list is not a good idea.
(2) It would probably be most efficacious for you to contact the maintainer
of the mhsmm package. Type
maintainer(mhsmm)
to find out who this is!
cheers,
Rolf Turner
On 2011-06-17 06:24, anna Harris wrote:
Hi,
Does anyone know how i get rid of the marker point in my error bars? The
bars default function (it seems) is to have a dot in the middle of the bar,
however i don't want it there.
I am using Hmis to draw my errorbars and code is
On Sat, Jun 18, 2011 at 7:08 PM, Jaimin Dave davejaim...@gmail.com wrote:
Hi ,
I have a function which passes a vector from R to C. However the size of the
vector is decided inside the c program. But as I have to pass the size while
calling the function from R lot of my space is getting
47 matches
Mail list logo