Giam Xingli nus.edu.sg> writes:
>I hope I can get advice regarding the calculation of leverage values or
>studentized residual values of a non-linear regression model. It seems like
>rstudent() does not work on a nls object.
residuals() should work for nls.
Dieter
_
Try looking at the examples in :
?order
perhaps:
dta.frm[order(user_id), ]
especially the one that demonstrates how to sort dataframes
with three indices. And if that does not satisfy your needs, then you
absolutely must provide a simple example and an explicit layout of
what the
Is there a similar argument for axis that controls the position of
labels via line argument in mtext ?
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-gui
Dear Dimitris,
Thanks very much. I tried dim(M) and get:
[1] 5030 2142
which I thought meant that my matrix M is actually a matrix, but
I tried str(M) and get:
int [1:5030, 1:2142] 2 1 2 0 1 0 2 1 2 -1 ...
When I tried
rowSums(M == 0)
I got:
Error in rowSums[M == 0] :
object of type 'cl
The class Matrix (esp. dgCMatrix) is extraordinary. However, I still have growin
pains with it. One common need (I believe) is to apply the same function to all
non-zero elements of the sparse matrix. Is there a simple, elegant way?
-g
__
R-help@r-proj
Hi there,
I hope I can get advice regarding the calculation of leverage values or
studentized residual values of a non-linear regression model. It seems like
rstudent() does not work on a nls object.
Many thanks in advance!
Best regards,
Xingli
Thank you Bill and Gabor:
I do have a few years of fish sizes data (from larvae to juvenile). If I melt
them together how can I create the best model to predict future weights. My
weeks go up to 16 right now, but I want to predict weights for week 17 to 20.
Based on both of you examples it was
Thank you Bill and Gabor:
I do have a few years of fish sizes data (from larvae to juvenile). If I melt
them together how can I create the best model to predict future weights. My
weeks go up to 16 right now, but I want to predict weights for week 17 to 20.
Based on both of you examples it was
hi Erin,
Thanks for your reply to my problems. I tried and it works, but it sorted
all the column. In my case, I want it to sort d user_id column and another
information in other column will follow it. Now, after I sorted, the
information which website viewed by user was wrong. I want to as how we
Looking for advice on a problem with Sweave, sasweave, and version
2.5.1 versus 2.8.1 of R. I'm running all this on WinXP. I have both
2.5.1 and 2.8.1 installed.
I have sasweave set up to run R 2.5.1, as this line in the runR.bat
file shows:
set RTERM="C:\Program Files\R\R-2.5.1\bin\Rterm.exe"
G'day Ranjan,
On Sun, 5 Apr 2009 17:00:56 -0500
Ranjan Maitra wrote:
> [...[
> I haven't tried this function out much myself, so YMMV.
There is an obvious problem in this code since len is not decreased but
n is when an index is sampled. The last line in the last for loop
should be
x[j
Hi
Thomas Steiner wrote:
> Hi Greg and Paul,
>
> I tried several things, but I did not succeed:
>
> * I could not find the library(EBImage) on CRAN in Austria to open an
> png image in R.
>
> * I could not import the image via pixmap (read.pnm) as described on
> http://wiki.r-project.org/rwiki
Hi
William Deese wrote:
> In making grid graphs, one can make the background semi-transparent
> with a line like
>
> grid.rect(gp=gpar(lty=0, fill=rgb(.5, .5, 0,. 25)))
>
> and then make the area where points and lines are plotted white with lines
> like
>
> pushViewport(plotViewport(c(5,4,3,
Perhaps your loop should be more than just a print statement. That works fine!
You need to place the print statement after the '{', not before it.
fit$coefficients is a 21 x 20 array (the rows are lablelled 0 to 20) and you
are trying to put it in the jth *column* of a 20 x 20 matrix. Not sur
> M <- matrix(0:15, 8, 4, byrow=TRUE)
> rowSums(M == 0)
[1] 1 0 0 0 1 0 0 0
Bill Venables
http://www.cmis.csiro.au/bill.venables/
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of onyourmark
Sent: Sunday, 5 April 2009 10:00 PM
To
I was trying to understand some of the source in optimi.c and in the SANN
source I see:
SETCADR(OS->R_gcall, x);
PROTECT_WITH_INDEX(s = eval(OS->R_gcall, OS->R_env), &ipx);
REPROTECT(s = coerceVector(s, REALSXP), ipx);
if(LENGTH(s) != n)
error(_("candi
I presume you mean sampling without replacement? The following
(adapted from the file you asked for) will do it, but you will need to
incorporate Rmath as standalone in order to get runif to work.
This function will give you k indices from n, sampled WOR. Thus, n = 50
for you and k = 5. You will g
Dear R People:
I can edit a data frame with time series as
x.df <- edit(as.matrix(x.df))
Is there a better way, please?
Thanks,
erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com
?t # I knew it worked with matrices so seemed reasonable to see if it
worked on tables.
> t(with(warpbreaks, table(wool, tension)) )
wool
tension A B
L 9 9
M 9 9
H 9 9
> with(warpbreaks, table(wool, tension))
tension
wool L M H
A 9 9 9
B 9 9 9
On Apr 5, 2009
On Fri, 03-Apr-2009 at 07:48PM -0400, Duncan Murdoch wrote:
> On 03/04/2009 5:37 PM, Emmanuel Charpentier wrote:
>> Le vendredi 03 avril 2009 à 14:17 -0400, stephen sefick a écrit :
>>> I am starting to use R for almost any sort of calculation that I need.
>>> I am a biologist that works in the s
Is there an easy way to invert a table? (not to solve for the inverted
matrix, just swap rows for columns & vice versa). I've gone through my data
manipulation bible (Phil Spector's book), but to no avail.
[[alternative HTML version deleted]]
In making grid graphs, one can make the background semi-transparent
with a line like
grid.rect(gp=gpar(lty=0, fill=rgb(.5, .5, 0,. 25)))
and then make the area where points and lines are plotted white with lines like
pushViewport(plotViewport(c(5,4,3,1)))
pushViewport(dataViewport(year, m, name=
Thanks, Ranjan. Got it!
I am now wondering whether there is some simpler way of implementing
the following in C:
sample(1:50,5)
Paul
On Sun, Apr 5, 2009 at 4:10 PM, Ranjan Maitra wrote:
> Hi Paul,
>
> It is in the main/src/random.c file of the source code.
>
> HTH!
> Best wishes,
> Ranjan
>
>
check package adapt, http://cran.r-project.org/web/packages/adapt/index.html
Best,
Dimitris
salia a wrote:
I need the commond in R for double integral over the range - infinity
Could you please help me.
Thanks and regards
Salya
[[alternative HTML version deleted]]
-
I need the commond in R for double integral over the range - infinity__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide comme
I have used ltext in a panel function like in the code segment below:
print(levelplot(reslot ~ aisle + quad, reslot.df,
col.regions=topo.colors(max(quad.POG$values)),
panel=function(x, y, z, ...){
panel.levelplot(x, y, z, ...)
panel.abline(v=seq(1.5, by=1, length=length(ais
Good day,
I am facing a problem when I am installing the dynamo-package and loading it.
After I installed the package, I received the following warning message:
"In file.create(f.tg) :
cannot create file 'C:\PROGRA~2\R\R-28~1.1/doc/html/packages.html', reason
'Permission denied'"
and when I l
In my haste I forgot to take the logs of the likelihoods. How embarrassing.
The conclusion is unchanged - the data support a non-zero threshold.
Here's the corrected code:
x.threshold <- 0
loglikelihood <- log(1/(x-x.threshold) * dnorm(log(x - x.threshold),
mean(log(x - x.threshold)), sd(log(x
Hi Perry,
my impression after a very cursory glance: this looks like noise.
Perhaps you should think a little more about your series - what kind of
seasonality there could be (is this weekly data? or monthly?), whether
the peaks and troughs could be due to some kind of external driver,
whethe
On 5 April 2009 at 03:33, Ken-JP wrote:
| If you check here:
|
| https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/300935
|
| You will find many other unhappy apps:
| emacs
| xterm
| vnc
| freeNX
| netpbm
| x3270
| stage
|
| and any others that uses names in place of rgb codes for X11.
|
| L
johnhj wrote:
Hii,
Can anybody help me to put a text under the barplots. I will describe the
percental between six grouped barplots. I tried to do it with mtext but
without success.
Here is my code:
test <-read.table(file="D:/mobile.txt")
pdf(file = "D:/mobil126.pdf",
width = 6.67, heig
if 'M' is your matrix, then try this:
rowSums(M == 0)
I hope it helps.
Best,
Dimitris
onyourmark wrote:
Hi. I have an n x m matrix M some of who's entries are zeros. I want to know
how many zeros there are in each row-perhaps stored in a 1 x n vector
which lists the number of zeros for
Hii,
Can anybody help me to put a text under the barplots. I will describe the
percental between six grouped barplots. I tried to do it with mtext but
without success.
Here is my code:
test <-read.table(file="D:/mobile.txt")
pdf(file = "D:/mobil126.pdf",
width = 6.67, height = 5, onefile =
Hi. I have an n x m matrix M some of who's entries are zeros. I want to know
how many zeros there are in each row-perhaps stored in a 1 x n vector
which lists the number of zeros for each row of M.
Before I had a vector V and I was able to get the number of zeros in V by
doing length(V[ V==0]
Ken-JP wrote:
Peter Dalgaard wrote:
Hum.. Fedora 9 doesn't have it either.
It does have /usr/share/X11/rgb.txt though, so please check whether it
has moved. I'm curious as to why (only) R/tcltk would be confused by
this sort of thing.
If you check here:
https://bugs.launchpad.net/ubunt
Hi Paul,
It is in the main/src/random.c file of the source code.
HTH!
Best wishes,
Ranjan
On Sun, 5 Apr 2009 15:35:25 +0100 Paul Smith wrote:
> Dear All,
>
> I would like to use the function sample() in a program written in C.
> Is there somewhere the code of sample() written in C?
>
> Thank
John-Paul Taylor ryerson.ca> writes:
>
>
> I am tying to run a maxlik regression and keep getting the error,
> NA in the initial gradient
>
> My Code is below:
> gbmploglik<-function(param){
> mu<-param[1]
> sigma<-param[2]
> lamda<-param[3]
> nu<-param[4]
> gama<
Dear R users,
I have problem with extracting coefficients from a
object. Here, X (predictor)and Y (response) are two matrix , I am regressing
X ( dimensions 10 x 20) on each of columns of Y[,1] (10 x 1) and want to
store the coefficient values. I have performed a Elastic Net
The data suggest a lognormal threshold to me (and perhaps to the originator,
based on his title).
##
x <- c(0.80010, 0.72299, 0.69893, 0.99597, 0.89200, 0.69312, 0.73613,
1.13559, 0.85009, 0.85804, 0.73324, 1.04826, 0.84002, 1.76330, 0.71980,
0.89416, 0.89450, 0.98670, 0.83571, 0.73833, 0.6654
Dear All,
I would like to use the function sample() in a program written in C.
Is there somewhere the code of sample() written in C?
Thanks in advance,
Paul
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do re
It's in the Bioconductor repository.
http://bioconductor.org/packages/2.3/bioc/html/EBImage.html
On Apr 5, 2009, at 6:14 AM, Thomas Steiner wrote:
EBImage
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
__
R-help@r-project.org mailing
Hi all,
I am trying to make tiff files of lattice plots at a resolution greater
than 300 dpi required by a journal (PLoS ONE). I have tried both the tiff
and bitmap functions. tiff keeps panel colors but reduces axes and tick
labels so they are nearly invisible. bitmap maintains correct label siz
Hi All,
I am relatively new to R and having a great experience with it but have come up
with a little road block.
I am tying to run a maxlik regression and keep getting the error,
NA in the initial gradient
My Code is below:
gbmploglik<-function(param){
mu<-param[1]
sigma<-pa
You didn't properly specify the x-axis coordinates in your call to lines():
plot(density(x))
lines(x,dlnorm(x, -.1348, .1911), col='red')
points(x,dlnorm(x, -.1348, .1911), col='blue')
curve(dlnorm(x, -.1348, .1911), col='green',add=T)
On Sun, Apr 5, 2009 at 6:40 AM, Bernardo Rangel Tura
wrote:
On 05-Apr-09 08:18:27, tedzzx wrote:
> Dear R users
> I have run an regression and want to extract the p value of the F
> statistics, but I can find a way to do that.
>
> x<-summary(lm(log(RV2)~log(IV.m),data=b))
>
> Call:
> lm(formula = log(RV2) ~ log(IV.m), data = b[[11]])
>
> Residuals:
>
On 05/04/2009 4:18 AM, tedzzx wrote:
Dear R users
I have run an regression and want to extract the p value of the F
statistics, but I can find a way to do that.
x<-summary(lm(log(RV2)~log(IV.m),data=b))
Call:
lm(formula = log(RV2) ~ log(IV.m), data = b[[11]])
Residuals:
Min 1Q Me
Hi,
what about the following:
## some test data
x <- 1:10
y <- x + rnorm(x)
## model and summary
m <- lm(y~x)
sm <- summary(m)
sm
# str(sm)
# sm$fstatistic
## and now: the manual case
1 - pf(sm$fstatistic[1], sm$fstatistic[2], sm$fstatistic[3])
Hope it helps, ThPe
tedzzx schrieb:
Dear R
On 05/04/2009 4:18 AM, tedzzx wrote:
Dear R users
I have run an regression and want to extract the p value of the F
statistics, but I can find a way to do that.
x<-summary(lm(log(RV2)~log(IV.m),data=b))
Call:
lm(formula = log(RV2) ~ log(IV.m), data = b[[11]])
Residuals:
Min 1Q Me
Dear R users
I have run an regression and want to extract the p value of the F
statistics, but I can find a way to do that.
x<-summary(lm(log(RV2)~log(IV.m),data=b))
Call:
lm(formula = log(RV2) ~ log(IV.m), data = b[[11]])
Residuals:
Min 1Q Median 3Q Max
-0.26511 -0.09
Hi,
Have you looked at the compare package? It might do what you want (I
just remember seeing its description on R News recently but I've never
used it),
d <- data.frame(x=1:10,y=sin(1:10),z=factor(letters[1:10]))
d1 <- d
d1$x[2:3] <- jitter(d$x[2:3] )
d2 <- subset(d1, !(z %in% c("a","g")
Try adding this line:
label <- eval(substitute(label), df, environment(formula))
On Sat, Apr 4, 2009 at 6:27 PM, Derek Ogle wrote:
> Sorry for posting this twice, but I still have not solved this problem
> and am hoping for some assistance.
>
>
>
> I am attempting to write a function that is fl
Dear all:
I'm a newbie and an amateur seeking help with forecasting the next in a
non-stationary time series, with constraints of 1 (low) and 27 (high)
applicable to all.
What I need help with is the solution concept. The series has 439 observations
as of last week. I'd like to analyze obs 1
Hi,
It seems to me that you could write a generic function myplot() and
have different methods for each class of object (like plot does).
Either S3 or S4 classes would do I think. Then it is only a matter of
making each method work separately. In particular, the method for a
formula coul
Peter Dalgaard wrote:
>
> Hum.. Fedora 9 doesn't have it either.
>
> It does have /usr/share/X11/rgb.txt though, so please check whether it
> has moved. I'm curious as to why (only) R/tcltk would be confused by
> this sort of thing.
>
If you check here:
https://bugs.launchpad.net/ubuntu/+
Hi Greg and Paul,
I tried several things, but I did not succeed:
* I could not find the library(EBImage) on CRAN in Austria to open an
png image in R.
* I could not import the image via pixmap (read.pnm) as described on
http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:translucency
Try this:
> library(zoo)
> Lines <- "-8 100
+ -6 20.2
+ -1 1.5
+2 3.00
+3 78.8
+5 33.2
+6 44.5
+7 5.00"
> DF <- read.table(textConnection(Lines))
> z <- zoo(DF$V2, DF$V1)
> zz <- merge(z, zoo(, seq(min(time(z)), max(time(z, fill = 0
Try this:
> library(forecast)
> weight <- as.numeric(weight)
> fc <- forecast(weight)
> plot(fc)
With this data it chooses a model with multiplicative error and
trend and no seasonality.
On Sun, Apr 5, 2009 at 2:13 AM, Felipe Carrillo
wrote:
>
> Hi:
> I have usually used the GROWTH() excel fun
I am trying to visualize a 2D matrix, with some auxiliary labels associated
with each rectangle in the chart. The image command and levelplot in the
lattice package map data to colors, but I couldn't find any option to
specify values I want to show. Is there an easy way to do this?
Thanks,
Ken
On Sun, 2009-04-05 at 01:13 -0400, jim holtman wrote:
> Here is what I get from using 'fitdistr' in R to fit to a lognormal.
> The resulting density plot from the distribution seems to be a reason
> match to the data.
>
> > x <- scan()
> 1: 0.80010 0.72299 0.69893 0.99597 0.89200 0.69312 0.73613 1
Berwin A Turlach wrote:
G'day Dirk,
On Sat, 4 Apr 2009 20:27:22 -0500
Dirk Eddelbuettel wrote:
On 4 April 2009 at 14:37, Ken-JP wrote:
Yes, I have x11-common installed, and dpkg -S /etc/X11/rgb.txt
shows "not found" for me. This is on Ubuntu 8.10 amd64.
Same 8.10 for both amd64 and i386 wh
G'day Peter,
On Sun, 05 Apr 2009 11:26:40 +0200
Peter Dalgaard wrote:
> Berwin A Turlach wrote:
> > G'day Dirk,
> >
> > On Sat, 4 Apr 2009 20:27:22 -0500
> > Dirk Eddelbuettel wrote:
> >
> >> On 4 April 2009 at 14:37, Ken-JP wrote:
> >>> Yes, I have x11-common installed, and dpkg -S /etc/X11/
Quoting "cladoo.26" :
> Hi,
>
> My questions concern the function 'mclustBIC' which compute BIC for a range
> of clusters of several models on the given data and the other function
> 'mclustModel' which choose the best model and the best number of cluster
> accordind to the results of the previous
Thanks a lot. That's what I was looking for. Must have missed the fg bit in
the ? par.
Cheers,
Umesh
On Sun, Apr 5, 2009 at 3:19 AM, Duncan Murdoch wrote:
> On 04/04/2009 5:13 PM, Umesh Srinivasan wrote:
>
>> Hi,
>>
>> Is there a way to use par to change the colours of the axes lines (not the
>
one way is the following:
dat. <- data.frame(V1 = min(dat$V1):max(dat$V1), V2 = 0)
newdat <- merge(dat, dat., by = "V1", all.y = TRUE, suffixes = c("", "."))
newdat$V2[na.ind] <- newdat$V2.[na.ind <- is.na(newdat$V2)]
newdat[-3]
I hope it helps.
Best,
Dimitris
Gundala Viswanath wrote:
Dear
Hi,
My questions concern the function 'mclustBIC' which compute BIC for a range of
clusters of several models on the given data and the other function
'mclustModel' which choose the best model and the best number of cluster
accordind to the results of the previous cited function.
1) When tryin
Dear all,
I have a data frame that looks like this:
> dat
V1 V2
1 -8 100
2 -6 20.2
3 -1 1.5
4 2 3.00
5 3 78.8
6 5 33.2
7 6 44.5
8 7 5.00
Now I want to fill the V1 column in series (note that it is gapped),
with the corresponding value
Here is a bit of an exploration of your data but first a couple of notes.
* the information about Excel is probably a bit superfluous here. Some of us
have no idea about Excel, and rather hope it can stay that way.
* With such a short series, you don't stand much chance of fitting a time
serie
67 matches
Mail list logo