Hi,
The continues variables can be handled easy via factanal function.
?factanal
Binary or ordinal variables can be handled via ltm package, which
implements item response theory.
?ltm
Hope this helps.
Aldi
On 5/11/2013 8:06 PM, Klot Lee wrote:
hi,
when I am doing factor analysis, there is
hi,
when I am doing factor analysis, there is continous and Non continuous
variables(classified variables). Does "psych" package handle this? Is
there any difference between continous variables and non ones or mixed ones
when doing factor analysis? If there is, which packages should I use then?
M
Hi,
May be this helps:
plot(dataset1~Date,data=mydata[!is.na(mydata$dataset1),],ylim=range(5.7,8),pch=10,cex=0.8,col="black",xlab="Date",ylab="pH")
with(mydata[!is.na(mydata$dataset2),],points(Date,dataset2,col="blue",pch=2,cex=0.8))
with(mydata[!is.na(mydata$dataset3),],points(Date,dataset3,co
Hello Everyone,
I have some data that like most real world data isn't complete. I'm trying
to plot all of it together with lines connecting the data points. Because
I have breaks in the data I have breaks in the lines.
Is there a way that the lines will connect all the markers??? Below is
the
You may also try:
library(ggplot2)
p<-ggplot(dat2New,aes(x=combin,y=value))+geom_boxplot()+facet_wrap(~V3,scales="free_x",ncol=2)
p+stat_summary(fun.y=mean,shape=2,col="red",geom="point")
A.K.
- Original Message -
From: maggy yan
To: R-help@r-project.org
Cc:
Sent: Saturday, May 11, 2013
Hi,
If the means are based on the combination.
means<-tapply( Daten$weight, list(Daten$Dosis,Daten$sex), mean)
library(reshape2)
points(melt(means)$value,pch=5,col="red",lwd=5)
A.K.
- Original Message -
From: maggy yan
To: R-help@r-project.org
Cc:
Sent: Saturday, May 11, 2013 8:57 P
I tried to draw a point on all boxplots for their means, I did:
boxplot( Daten$weight~interaction(Daten$Dosis,Daten$sex, drop=TRUE))
means<-tapply( Daten$weight, Daten$Dosis, mean)
points(means, pch=5, col="red", lwd=5)
but only the boxplots for male got that point on them, its really weird
becau
(Private)
On Sat, May 11, 2013 at 3:24 PM, Tom Roche wrote:
>
> Tom Roche Wed, 08 May 2013 20:38:12 -0400
>>> I have two spatial grids defined the same way (i.e., same number of
>>> rows and columns--and dimensions, both 2D). Wherever both
>
>>> * the value of an element i,j in the first grid is
https://stat.ethz.ch/pipermail/r-help/2013-May/353343.html
>> Is there a function 'foo' such that, given an array and a value,
>> iff the value is present in the array, it returns the index(s) of
>> the value? E.g.,
>> > matrix(1:9, nrow=3) -> grid
>> > grid
>> [,1] [,2] [,3]
>> [1,]1
On 12.05.2013 00:35, Tom Roche wrote:
Is there a function 'foo' such that, given an array and a value, iff
the value is present in the array, it returns the index(s) of the
value? E.g.,
matrix(1:9, nrow=3) -> grid
grid
[,1] [,2] [,3]
[1,]147
[2,]258
[3,]3
Hello,
To that effect, just use the argument arr.ind of ?which:
which(grid == median(grid), arr.ind = TRUE)
Note that it defaults to FALSE.
Hope this helps,
Rui Barradas
Em 11-05-2013 23:35, Tom Roche escreveu:
Is there a function 'foo' such that, given an array and a value, iff
the value
Is there a function 'foo' such that, given an array and a value, iff
the value is present in the array, it returns the index(s) of the
value? E.g.,
> matrix(1:9, nrow=3) -> grid
> grid
[,1] [,2] [,3]
[1,]147
[2,]258
[3,]369
> foo(grid, median(grid))
[1] c(
Tom Roche Wed, 08 May 2013 20:38:12 -0400
>> I have two spatial grids defined the same way (i.e., same number of
>> rows and columns--and dimensions, both 2D). Wherever both
>> * the value of an element i,j in the first grid is NA
>> * the value of element i,j in the second grid is !NA
>> I want
hi all -- i don't know if this is a bug or not, thought i would survey the
crowd before trying to submit a report...
if i specify a cut height for a dendrogram that is higher than the full
dendrogram itself, my expectation is that the $upper value would be NULL or
NA, and the $lower value would be
On Sat, 11 May 2013, ivo welch wrote:
coeftest with sandwich is indeed powerful and probably faster. I see
one drawback: it requires at least three more packages: lmtest,
sandwich, and in turn zoo, which do not come with standard R.
But they should be easy enough to install...
I also wonder
Hi David,
Yes.
Both are similar in speed.
set.seed(48)
system.time({fourPGCs <- replicate(400, { permutation<-sample(mydata4)
PGC <- (rowMeans(permutation[ ,1:27]) -
rowMeans( permutation[ ,28:38]))/
(rowSds( permutation [,1:27]) + rowSds( permutation [,28:38
coeftest with sandwich is indeed powerful and probably faster. I see
one drawback: it requires at least three more packages: lmtest,
sandwich, and in turn zoo, which do not come with standard R. I also
wonder whether I committed a bug in my own code, or whether there is
another parameter I need t
On May 11, 2013, at 9:21 AM, arun wrote:
> Hi,
> May be this helps:
>
> set.seed(24)
> mydata4<- as.data.frame(matrix(sample(1:100,10*38,replace=TRUE),ncol=38))
> dim(mydata4)
> #[1] 10 38
> library(matrixStats)
> res<-do.call(cbind,lapply(1:400, function(i) {permutation<-sample(mydata4);
I am using maxLik pacakge to estimate parameters of kumaraswamy distribution.
But i dont knw how use initial starting values, it gives errors in response,
is there any criteria of using initial starting values???
--
View this message in context:
http://r.789695.n4.nabble.com/MaxLik-pacakge-tp4
Dear list-members,
A specific set of parameter values produces NaN when using pmnorm (library
mnormt). I was wondering whether has do to that either extremely small or
big values are computed.
Here is a reproducible code:
###
library(mnormt)
Leta = matrix(c(6.9077758,0.7253306),2,1)
Lo
You can't mix number and character data in a data frame column, so you will
probably find that all your variables are factors, not numbers. Try, for example
class(Daten$V2)
It looks like you failed to specify 'header=TRUE' in a read.table statement.
Reread the data with headers properly treated
It will not work because the presence of the first row means that all
the variables are read in as factors, not numeric. You must convert
numeric variables to numeric **after** eliminating the first row, or
read the data in using read.table(..., head=TRUE). See ?read.table for
details.
**After** t
Hi,
Try this:
dat1<- read.table(text="
V1 V2 V3
1 Dosis Gewicht Geschlecht
2 0 6.62 m
3 0 6.65 m
4 0 5.78 m
5 0 5.63 m
6 1 6.78 m
7 1 6.45 m
8 1 5.68 m
9 1
Hi,
May be this helps:
set.seed(24)
mydata4<- as.data.frame(matrix(sample(1:100,10*38,replace=TRUE),ncol=38))
dim(mydata4)
#[1] 10 38
library(matrixStats)
res<-do.call(cbind,lapply(1:400, function(i) {permutation<-sample(mydata4);
(rowMeans(permutation[,1:27])-rowMeans(permutation[,28:38]))/
my dataset looked like this in the beginning:
>Daten
V1 V2 V3
1 Dosis Gewicht Geschlecht
2 06.62 m
3 06.65 m
4 05.78 m
5 05.63 m
I need box plots for V2 with all combination of V1 and V3, so I deleted the
On 10.05.2013 08:19, Sachinthaka Abeywardana wrote:
Hi all,
Would be great if you could help me get my head around the "further
arguemnts" in the optim function. Let's say we have f and g as shown:
f<-function(x,a,b){(x-a)^2+b}
optim(100,fn=f,gr=NULL,2,5) #the NULL is annoying
g<-function(x
The pairs2 function in the TeachingDemos package does what you describe.
You give it 2 matricies instead of just one and it creates the plots.
On Wed, May 8, 2013 at 10:49 AM, Adel wrote:
> Dear list-members,
>
> I wonder if there is a way of creating a scatter plot table/grid with
> different
For those that may have this question in the future, here are two solutions:
As suggested from David and Sarah,
One has to remove par function from defining screen splits, instead use
layout function.
For example:
layout(matrix(c(1,1,2,3),2,2,byrow=T))
which says, split the screen in 4 blocks,
Dear all,
I am running R-3.0 on Slackware64 Linux (Linux marto 2.6.38.4 #1 SMP Thu Apr 21
20:48:11 CDT 2011 x86_64 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz GenuineIntel
GNU/Linux)
Here is a minimal example:
library(parallel);
fun <- function(fileName) { file.create(fileName); Sys.sleep(time=1
Dear List
I would like to ask for some input on the following (here is a simplified
version of the code):
t <-t(seq(0,120,by=120/48))
d <-500
k <-0.1
x <-matrix((d/20)*exp(-k*0.9*t))
y <-matrix((d/15)*exp(-k*0.7*t))
z<-matrix((d/22)*exp(-k*1.1*t))
w<-matrix((d/17)*exp(-k*0.2*t))
t <-matrix(seq(0
Dear all,
I have a sample with 920 observations. I want to create a loop which takes
300 of these observations for the prediction and the rest to estimate the
model.
My idea was to create something like this:
cs.training.dat <- read.table...
cs.training.dat_sub1 <- subset(cs.training.dat,
On May 11, 2013, at 06:10 , meng wrote:
> Hi all:
>
> I have a question about one-way anova.
>
> The data is ¡°sleep¡±which belongs to R.
>
>
>
> code1:
>
> summary(lm(extra~group))
>
>
>
> Estimate of group2(1.58) is the difference between mean of group1 and
> group2,and t value(1.861)
I have no idea what you should do. That is why you should always "reply all" to
messages on the list, so others can chime in.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics:
33 matches
Mail list logo