zhongmiao wang zhongmiao at gmail.com writes:
I am studying the effect of schools on student achievement growth over
time. School effect is random. The effects of schools in prior years
are assumed to be persistent till the current year. Thus, the total
school effect in the second year is
zhongmiao wang zhongmiao at gmail.com writes:
I keep getting the error message Error in lme.formula(fixed = Score ~
factor(time) - 1, data = ldata, random = list(dumid = mat), :
iteration limit reached without convergence (9)
Is there a way to set up starting values, especially the
Dear R gurus,
I'd like to plot a distribution with the tickmarks always at the quantiles
of the y-axis, as opposed to the quantiles of the distribution I am
plotting. plot seems to place these ticks based on some calculations that I
cant see (?plot doesnt show the innards of plot).
Below is
Hi
On 22 Apr 2006 at 23:29, Bob Green wrote:
Date sent: Sat, 22 Apr 2006 23:29:02 +1000
To: r-help@stat.math.ethz.ch
From: Bob Green [EMAIL PROTECTED]
Subject:[R] Missing values detected when there are no missing
values
I am
On Sun, 23 Apr 2006 09:13:35 +0200, Erich Neuwirth wrote:
EN Is there code for bivariate kernel density estimation?
EN For bivariate kernels there is
EN kde2d in MASS
EN kde2d.g in GRASS
EN KernSur in GenKern
EN (list probably incomplete)
EN but none of them seems to accept a weight parameter
EN
What package are you using?
If you're using tseries, NA's are not allowed in the time series, so you
have to trim out your first missing with a command like:
x1 - na.remove(x)
made available by tseries itself. But I'm note sure is the first NA your
problem... You should provide reproducible
Dear R list,
I am a newbie to R and programming itself, so my question may be easy to
answer for you.
I wanted to create a scatterplot and i used the following code:
par(mar=c(10, 4.1,4.1,2.1))
plot(q$location,q$points, , las=2, cex.axis=0.5,xlab=, ylab= )
#location are character strings,
Hi,
it's not quite clear to me, what you are trying to accomplish with this. You
are referring to quantiles (you means quartiles in your case?,
see ?quantile ). So, are you trying to compare theoretical quantiles of a
distribution to the empirical quantiles? Or are you just trying to split the
Dear r-users,
suppose I have n normal distributions with parameter N(0,i) i=1,2,...,n
respectively.
Now I want to generate 500 random number for each distribution. And want to
put all 500*n random numbers
in a single data frame.
I tried with following code:
n=20
random = data.frame(n)
for
Hello, I want to arrange data from a table to perform a simple
regression. All the examples I saw deal with paired data, e.g. 'x' and
'y' have the same dimensions (e.g. 5 values for x and 5 for y).
But I have more than one 'y' for each 'x' value, e.g. the data file
has a x = 0, 30, 60, and 120
Try this ...
rDf - data.frame(sapply(1:20, rnorm, n=500, mean=0))
Rich.
S R Training Consulting
mangosolutions
Tel+44 1249 467 467
Fax +44 1249 467 468
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Arun Kumar Saha
Sent: 24 April 2006 10:15
as.data.frame(replicate(20, rnorm(500)))
Arun Kumar Saha a écrit :
Dear r-users,
suppose I have n normal distributions with parameter N(0,i) i=1,2,...,n
respectively.
Now I want to generate 500 random number for each distribution. And want to
put all 500*n random numbers
in a
Yu, Xuesong writes:
Does anyone know what the distribution for the product of two correlated
normal? Say I have X~N(a, \sigma1^2) and Y~N(b, \sigma2^2), and the
\rou(X,Y) is not equal to 0, I want to know the pdf or cdf of XY. Thanks
a lot in advance.
There is no closed-form expression
On Mon, 2006-04-24 at 14:45 +0530, Arun Kumar Saha wrote:
I tried with following code:
n=20
random = data.frame(n)
for ( i in 2: length)
{
random[,i] = random(500,mean=0,sd=i)
}
but while executing this I am getting errors.
Did you check what you'd done above, or is what
Hi
On 24 Apr 2006 at 10:40, Michael Graber wrote:
Date sent: Mon, 24 Apr 2006 10:40:42 +0200
From: Michael Graber [EMAIL PROTECTED]
To: R-Mailingliste r-help@stat.math.ethz.ch
Subject:[R] boxplots instead of a scatterplot
Dear
Hi
not sure what do you want to do but what about
y-colMeans(your.data)
x-c(0,30,60,120)
fit-lm(y~x)
Is this what you want?
Better to use advice suggested in posting guide and to show some
reproducible example.
HTH
Petr
On 24 Apr 2006 at 5:15, Tomás Revilla wrote:
Date sent:
Michael Graber wrote:
Dear R list,
I am a newbie to R and programming itself, so my question may be easy to
answer for you.
I wanted to create a scatterplot and i used the following code:
par(mar=c(10, 4.1,4.1,2.1))
plot(q$location,q$points, , las=2, cex.axis=0.5,xlab=, ylab= )
Here are a couple of possibilities using the builtin iris data set. Note
that although the coefficients come out the same, the degrees of
freedom, etc., would differ:
n - rep(1:3, 50)
lm(Petal.Length ~ Petal.Width, iris, weight = n)
Call:
lm(formula = Petal.Length ~ Petal.Width, data = iris,
Hello,
I'm trying to create a large matrix and it's extends the limit boundaries.
The matrix is 100,000x2874 and R is throwing me out, what shall i do?
Thanks
Erez
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Hi
more memory
new comp
new OS
think about possibility to reformulate the problem with help of
database and loading/processing data in chunks.
Couple of similar questions were answered not long ago so check
archives.
HTH
Petr
On 24 Apr 2006 at 13:06, Erez wrote:
Date sent:
Hi,
There is anyway to run R script on c++?
Erez
__
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
I find the reporting of aliased terms in class lm objects as little
inconsistent.
The best way to show this is to give an example.
X - mvrnorm(10,c(0,0),Sigma=matrix(c(1,0.5,0.5,1),nrow=2))
Xnew - as.data.frame(cbind(X,X[,2])) # make copy of X[,2]
names(Xnew) - c(y,X,Xcopy)
model -
I've rolled up R-2.3.0.tar.gz a short while ago. This version contains
several changes and additions, mostly incremental. See the full list
of changes below.
You can get it (in a short while) from
http://cran.r-project.org/src/base/R-2/R-2.3.0.tar.gz
or wait for it to be mirrored at a CRAN site
Have you try the KernSmooth package ?
- Message d'origine
De : Adrian Baddeley [EMAIL PROTECTED]
Ã⬠: r-help@stat.math.ethz.ch; [EMAIL PROTECTED]
Envoyé le : Lundi, 24 Avril 2006, 2h39mn 13s
Objetà : [R] bivariate weighted kernel density estimator
Erich Neuwirth writes:
Is
I am using the Deepayan's Sweave trick to set graphics parameters for all
graphs:
ltheme = canonical.theme(color=TRUE)
sup = trellis.par.get(superpose.line)
ltheme$superpose.line$col = c('black',red,blue,#e3,green,
gray)
Works perfectly, there is only a minor nuissance that
Thank you Frank for your prompt reply
You're definitely right, it seems that comparing rank concordance is a quite
inefficient way to test the predictive power of a covariable. Thus LR test
works better.
Stefano
On 4/21/06, Frank E Harrell Jr [EMAIL PROTECTED] wrote:
Stefano Mazzuco wrote:
Hi,
Has pnorm2 been dropped from sn ? Have some code using it which seems to
failt with a new sn update...
Thanks,
Tolga
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Hi everybody,
I want to use the cluster package (Cluster Analysis Extended Rousseeuw et
al.). I downloaded it from the CRAN and installed it on my linux system
(fedora core 4). All seemed to be allright.
But when trying to launch examples, I obtained the following message :
library(cluster)
Hi,
Is there a way to send an ESC command to the console from within a
script window, without using the mouse ?
Thanks,
Tolga
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
RSiteSearch(clear screen)
will locate Windows code to send a ctrl-L to the screen that you
can modify.
On 4/24/06, Tolga Uzuner [EMAIL PROTECTED] wrote:
Hi,
Is there a way to send an ESC command to the console from within a
script window, without using the mouse ?
Thanks,
Tolga
Gabor Grothendieck wrote:
RSiteSearch(clear screen)
will locate Windows code to send a ctrl-L to the screen that you
can modify.
On 4/24/06, Tolga Uzuner [EMAIL PROTECTED] wrote:
Hi,
Is there a way to send an ESC command to the console from within a
script window, without using the mouse ?
Dear list members,
I am facing a 3-level model, for which my research hypotheses suggest that
the variance of both level-1 and level-2 residuals may be a function of a
level-3 variable.
To be a bit more clear: I am fitting a longitudinal model for a panel of
companies grouped in industries. I
Hi,
I'm running a regression using lm(), in which one of the right-hand side
variables is factor with many levels (say, 80). I am not intersted in the
estimates of the resulting dummies, but I have to include them in my
regression equation. So, I don't want the estimates associated with theses
Is anybody using the Copula package in R? The particular problem I'm
facing is that R is not acknowledging the fitCopula command/function
when I load the package and (try to) run something very simple:
fit1 - fitCopula(x1 = list(u11,u12,u13,u14,u15,u16,u17,u18), tCopula,
optim.control =
Hi, there:
I am looking for a regression modeling (like regression trees) approach for
a large-scale industry dataset. Any suggestion on a package from R or from
other sources which has a decent accuracy and scalability? Any
recommendation from experience is highly appreciated.
Thanks,
Weiwei
Dimitri,
coef(summary(your model)) pulls out the matrix of coefs/SEs/etc.
You could subset that.
Peter Ehlers
Dimitri Szerman wrote:
Hi,
I'm running a regression using lm(), in which one of the right-hand side
variables is factor with many levels (say, 80). I am not intersted in the
Hi,
I have a dataset consisting of 350,000 rows and 266 columns. Out of 266
columns 250 are dummy variable columns. I am trying to read this data set into
R dataframe object but unable to do it due to memory size limitations (object
size created is too large to handle in R). Is there a
You can read chunks of it at a time and store it in sparse matrix
form using the packages SparseM or Matrix, but then you need
to think about what you want to do with it least squares sorts
of things are ok, but other options are somewhat limited...
url:www.econ.uiuc.edu/~roger
Hi..
i was using image.plot from the library fields along with layout
i had the follwoing commands:
layout(matrix(c(1,1,2,3,4,5),ncol=2,nrow=3,byrow=TRUE))
followed by 5 image plots.
i wanted image 1 on the top row followed by the 4 images on the next two rows.
it
Hi Roger,
I want to carry out regression analysis on this dataset. So I believe I can't
read the dataset in chunks. Any other solution?
TIA
Sachin
roger koenker [EMAIL PROTECTED] wrote:
You can read chunks of it at a time and store it in sparse matrix
form using the packages
You just need the much smaller cross product matrix X'X and vector X'Y so you
can build those up as you read the data in in chunks.
On 4/24/06, Sachin J [EMAIL PROTECTED] wrote:
Hi,
I have a dataset consisting of 350,000 rows and 266 columns. Out of 266
columns 250 are dummy variable
What is the error message that you get?
-roger
Casey Quinn wrote:
Is anybody using the Copula package in R? The particular problem I'm
facing is that R is not acknowledging the fitCopula command/function
when I load the package and (try to) run something very simple:
fit1 - fitCopula(x1
Where is the excess size being identified? Is it the read? or in the lm().
If it is in the reading of the data, then why are you reading the dummy
variables?
Would it make sense to read a single column of a factor instead of 80 columns
of dummy variables?
Hi Richard:
Even if I dont read the dummy var columns, i.e. just read the original
dataset with 350,000 rows and 16 columns, when I try to run the regression -
using
lm(y ~ c1 + factor(c2) + factor(c3) ) ; where c2, c3 are dummy variables,
The procedure fails saying not enough
Gabor:
Can you elaborate more.
Thanx
Sachin
Gabor Grothendieck [EMAIL PROTECTED] wrote:
You just need the much smaller cross product matrix X'X and vector X'Y so you
can build those up as you read the data in in chunks.
On 4/24/06, Sachin J wrote:
Hi,
I have a dataset
Dear r list,
I posted this on the S list last week since i'm using some of the
FinMetrics functions on copula. Knowing there is a copula package in R,
I figure this would be an appropriate forum to ask this question.
I want to model inverse relationship between two (non-normal,
non-symmetric)
Instead of reading the entire data in at once, you read a chunk at a time,
and compute X'X and X'y on that chunk, and accumulate (i.e., add) them.
There are examples in S Programming, taken from independent replies by the
two authors to a post on S-news, if I remember correctly.
Andy
From:
On Mon, 24 Apr 2006, Tolga Uzuner wrote:
Hi,
Is there a way to send an ESC command to the console from within a
script window, without using the mouse ?
What OS is this? If Windows, ESC interrupts a running command, and is not
itself a command: rather it generates a software interrupt.
I
Der useRs,
I'm working on meta analysis using rmeta package. Using code below I
plot the forest plot:
library(rmeta)
data (catheter)
a-meta.MH (n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name,
subset=c(13,6,5,3,7,12,4,11,1,8,10,2))
summary(a) # odds ratio values and confidence
I have what I'm sure will turn out to be straightforward. I want to
store the results of a loop for some operations from a patterned vector.
For example, the following doesn't give what I would hope for
ss - c(2,3,9)
results - numeric(length(ss))
for (i in seq(along=ss)){
results[i] - i + 1
On Mon, 24 Apr 2006, Andrej Kastrin wrote:
Der useRs,
I'm working on meta analysis using rmeta package. Using code below I
plot the forest plot:
library(rmeta)
data (catheter)
a-meta.MH (n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name,
subset=c(13,6,5,3,7,12,4,11,1,8,10,2))
On Mon, 24 Apr 2006, Doran, Harold wrote:
I have what I'm sure will turn out to be straightforward. I want to
store the results of a loop for some operations from a patterned vector.
For example, the following doesn't give what I would hope for
ss - c(2,3,9)
results - numeric(length(ss))
It is not very clear how you want to index your results vector.
If ss contains the indices of the results vector that you are trying to
change, this implies that you have a vector of length 9. In this case
results - numeric(max(ss))
results[ss] - ss + 1
will do the trick.
Or in case that ss
On Mon, 2006-04-24 at 16:31 -0400, Doran, Harold wrote:
I have what I'm sure will turn out to be straightforward. I want to
store the results of a loop for some operations from a patterned vector.
For example, the following doesn't give what I would hope for
ss - c(2,3,9)
results -
Dear Roger,
thanks for the suggestion.
That is the solution, just modifying kde2d.
I did it slightly differently.
Since I have up to 20 points,
diag(Z) from your code becomes too large.
But since t(matrix(dnorm(ay),n,nx)) only needs to be
multiplied with the weights rowwise and
* applied to
Hi Andy:
I searched through R-archive to find out how to handle large data set using
readLines and other related R functions. I couldn't find any single post which
elaborates the process. Can you provide me with an example or any pointers to
the postings elaborating the process.
Hello ...
I was working with some older code today that started throwing errors I'd
never seen before. The source appears to be some sort of substition of
the text of the code on install time, I was hoping that someone might be
able to point me to what I'm doing wrong.
If I take the following
Here is an example that works:
mycop - tCopula(param=0.5, dim=8, dispstr=ex, df=5)
x - rcopula(mycop, 1000)
myfit - fitCopula(x, mycop, c(0.6, 10), optim.control=list(trace=1),
method=Nelder-Mead)
myfit
The ML estimation is based on 1000 observations.
Estimate Std. Error z value
Hello,
How do you change the language of the labels in a graph. In this example, I
want to get French labels by changing Sys.putenv. I should get Mai
instead of May.
Sys.putenv(LANGUAGE=fr)
x - as.Date(c(1jan1960, 2jan1960, 31mar1960, 30jul1960), %d%b%Y)
y -1:4
plot(x,y)
Regards,
Pierre
Here's a skeletal example. Embellish as needed:
p - 5
n - 300
set.seed(1)
dat - cbind(rnorm(n), matrix(runif(n * p), n, p))
write.table(dat, file=c:/temp/big.txt, row=FALSE, col=FALSE)
xtx - matrix(0, p + 1, p + 1)
xty - numeric(p + 1)
f - file(c:/temp/big.txt, open=r)
for (i in 1:3) {
x
Dear R People:
Are your undergraduate students receptive to learning R, as a rule?
Most of the time, mine really like it. But this semester, they act as
though they are being eaten by rats when learning R. They are not
trying at all.
Any similar experiences? If anyone has any good ideas, I
Speaking of standard errors, when correcting for heteroscedasticity,
how many matches do you use (this is the Var.cal option). It seems to
me that it might make sense to use the same number of matches as
above, but that's just a guess...
These are related but separate issues. The
Dear R People:
On the Edit menu, there is a GUI preference tab.
On the Font option, the highest value is 18.
Has anyone ever had the font size set larger than that will any
success, please?
Thanks,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of
Dear Erin,
I wrote the Rcmdr package because my undergrad intro stats students are much
more comfortable with point-and-click interfaces. You're in a computer and
math department, however, while I'm in sociology -- I would have thought
that your students wouldn't have trouble with command-driven
Dear Erin,
This is, I guess, under Windows. You can set the point size to a larger
value by editing the Rconsole file in R's \etc directory.
I hope this helps,
John
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
It wasn't R but I've had a similar experience where a class came together
to cause an uncharacteristic reaction to material which had been welcomed
by previous classes (and also by later ones.)
I'd say just put it down to a statistical fluctuation.
Clint
Clint Bowman
Erin,
I was able to set it larger by making the change manually in the
Rconsole file.
For details of Rgui (Windows) configuration, try
?Rconsole
from the prompt.
MHP
Erin Hodgess wrote on 4/24/2006 6:44 PM:
Dear R People:
On the Edit menu, there is a GUI preference tab.
On the Font
I just installed JGR version 1.3 and I am having a problem. When I try
to load the library RQuantLib I get an error message. The same program
runs perfectly well when I just run rgui.exe. I have pasted the screen
below. The version of R I am using is 2.2.1.
Thanks for any help.
FS
On 4/24/2006 6:44 PM, Erin Hodgess wrote:
Dear R People:
On the Edit menu, there is a GUI preference tab.
On the Font option, the highest value is 18.
Has anyone ever had the font size set larger than that will any
success, please?
This actually looks like a bug in the low level code
This works for me on my Windows XP system:
Sys.putenv(LANGUAGE=FR); Sys.setlocale(LC_ALL,FR)
On 4/24/06, Lapointe, Pierre [EMAIL PROTECTED] wrote:
Hello,
How do you change the language of the labels in a graph. In this example, I
want to get French labels by changing Sys.putenv. I should
This semester for the first time I have been using the combination
of R, R Commander (John Fox's package providing a menu-driven
interface to R), and RExcel (Erich Neuwirth's package for interfacing
R with Excel). The audience is the introductory Statistics class for Business
undergradutes. The
Is it valid to assign a slice of an array or vector to an overlapping
slice of the same object? R seems to do the right thing but I can't
find anything where it promises to.
a - 1:12
a[4:12] - a[1:9]
a
[1] 1 2 3 1 2 3 4 5 6 7 8 9
b - 1:12
b[1:9] - b[4:12]
b
[1] 4 5 6 7 8
Hi,
I am trying to change a SAS macro to R.
here is my code. I get an error at the last line.
attach(fram)
dset1-cbind(AGE,BMI,DEATH)
BMIGRP-cut(BMI,breaks=3,right=TRUE)
AGEGRP-floor(AGE/10)-2
dset-cbind(AGEGRP,BMIGRP,DEATH)
maxage-max(dset[,1])
minage-min(dset[,1])
The other thing you could try after doing this is to sample
some rows from your data and see if the subset gives
nearly the same answer as the entire data set.
On 4/24/06, Liaw, Andy [EMAIL PROTECTED] wrote:
Here's a skeletal example. Embellish as needed:
p - 5
n - 300
set.seed(1)
dat -
The lines
#maxcls-dset[,2]
#mincls-dset[,2]
which you have shown commented out select a full column.
You probably want the min and max of that column.
With your definitions, mincls:maxlcs has the same type of behavior as
(1:3):(1:3)
__
75 matches
Mail list logo