On Saturday 08 April 2006 11:51, Chelsea Ellis wrote:
> Hi,
>
> I'm trying to use the svm function in R, but I can't find the e1071
> package. When I type library(e1071), I get the error message that the
> package doesn't exist. I've searched all over the CRAN website, but I
> can't find anything.
> "DylanB" == Dylan Beaudette <[EMAIL PROTECTED]>
> on Sun, 9 Apr 2006 19:28:44 -0700 writes:
DylanB> Greetings, I have had good success using the clara()
DylanB> function to perform a simple cluster analysis on a
DylanB> large dataset (1 million+ records with 9 variables).
Hi, I am writing a function that includes 'sum' function
such as:
f<-function(x){
c<-c(-1,0,1)
f<-sum(c+x)
}
expecting f to be -1+x+0+x+1+x=3x. But I found out that f is
sum(x). So, f is always a scalar, which means that f(c(0,1))
is not a vector as c(0,3), but 3(0+1)=3. I would like to ask
you
You need ls(all=TRUE) as some (12) are 'dot-names'. I just used
foo <- ls("package:base", all =TRUE)
pr <- foo[sapply(foo, function(x) is.primitive(get(x, "package:base")))]
and got 152.
There is a description in the `Writing R Extensions' manual, but it is
incomplete, and another classified l
Hi,
have a look at the packages distr and distrSim which are on CRAN.
hth
Matthias
- original Nachricht
Betreff: [R] Generic code for simulating from a distribution.
Gesendet: Mo, 10. Apr 2006
Von: [EMAIL PROTECTED]
> Hello all,
>
> I have the code below to simulate samples of ce
hello
I wonder if anyone can tell me the logic of using of interactive
parameters in
logistic regression ? (or direct me any link containing explaining it)
kind regards
Ahmet Temiz
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Hello all,
I have the code below to simulate samples of certain size from a
particular distribution (here,beta distribution) and compute some
statistics for the samples.
betasim2<-function(nsim,n,alpha,beta)
{
sim<-matrix(rbeta(nsim*n,alpha,beta),ncol=n)
xmean<-apply(sim,1,mean)
Sorry, I replied to the wrong email. Here it is again:
Try this where g is f summed over j and k for given scalars
theta and rho and gv is g vectorized over theta. I have not
checked this carefully so be sure you do:
f <- function(theta = 0, rho = 0, j = 0, k = 0)
dnorm(theta+2*pi*j,0,1)
Try this where g is f summed over j and k for given scalars
theta and rho and gv is g vectorized over theta. I have not
checked this carefully so be sure you do:
f <- function(theta = 0, rho = 0, j = 0, k = 0)
dnorm(theta+2*pi*j,0,1)*pnorm(2*pi*(k+1)-rho*(theta+2*pi*j))
g <- function(thet
I encounter a statistic problem about correlation.
I use R to test wether two variables are correlated or not.
(pearson correlation)
cor.test(x,y) give a p=5.87
Because the x, y is not normal distributed (qqplot indicate that) I
also perform
(spearman rank
Greetings,
I have had good success using the clara() function to perform a simple cluster
analysis on a large dataset (1 million+ records with 9 variables).
Since the clara function is a wrapper to pam(), which will accept known medoid
data - I am wondering if this too is possible with clara()
Weighted spatial kernel density estimation is available in
the function 'density.ppp' in the package 'spatstat'.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-projec
Hi, thanks for your reply.
Here I would like to ask you again more directly.
The following is what I had for now.
The function to begin with is
dnorm(theta+2*pi*j,0,1)*(pnorm(((2*pi*(k+1)-rho*
(theta+2*pi*j)).
Now, I wanted to sum it over k from -1 to 1. So, I
wrote the following.
f1<-f
I am wondering how to obtain SE estimates for fixed effects from a nonlinear
mixed effects model?
I have fixed effects corresponding to three factors A, B and C with 2, 3 and 3
levels respectively. I have fit a model of the following general form:
nlme1<-nlme(y~ SasympOrig(x, Asym, lrc), data=
Dear R list,
I have fitted cubic regression spline with fixed degree of freedom to a
set of data using package mgcv. Now I want to calculate the area under the
spline curve. Someone has suggested me to use trapezoidal rule. Do you know
if someone has written a package that will carry out that an
On 4/9/2006 5:57 PM, Diethelm Wuertz wrote:
> Duncan Murdoch wrote:
>
>> On 4/9/2006 5:46 AM, Diethelm Wuertz wrote:
>>
>>> How one can make a list of all functions in R's base
>>> package which are given as Primitives like abs, sqrt
>>> cumsum (but not log) ?
>>
>> There's an is.primitive() test
Dear R users
This is a stats question rather than R question. For continuous predictors, we
get estimates of slopes and their se and t values (slope/se) in R ouptput. If
we have a model with more than one continuous variable (i.e., multiple
regression), we get slope, se and t value for each contin
Duncan Murdoch wrote:
> On 4/9/2006 5:46 AM, Diethelm Wuertz wrote:
>
>> How one can make a list of all functions in R's base
>> package which are given as Primitives like abs, sqrt
>> cumsum (but not log) ?
>
>
> There's an is.primitive() test function; you just need to
Sorry when I ask again,
Or, of course, if you are willing to reduce it then its just
sum(c) + length(c) * x
On 4/9/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> If c is c(c1, c2, c3) and x is c(x1, x2, x3) then
> c+x is (c1+x1, c2+x2, c3+x3)
> so sum(c+x) is c1+x1+c2+x2+c3+x3 = sum(c) + sum(x)
>
> What you were ex
If c is c(c1, c2, c3) and x is c(x1, x2, x3) then
c+x is (c1+x1, c2+x2, c3+x3)
so sum(c+x) is c1+x1+c2+x2+c3+x3 = sum(c) + sum(x)
What you were expecting is given by:
rowSums(outer(1:4, c(-1,0,1), "+")) # gives c(3, 6, 9, 12)
Review the Introduction to R manual and also look at ?outer and ?rowS
Hi, I am writing a function that includes 'sum' function
such as:
f<-function(x){
c<-c(-1,0,1)
f<-sum(c+x)
}
expecting f to be -1+x+0+x+1+x=3x. But I found out that f is
sum(x). So, f is always a scalar, which means that f(c(0,1))
is not a vector as c(0,3), but 3(0+1)=3. I would like to ask
you
Thanks Christosworked a treat!
Christos Hatzis <[EMAIL PROTECTED]> wrote: You can try sweep:
sweep(a,2,b,"+")
-Christos
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Smith
Sent: Sunday, April 09, 2006 11:28 AM
To: r-help@stat.math.ethz.ch
S
Just strip off the hours component of the dates, then take a subset of the data
where the hour is <= 12.
I did not execute this, so you might need to change it a bit:
hours <- as.integer(format(dates(base),"%H"))
new.data <- base[hours <= 12,]
aggregate(new.data,by=list(as.factor(format(dates
I am having some problems using the latex() function in the Hmisc
package. When I turned on the "ctable" option in latex(), the LaTeX
code produced by latex()somehow conflicts with the style back my
unversity uses for theses. Has anyone on the list had a similar
conflict and been able to fix it.
Asako,
My copy of MASS4 has been borrowed. But you can have a look at
Julian Faraway's "Practical Regression and Anova using R" in
the Contributed Documentation section of CRAN. See section 2.9.
In MASS, look for 'vcov'.
Peter Ehlers
asako Ishii wrote:
> Peter,
>
> Thank you very much for you
Try this:
t(t(a)+b)
On 4/9/06, Tim Smith <[EMAIL PROTECTED]> wrote:
> Hi All,
> This is probably a very simple question. I was trying to add a row to the
> rows in a matrix. For example:
>
> > a <- matrix(1:6,2,3)
> >
> > b <- a[1,]
> >
> > print(a)
> [,1] [,2] [,3]
> [1,]135
>
When fitting a logistic regression model using weights I get the
following warning
> data.model.w <- glm(ABN ~ TR, family=binomial(logit), weights=WEIGHT)
Warning message:
non-integer #successes in a binomial glm! in: eval(expr, envir, enclos)
Details follow
***
I have a binary dependent varia
On Sunday 09 April 2006 11:41, R. A. L. Carter wrote:
> prematurely with the message *"configure:27295: WARNING: gfortran and
> gcc disagree on int and double configure:27297: error: Maybe change
> CFLAGS or FFLAGS?"* Altough I've looked in both the R_Help archive and
This is primarily a guess,
Hi ..
lm() returns an effects component in its output. I read the explanation in
R but was not quite clear.
say my response is Y
and design matrix is X
say X has QR decomposition X=QR
is effects = Q (Q'Q)^-1 Q' Y ???
i am sure this is wrong as it did not match the ou
*I've been trying for several weeks to install R-2.2.1 on a PC with
an AMD Athlon 64 2800*+* processor running Mandriva 2006_64. After
unpacking R-2.2.1.tar.gz I ran ./configure. However, configure stopped
prematurely with the message *"configure:27295: WARNING: gfortran and
gcc disagree on
You can try sweep:
sweep(a,2,b,"+")
-Christos
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Smith
Sent: Sunday, April 09, 2006 11:28 AM
To: r-help@stat.math.ethz.ch
Subject: [R] adding a row to a matrix
Hi All,
This is probably a very simple qu
I haven't heard any more comments on this, and R 2.3.0 is almost here,
so I'll bring this thread to a close. I have changed the default theme
to the old PDF default for all devices (except postscript, which still
defaults to color=FALSE) in the latest lattice (part of R-alpha now).
It's easy enough
Hi All,
This is probably a very simple question. I was trying to add a row to the
rows in a matrix. For example:
> a <- matrix(1:6,2,3)
>
> b <- a[1,]
>
> print(a)
[,1] [,2] [,3]
[1,]135
[2,]246
>
> print(b)
[1] 1 3 5
I now want to add 'b' to every row
Don't know about a function but it can be done in one plot statement
like this:
plot(seq(x) - match(x, x) ~ x, list(x = sort(mydata)),
xlim=c(25,45), ylab ="", yaxt="n", pch=19, frame.plot=FALSE)
On 4/9/06, Jinsong Zhao <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am wondering whether there is
R^2 for a model is usually defined as 1-RSS/TSS where TSS is the SS
about the mean and RSS is the residual SS from the model.
Consider the model in R
z <- runif(20)
y <- z+rnorm(20)
my.model <- lm(y~offset(z))
summary(my.model)$r.squared
Here the RSS is equivalent to the TSS and
gives 0 when it
Dear Bill,
You might check Faraway's 'Extending the Linear Model with R:
Generalized Linear, Mixed Effects and Nonparametric Regression Models'
(2006). Without having read the book properly, at least I noticed that
package lme4 and the function lmer is used in the examples.
Best regards,
Henri
2006/4/8, He, Yulei <[EMAIL PROTECTED]>:
>
> Hi, there.
>
>
>
> How do I calculate the cross-product in the form of
> \sum_{i=1}^{n}X_{i}^{t} \Sigma X_{i} using R code without using do loop?
> X_{i} is the covariate matrix for subject I, \Sigma is the covariance
> matrix.
If I don't miss somethin
On 4/9/2006 5:46 AM, Diethelm Wuertz wrote:
> How one can make a list of all functions in R's base
> package which are given as Primitives like abs, sqrt
> cumsum (but not log) ?
There's an is.primitive() test function; you just need to get all
objects, and test them one by one.
Duncan Murdoch
Mi nueva dirección de correo es: [EMAIL PROTECTED]
New e-mail address: [EMAIL PROTECTED]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
How one can make a list of all functions in R's base
package which are given as Primitives like abs, sqrt
cumsum (but not log) ?
Thanks a lot
Diethelm Wuertz
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Matt Goff wrote:
> I am trying to use the formula interface for the boxplot.
> Currently running R 2.2.1 on Windows XP.
>
> The problem is that boxplot is displaying groups that are empty in the
> plot.
>
> The following example demonstrates what it is happening (though my actual
> situatio
It is recommended that you use a package for this sort of thing.
When a package is loaded, the S4 methods it contains are merged into the
metadata. When the global environment is loaded, they are not. Call
'cacheMetaData(1)' to do so.
[This looks like a bug: cacheMetaData is called on .Global
G. Alex Janevski umich.edu> writes:
>
> points(y~x, pch="*", col="black")
> lm(y~x)
> fm=lm(y~x)
> abline(fm, col="red")
>
> This works. The problem arises in that I would like to run my simulation
> multiple times, to plot the data points together on the same plot, and
> more importantly the
Andreas Svensson bio.ntnu.no> writes:
>
> I had a suspicion that you can't have the lme4 package loaded when using
> lme (from the nlme package), and lo! I get the full summary of lme only
> if lme4 is NOT loaded.
Yes, currently the two don't coexist well, so better make sure to use only on
Matt Goff nawwal.org> writes:
>
>
> The problem is that boxplot is displaying groups that are empty in the
> plot.
>
Call factor() again on the groups, which will drop levels. You can do that in an
extra line, or on-the-fly:
data<-data.frame(values=c(1:25), groups=rep(c("A","B","C","D","E"
Any one can explain why this happens or any work arounds?
> setClass('foo')
[1] "foo"
> setAs('foo', 'character', function(from) from)
> showMethods('coerce')
Function "coerce":
from = "ANY", to = "array"
from = "ANY", to = "call"
from = "ANY", to = "character"
from = "ANY", to = "complex"
from =
Thanks for the brilliant solution.
***AGAIN***
Now - just to go deeper into the **same subject** on which I'm really supposed
to work very soon - if I want to aggregate by date only data, say, before
noon (12.00.00) what should I do?
Ciao
Vittorio
Alle 16:13, venerdì 07 aprile 2006, Whit Arm
47 matches
Mail list logo