Hello,
I had a couple questions about manova modeling in R.
I have calculated a manova model, and generated a summary.manova output
using both the Wilks test and Pillai test.
The output is essentially the same, except that the Wilks lambda = 1 -
Pillai. Is this normal? (The output from both is
On Thu, 22 Feb 2007, Petr Klasterecky wrote:
Ranjan Maitra napsal(a):
On Sun, 18 Feb 2007 07:46:56 + (GMT) Prof Brian Ripley [EMAIL
PROTECTED] wrote:
On Sat, 17 Feb 2007, Ranjan Maitra wrote:
Dear list,
I have a 4-dimensional array Y of dimension 330 x 67 x 35 x 51. I have a
design
YIHSU CHEN yihsu.chen at ucmerced.edu writes:
Dear R users;
Is there a function in R that I can put text with proper alignments in
a fixed format. For instance, if I have three fields: A, B and C, where
both A and C are text with 3 characters and left alignment; B is a
numeric one with
I downloaded the tar.gz file from r-project website (and saved it in a local
directory) and wish to use the package in R.
But I am not sure how to use the install.packages command. I tried a few
times and still couldn't figure out the correct way to install this package.
[[alternative
Greetings to the list,
I was trying to estimate spatial error model in R, somehow I got the
message below. Would you please help me with it? Many thanks in
advance.
Error in solve.default(asyvar, tol = tol.solve) :
system is computationally singular: reciprocal condition number =
Hello Joe
On 21 Feb 2007, at 16:22, Lucke, Joseph F wrote:
Does anyone have code for the 3F2 hypergeometric function? I am
looking
for code similar to the 2F1 hypergeometric function implemented as
hyperg_2F1 in the GSL package. TIA. ---Joe
The GSL library does not have a hyperg_3F2,
Is there any way to make xyplot draw the y label to the right of the graph
instead of to the left? Any help appreciated.
Regards,
M.Sc. Ola Caster
Uppsala University, Sweden
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch
The easiest is perhaps to do
install.packages(packagename)
this downloads the package and installs it into the default R package
library on your machine. If you want to install it to a different
directory use the 'lib' argument of 'install.packages'.
If you don't want to download the package
On Thu, 22 Feb 2007, Aalim Weljie wrote:
Hello,
I had a couple questions about manova modeling in R.
I have calculated a manova model, and generated a summary.manova output
using both the Wilks test and Pillai test.
The output is essentially the same, except that the Wilks lambda = 1 -
Hi R,
Here's my question about accessing the class of an object.
I have an object dat which can take any two of the classes, (dates
times) or (chron dates times). Note that the classes have two
elements within it. I want to read these classes in such a way that
v=class(dat) # let
Hallo,
The command:
x - 3
mat - as.matrix(expand.grid(rep(list(0:1), x)))
generates a matrix with 2^x columns containing the binary representations
of the decimals from 0 to (2^x-1), here from 0 to 7. But the rows are not
sorted in this order.
How can sort the rows the ascending order of the
I'm sure there are more elegant ways, but this should work:
ix-order(mat[,1],mat[,2],mat[,3])
ix
[1] 1 5 3 7 2 6 4 8
mat[ix,]
Var1 Var2 Var3
1000
5001
3010
7011
2100
6101
4110
8111
On 22/02/07,
--- Marc Schwartz [EMAIL PROTECTED] wrote:
I might suggest an alternative, since you seem to be
creating the
underlying data set from scratch.
Thanks Marc. I see what you're suggesting but I am
not creating the data from scratch. The data base
represented by cc is an SPSS file that I have
On Thu, 22 Feb 2007, Dong GUO wrote:
Greetings to the list,
I was trying to estimate spatial error model in R, somehow I got the
message below. Would you please help me with it? Many thanks in
advance.
Error in solve.default(asyvar, tol = tol.solve) :
system is computationally
I am currently using the function daisy in package cluster to create a
dissimilarity matrix because my multivariate dataset contain missing
data and variables of various types including factors, symmetric and
asymmetric binary and quantitative. This is a step prior to using pco
within ecodist.
On 21 Feb 2007, Russell Senior wrote:
I am interested in making a random sample from a uniform distribution
of points over the surface of the earth, using the WGS84 ellipsoid as
a model for the earth. I know how to do this for a sphere, but would
like to do better. I can supply random
I'm investigating a number of dependent variables using mixed models, e.g.
data.lmer45 = lmer(ampStopB ~ (type + stress + MorD)^3 + (1|speaker) +
(1|word), data=data)
The p-values for some of the 2-way and 3-way interactions are significant
at a 0.05 level and I have been trying to find out
Hi all,
I have some problems to compute the residuals from a glm model with
binomial distribution.
Suppose I have the following result :
resfit-glm(y~x1+x2,weights=we,family=binomial(link=logit))
Now I would like to obtain the residuals .
the command residuals(resfit) and the vector
Hello Serguei,
Is this what you need?
myfunc - function(x) {
create - function(idx) {
rep.int(c(rep.int(0,2^(idx-1)), rep.int(1,2^(idx-1))),
2^x/2^idx)
}
sapply(rev(seq(x)), create)
}
myfunc(3)
[,1] [,2] [,3]
[1,]000
[2,]00
You really need to look at ?glm and ?residuals.glm.
resfit$residuals are the *working* residuals, which are not typically
very useful in themselves. Far better to use the extractor function.
This enables you to obtain a number of different types of residuals,
but the default (and therefore the
On Thu, 22 Feb 2007, Martin Olivier wrote:
I have some problems to compute the residuals from a glm model with
binomial distribution.
Suppose I have the following result :
resfit-glm(y~x1+x2,weights=we,family=binomial(link=logit))
Now I would like to obtain the residuals . the command
Hello, fellow R-users.
Let me describe the setup first. I have a data.frame, a sample of
which is reported below:
Company.Name Periods Returns MFR.Factor
350 Wartsila Oyj A 1996-07-31 6.82 0.02
351Custodia Holding AG 1996-07-31 4.15
David Barron wrote:
You really need to look at ?glm and ?residuals.glm.
resfit$residuals are the *working* residuals, which are not typically
very useful in themselves. Far better to use the extractor function.
This enables you to obtain a number of different types of residuals,
but the
And, for multiple bases:
myfunc - function(cols, bases) {
create - function(idx) {
rep.int(c(sapply(seq_len(bases)-1, function(x)
rep.int(x, bases^(idx-1, bases^cols/bases^idx)
}
sapply(rev(seq_len(cols)), create)
}
# For 3 columns in base 2
myfunc(3,
?by
On 2/22/07, Sergey Goriatchev [EMAIL PROTECTED] wrote:
Hello, fellow R-users.
Let me describe the setup first. I have a data.frame, a sample of
which is reported below:
Company.Name Periods Returns MFR.Factor
350 Wartsila Oyj A 1996-07-31 6.82
I am trying to run the following function (a hierarchical bayes linear
model) and receive the error in solve.default. The function was
originally written for an older version of SPlus. Can anyone give me some
insights into where the problem is?
Thanks
R 2.4.1 on MAC OSX 2mb ram
Mark Grant
one approach is the following:
dat - data.frame(
Period = as.Date(rep(c(1996-07-31, 1996-08-31, 1996-09-30),
each = 15)),
Returns = rnorm(45),
MFR.Factor = runif(45)
)
###
do.call(rbind, lapply(split(dat[c(Returns, MFR.Factor)],
dat$Period),
function (x) {
cr -
On 22-Feb-07 Roger Bivand wrote:
On 21 Feb 2007, Russell Senior wrote:
I am interested in making a random sample from a uniform distribution
of points over the surface of the earth, using the WGS84 ellipsoid as
a model for the earth. I know how to do this for a sphere, but would
like to
Hi,
Windows Vista includes additional security mechanisms (User Access Control)
whose defaults make it difficult to install or update R packages.
To avoid these problems you need to go to Computer- Program Files
Right click on the R directory and select properties. Now select the
security tab.
Or you can right-click on the R icon and choose Run as administrator. That
way you won't alter the security settings and forget to re-set them. After
the packages are installed R will load in the usual way by clicking on the
icon.
Charles Annis, P.E.
[EMAIL PROTECTED]
phone: 561-352-9699
eFax:
I think the short answer is not much.
Longer answer: In an interpreted framework with double precision
floating point scalars there is little chance of avoiding fresh
allocations for each scalar; given that, the overhead associated with
length checks can be made negligible. (That isn't to say it
Hello R-ologists,
Imagine you have a list list like so:
list
[[1]]
[1] IPI00776145.1 IPI00776187.1
[[2]]
[1] Something IPI00807764.1 IPI00807887.1
[[3]]
[1] IPI00807764.1
[[4]]
[1] Somethingelse
What I need to achieve is a filtered list list2 like so:
list2
[[1]]
[1] IPI00776145.1
[[2]]
hello -
a question about filled.contour plots, for which i haven't found a
response in previous posts - sorry if already treated.
i'd like to draw several filled.contour plots (that is, maps) on the same
device (a postscript file, actually). I know about layout(matrix) ,
split.screen or
Hi All,
I was doing clustering on some genes, and wanted to verify the clustering
results using another website.
Essentially, I upload two files (in Step 1 Step 3) at this website:
http://db.yeastgenome.org/cgi-bin/GO/goTermFinder
The website then outputs a graph, which I save.
Are there
Hello R-Users,
The following questions are not R-technical, but more of general statistical
nature.
1. NORMALITY
I built a normal linear regression model and now I want to check for the
residual normality assumption. If I check the distribution graphically and
look at the descriptive
I have the following relatively simple problem. Say we have three
factors, and we want to create a cross-tabulation against each of the
other two:
x - factor(rbinom(5, 1, 1/2))
y - factor(rbinom(5, 1, 1/2))
z - factor(rbinom(5, 1, 1/2))
table(x,y)
table(x,z)
This looks like:
y
x 0 1
hi,
I have two private packages, the first (`pkc') depending on the second one
(`roiutils'). The source code and DESCRIPTION files describes the dependency
as it should be ('Imports', `require'), at least I think so.
now, running
R CMD CHECK pkc
yields the following output in which I have
Using R version 2.4.1 (2006-12-18) on Windows, I have a dataset which resembles
this:
idatt1att2att3
1110
2100
3011
4111
ratings - data.frame(id = c(1,2,3,4), att1 = c(1,1,0,1), att2 = c(1,0,0,1),
att3
try this:
lis. - lapply(lis, function(x) if (length(ind - grep(^IPI, x)))
x[ind[1]] else NULL)
lis.[!sapply(lis., is.null)]
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address:
On Thu, 2007-02-22 at 15:33 +0100, Johannes Graumann wrote:
Hello R-ologists,
[snip]
So:
- if sublist-entry 1 start with ^IPI make it the list-entry.
- otherwise chose the first ^IPI sublist-entry present.
- delete the list-entry if not ^IPI sublist-entry present.
One way to do it would
Dear List,
Thankyou to Jim and Marc for their help on my previous question.
I have a data frame of five columns, the first being a list of dates and the
other four columns are numeric values. I wanted to list the days where all 4
columns of values are less than in the previous row. I used the
Does anyone know the basic commands to debug in s plus. I know how to debug
in r, but I'm having trouble finding similar tools. Mostly what I want to
know is what is the equivalent of the debug() command, and what do I use to
move to the next line, and get the values of different variables.
Thanks for your help!
Joh
Dimitris Rizopoulos wrote:
try this:
lis. - lapply(lis, function(x) if (length(ind - grep(^IPI, x)))
x[ind[1]] else NULL)
lis.[!sapply(lis., is.null)]
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
maybe cbind() is close to what you're looking for, e.g.,
tb1 - table(x, y)
tb2 - table(x, z)
cbind(tb1, tb2)
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel:
Hi Dimitris,
On Feb 22, 2007, at 10:27 AM, Dimitris Rizopoulos wrote:
maybe cbind() is close to what you're looking for, e.g.,
tb1 - table(x, y)
tb2 - table(x, z)
cbind(tb1, tb2)
Yes, that was my first thought too, and it does place the values
where I want them, but it completely
On Fri, 23 Feb 2007, Alfonso Sammassimo wrote:
Dear List,
Thankyou to Jim and Marc for their help on my previous question.
I have a data frame of five columns, the first being a list of dates and the
other four columns are numeric values. I wanted to list the days where all 4
columns of
Try this:
tab - crossprod(as.matrix(ratings[,-1]))
tab - tab - diag(diag(tab))
tab
tab / nrow(ratings)
On 2/22/07, Michael Wexler [EMAIL PROTECTED] wrote:
Using R version 2.4.1 (2006-12-18) on Windows, I have a dataset which
resembles this:
idatt1att2att3
111
I'm curious to know if it's possible to easily generate a grid (lattice)
and obtain the adjacency matrix. For example, I would like to display a
3x3 (or 10x10) lattice then then generate the 10 x 10 adjacency matrix
matrix( 1:9, 3,3, byrow=TRUE )
[,1] [,2] [,3]
[1,]123
[2,]4
Le Jeudi 22 Février 2007 05:37, Shubha Vishwanath Karanth a écrit :
Hi R,
Here's my question about accessing the class of an object.
I have an object dat which can take any two of the classes, (dates
times) or (chron dates times). Note that the classes have two
elements within it. I want to
I suspect that your data is non-normal. You might try the diagnostics in
the nortest package and refer to the text Thode (2002), Testing for
Normality, Marcel Decker, quoted in the references to that package. A QQ
diagram might help to reveal the problems with your data.
John Frain
On
The problem is that filled.contour uses the layout function internally which
messes up any other use of layout, split.screen, or mfrow. One alternative is
to use the levelplot function from the lattice package, or you could use
filled.contour to make several full page plots to a pdf file, then
On Thu, 22 Feb 2007, Serguei Kaniovski wrote:
Hallo,
The command:
x - 3
mat - as.matrix(expand.grid(rep(list(0:1), x)))
generates a matrix with 2^x columns containing the binary representations
of the decimals from 0 to (2^x-1), here from 0 to 7. But the rows are not
sorted in this
Hello,
I am trying to debug in S+. I know how to debug in r, but the commands in S+
seem to be different. I am just looking for a command that allows me to
debug the function, and then commands that allow me to step through and find
the values of different variables.
Thanks!
-cjkogan111
--
View
Hi,
I used the sweave package to get a 3D plot
echo=F,fig=F=
wireframe(volcano, shade = TRUE,
aspect = c(61/87, 0.4),
light.source = c(10,0,10))
@
but it gives an error message for the pdf file of this picture.
Any one could help ?
Thanks in advance,
Matthieu
res - crossprod( as.matrix( ratings[ , -1] ) )
diag(res) -
print(res, quote=F)
att1 att2 att3
att1 21
att2 2 2
att3 12
res2 - crossprod(as.matrix( ratings[ , -1])) * 100 / nrow( ratings )
res2[] - paste( res2, %, sep= )
diag(res2) -
print(res2, quote=F)
Matthieu Cornec wrote:
Hi,
I used the sweave package to get a 3D plot
echo=F,fig=F=
wireframe(volcano, shade = TRUE,
aspect = c(61/87, 0.4),
light.source = c(10,0,10))
@
but it gives an error message for the pdf file of this picture.
Any one could help ?
Can anyone tell me how to get R to include a double quote in the middle
of a character string?
For example, the following code is close:
fnd-Open fnd 'test'
cat(fnd)
Open fnd 'test'
But instead of Open fnd 'test' I need: Open fnd test. Difference
seems minor, but I
cat('Open fnd test\n')
Open fnd test
cat(Open fnd \test\\n)
Open fnd test
Bos, Roger wrote:
Can anyone tell me how to get R to include a double quote in the middle
of a character string?
For example, the following code is close:
fnd-Open fnd 'test'
cat(fnd)
Open fnd
try
cat(Open fnd \test\)
which is the same as for C.
HTH.
Ranjan
On Thu, 22 Feb 2007 14:09:26 -0500 Bos, Roger [EMAIL PROTECTED] wrote:
Can anyone tell me how to get R to include a double quote in the middle
of a character string?
For example, the following code is close:
On Thu, 22 Feb 2007 08:17:38 + (GMT) Prof Brian Ripley [EMAIL PROTECTED]
wrote:
On Thu, 22 Feb 2007, Petr Klasterecky wrote:
Ranjan Maitra napsal(a):
On Sun, 18 Feb 2007 07:46:56 + (GMT) Prof Brian Ripley [EMAIL
PROTECTED] wrote:
On Sat, 17 Feb 2007, Ranjan Maitra wrote:
On Thu, 22 Feb 2007, Bos, Roger wrote:
Can anyone tell me how to get R to include a double quote in the middle
of a character string?
FAQ 7.37 Why does backslash behave strangely inside strings?
For example, the following code is close:
fnd-Open fnd 'test'
cat(fnd)
Open
Hi there,
How can I know the explaned variance of a PC axis generated by prcomp()?
Kind regards,
miltinho
Brazil
__
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing
Milton Cezar Ribeiro wrote:
Hi there,
How can I know the explaned variance of a PC axis generated by prcomp()?
From the standard deviations of each component, you could do something
like this maybe:
prcomp(USArrests, scale = TRUE)$sdev^2 / ncol(USArrests)
[1] 0.62006039 0.24744129
I tried a few times and still couldn't figure out the correct way
to install this package.
Help us to help you, Gallon. Which error comes out?
install.packages(packagename)
this downloads the package and installs it into the default R package
library on your machine.
Of course, on a normal
Here is a question from an old guy:
I want to use the boxplot function as follows:
boxplot( p.prop ~ R + bins )
This command makes nice boxplot for the factor R crossed with the factor
bins.
I am having alot of trouble getting control of the labels on the X axis. I want
to control it
Hi,
I try to make a model using lmer, but the weigths is not accept.
m1-lmer(ocup/total~tempo+(tempo|estacao),family=binomial,weights=total)
Erro em lmer(ocup/total ~ tempo + (tempo | estacao), family = binomial, :
object `weights' of incorrect type
I dont understand why this error,
Hi,
anybody have a JGR launcher for linux? Maybe a script that launch JGR directly
without open R then library(JGR) and JGR().
Thanks
Ronaldo
--
Deflector shields just came on, Captain.
--
Prof. Ronaldo Reis Júnior
| .''`. UNIMONTES/Depto. Biologia Geral/Lab. Ecologia Evolutiva
| : :' :
Hi,
I'm having trouble with the confidence interval of the nls function.
I did my home work, and searched acros the support list until I came up with
following solution of Peter Dalgaard:
example(predict.nls)
se.fit - sqrt(apply(attr(predict(fm,list(Time =
I was looking at the systemfit package and it seems like I could use it
to solve OLS systems (
which is essentially what VARs are ) but the lag length would have to be
known beforehand, I think. Does anyone know
if there is an equivalent of the VAR function in Eric Zivot's
S+Finmetrics package
Isn't it right in front of you? I get:
JGR()
Starting JGR ...
(You can use /usr/local/lib64/R/library/JGR/cont/run to start JGR directly)
^^^
Andy
From: Ronaldo Reis Junior
Hi,
anybody have a JGR launcher for linux? Maybe a script that
On Feb 22, 2007, at 2:56 PM, Smith, Phil ((CDC/CCID/NCIRD)) wrote:
boxplot( p.prop ~ R + bins )
This command makes nice boxplot for the factor R crossed with the
factor bins.
I am having alot of trouble getting control of the labels on the X
axis. I want to control it more by
I have a semantics question, I am reading Bowerman and O'Connell and they
state that forecasting models fall into two categories, univariate and
causal. My question is whether a time series regression model that relates
the time series of interest to functions of time such as the day of the week
Hi,
try this:
$sudo R CMD INSTALL downloaded.package.tar.gz
If you don't use 'sudo' (or do not have privileges to do so), you need
to either become root (with su) or ask the administrator of the
machine you are using to install the package for you
regards,
Roberto
On 2/22/07, Gabor Csardi
Hi Everyone,
I am doing hierarchical clustering analysis and have a
question regarding cutree.
I am doing things like this:
hc - hclust(dist(X))
a - cutree(hc, k=2)
Basically a is a vector containing the assignments
of 1 or 2 for each sample. May I know how cutree
decides to assign 1 and 2's
Hello Rachel,
I don't think that there is any infrastructure for these procedures on
lmer objects, yet. If you are willing to use lme instead, then the
multcomp package seems to provide post-hoc tests. It is worth noting
that there is some doubt as to the validity of the reference
distributions
Hi Ronaldo,
I suggest that you send us a small, well-documented, code example that
we can reproduce. It certainly looks as though there is a problem,
but given this information it's hard to know what it is!
Cheers
Andrew
On Thu, Feb 22, 2007 at 06:22:03PM -0200, Ronaldo Reis Junior wrote:
?interaction.plot
Should help you. This works on the data, not the model. A 3-way interaction
just means that the 2-way interaction differs among the various levels of
the 3rd factor. Clever use of trellis plots (?xyplot -- especially
?panel.linejoin -- gives greater flexibility, but it requires
?pchisq
On 2/21/07, Mohsen Jafarikia [EMAIL PROTECTED] wrote:
Hello all,
I am doing a Likelihood Ratio (LR) test in my simulation and I have a vector
LR values (each with 1 degree of freedom) at the end of my simulation.
Can anybody tell me how I can write a 'R' code which gives me the
Three weeks later, I have almost completely solved my problem (quoted below;
about within-subjects manova, and discriminant function analysis to
compliment a manova analysis). So for anyone who was secretly hoping someone
would respond to me:
* manova does not handle within-subjects variables in
Hello everyone,
I am using the following program to get the p-value of some numbers
(column 'LR' of the data.dat file). I want to write the 1st and 2nd
column of the output file (data.out) as an integer while the program
change them to double. Could anybody please tell me how I can write
the code
Hi,
I have a problem of estimating a mixture of two normal distributions. I
need to find the starting points automatically, since this is a part of a
larger piece of image processing code.
I found the mix2normal1 function in VGAM package that mentions a method of
finding starting values for mu1
Hi,
Try MCLUST package. You can use the hierarchical clustering to find the
starting values of your EM.
Xiaohui
[EMAIL PROTECTED] wrote:
Hi,
I have a problem of estimating a mixture of two normal distributions. I
need to find the starting points automatically, since this is a part of a
Good day everyone,
Can anyone suggest an effective method to solve
the following problem:
I have 2 dataframes D1 and D2 as follows:
D1:
dates ws wc pwc
2005-10-19:12:00 10.8 80 81
2005-10-20:12:00 12.3 5 15
2005-10-21:15:00 12.3 3 15
2005-10-22:15:00 11.3 13 95
Try: D1[setdiff(D1$dates,D2$dates) , ]
Xiaohui
[EMAIL PROTECTED] wrote:
Good day everyone,
Can anyone suggest an effective method to solve
the following problem:
I have 2 dataframes D1 and D2 as follows:
D1:
dates ws wc pwc
2005-10-19:12:00 10.8 80 81
Augusto
cnd - D1$dates %in% D2$dates
D1[!cnd,]
should do it.
Med venlig hilsen / Regards
Frede Aakmann Tøgersen
Forsker / Scientist
AARHUS UNIVERSITET / UNIVERSITY OF AARHUS
Det Jordbrugsvidenskabelige Fakultet / Faculty of Agricultural Sciences
Forskningscenter
85 matches
Mail list logo