: Thursday, July 07, 2005 4:52 AM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Tempfile error
Doran, Harold wrote:
Dear List:
I am encountering an error that I can't resolve. I'm looping through
rows of a dataframe to generate individual tex files using Sweave. At
random
Dear List:
I'm posting this to provide a possible solution and to document to what
appears to be an R limitation. The solution is more of a cheap hack that
works for now. To provide a little background, I am looping through a
dataframe and creating Sweave documents using data from each row in the
The default output in lmer also includes goodness of fit statistics which can
be used for this assessment. The anova() command invokes the likelihood ratio
test and can be used to compare models (under certain conditions).
The bVar slot in the lmer fitted model contains the posterior variance
John
Your model is not properly specified for lme. You have not included any
random effects or a grouping variable. Let me assume just for sake of
argument that you want to include a random effect for the intercept and
for time. Your lme specification would be
fm1 - lme(Velocity~time,
Dear Michael:
Why is it a problem that R is not using more CPU space than it seems to
need?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Greene, Michael
Sent: Tuesday, July 19, 2005 2:29 PM
To: '[EMAIL PROTECTED]'
Subject: [R] CPU Usage with R 2.1.0
Paul:
Even when the model includes polynomial terms as you have below, it is
still a linear model because it is linear in the parameters. It is your
coefficients that are not linear. There are other functions in R for
non-linear models.
help.search('non linear')
-Original Message-
I'm trying to update my Matrix package given the update last night. But
the following error is generated. I've tried restarting R and deleting
my old Matrix package. Can anyone suggest how this might be resolved?
install.packages('Matrix')
trying URL
After restarting Windows Matrix was properly updated. Not quite sure
where the error was, but it is certainly local.
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Friday, July 29, 2005 11:58 AM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch; [EMAIL PROTECTED
You can extract the posterior variance of the random effect from the bVar slot
of the fitted lmer model. It is not a hidden option, but a part of the fitted
model. It just doesn't show up when you use summary().
Look at the structure of your object to see what is available using str().
, Doran, Harold [EMAIL PROTECTED] wrote:
You can extract the posterior variance of the random effect from the
bVar slot of the fitted lmer model. It is not a hidden option, but a
part of the fitted model. It just doesn't show up when you use
summary().
Look at the structure of your
this question, but the values in the bVar slot do.
-Original Message-
From: Spencer Graves [mailto:[EMAIL PROTECTED]
Sent: Wed 8/17/2005 10:08 PM
To: Doran, Harold
Cc: Shige Song; r-help@stat.math.ethz.ch
Subject:Re: [R] How to assess significance of random effect in lme4
could clarify your question.
-Original Message-
From: Spencer Graves [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 18, 2005 8:26 AM
To: Doran, Harold
Cc: Shige Song; r-help@stat.math.ethz.ch
Subject: [SPAM] - Re: [R] How to assess significance of random effect in
lme4 - Bayesian Filter
GLS could work. There are a host of corClass functions for spatial and
serial correlations in this package. Or you could specify firm as a
grouping factor and use lmer() found in the Matrix package.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tobias
Dear List:
I'm creating a series of barplots using Sweave that must assume a
standard format. This is student achievement data and the x-axis must
include all grades 3 to 8. In some cases, the data for a grade (or more
than one grade) are missing in the vector math.bar, but are never
missing for
Thanks, Marc. It works. My apologies for not making the code
reproducible.
-Original Message-
From: Marc Schwartz (via MN) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 24, 2005 1:29 PM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Remove NAs from Barplot
On Wed
Dear list:
I have some data for which I am generating a series of barplots for
percentages. One issue that I am dealing with is that I am trying to get
the legend to print in a fixed location for each chart generated by the
data. Because these charts are being created in a loop, with different
See ?identical
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Goulet
Sent: Monday, August 29, 2005 3:35 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Testing if all elements are equal in a vector/matrix
Is there a canonical way to check if all
Use the ranef() command
ranef(fm1, level=1)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Robinson
Sent: Wednesday, August 31, 2005 12:26 PM
To: r-help@stat.math.ethz.ch
Subject: [R] extrating BLUP values from linear mixed models
Hello,
I wish
If you are indeed using lme and not lmer then the needed function is
VarCorr(). However, 2 recommendations. First, this is a busy list and
better emails subject headers get better attention. Second, I would
recommend using lmer as it is much faster. However, VarCorr seems to be
incompatible with
You are correct, VarCorr IS compatible with lmer. It must be what you state
below. I should have saved the message but VarCorr() complained that I was not
dealing with an lme() object. I had multiple packages (nlme, Matrix, mlmRev,
among others) in the search path.
On 9/1/05, Doran, Harold
Dear list:
I'm hoping to tap in to the statistical expertise in the group,
especially those familiar with simulation techniques. I'm finalizing a
study where I obtain standard errors from two sources. The first source
is a monte carlo simulation and the other source is an analytical model
I have
There is a Springer publication All of Statistics: a concise course in
statistical inference by Larry Wasserman that might be what you are
looking for. The book also has an emphasis on R and his web site has
code and data sets for analysis of the examples used throughout.
-Harold
-Original
Only the random portion will differ as in:
lmer(lognrms ~ Group*Rotation*muscle*side*support*arms + (1|Subject) +
(1|Stratum) + (1|rep), Data)
-Original Message-
From: [EMAIL PROTECTED] on behalf of Ross Darnell
Sent: Mon 9/12/2005 9:28 PM
To: r-help@stat.math.ethz.ch
Cc:
I think you might have confused lme code with lmer code. Why do you have
c/d in the random portion?
I think what you want is
lmer(a ~ b + (1 | c)+(1|d))
Which gives the following using your data
Linear mixed-effects model fit by REML
Formula: a ~ b + (1 | c) + (1 | d)
AIC BIC
: Re: [R] Possible bug in lmer nested analysis with factors
On 16 Sep 2005, at 17:12, Doran, Harold wrote:
I think you might have confused lme code with lmer code. Why do you
have c/d in the random portion?
Apologies. I obviously have done something of the sort. I assumed that
the 'random
Mike
I do not believe this is availabe in either lme or lmer in R, only S-Plus.
-Original Message-
From: [EMAIL PROTECTED] on behalf of Mike Cheung
Sent: Thu 9/29/2005 4:32 AM
To: r-help@stat.math.ethz.ch
Cc:
Subject:[R] how to fix the level-1 variances in lme()?
You cannot. Also, it's not that the distribution of the random effects
is not symmetric, but that it *may* not be symmetric, and this is an
assumption that should be checked.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Roel de Jong
Sent: Thursday,
See ?pdf or ?postscript
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Jones
Sent: Thursday, September 29, 2005 3:22 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Saving Graphics
Hello all,
I'm having difficulty automatically saving graphs.
Is
Ctrl L
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Leonardo L Miceli
Sent: Friday, September 30, 2005 8:36 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Clear Console
Hi,
What is the function to clear the console?
tks
[[alternative HTML
Use file.choose() instead
source(file.choose())
This will open a dialogue box and might be easier for you to find your
file.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Clark Allan
Sent: Friday, October 14, 2005 7:06 AM
To:
Look for progress() in the svMisc package
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Florent Bresson
Sent: Wednesday, July 19, 2006 10:13 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Progress in a loop
Hi, I have to use a loop to perform a
I need to wrap a loop inside a function and am having a small bit of
difficulty getting the results I need. Below is a replicable example.
# define functions
pcm - function(theta,d,score){
exp(rowSums(outer(theta,d[1:score],'-')))/
apply(exp(apply(outer(theta,d, '-'), 1, cumsum)), 2,
Very true, the resounding echo was large.
Thanks, Doug.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Douglas Bates
Sent: Wednesday, July 19, 2006 4:20 PM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Wrap a loop inside
List:
Thank you for the replies to my post yesterday. Gabor and Phil also gave
useful replies on how to improve the function by relying on mapply
rather than the explicit for loop. In general, I try and use the family
of apply functions rather than the looping constructs such as for, while
etc as
, 2006 8:56 AM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch; Phil Spector
Subject: Re: Timing benefits of mapply() vs. for loop was:
[R] Wrap a loop inside a function
Note that if you use mapply in the way I suggested, which is
not the same as in your post, then its just as fast. (Also
You can read the manual, read the FAQs, search the help functions and the
archives.
-Original Message-
From: [EMAIL PROTECTED] on behalf of Eric C Merten
Sent: Fri 7/21/2006 8:51 PM
To: r-help@stat.math.ethz.ch
Subject: [R] nested repeated measures in R
R help,
How would I input
I just sent this to you in a personal response, but for purposes of
archives, the following is one reference:
@book{mccu:sear:2002,
author ={Charles E. McCulloch and Shayle Searle},
year={2002},
title ={Generalized, Linear,
Nantachai
It seems as though you have created the model matrices from the matrix
representation of the model. This is unecessary as lme will construct those for
you from your data frame.
The first thing I recommend you do is use lmer instead of lme. Second, you
should look in the vignette in
You can have one observation per subject with multiple subjects nested in a
group. If you only have 1 observation per group, then there is no multilevel
structure to your data.
For example, 30 students in a classroom or 20 employees in an office division
are appropriate data structures. On the
Why do the results differ although the estimates (random
effects and
thus their variances) are almost identical? I noticed that
lme() does
not compute the standard errors of the variances of the
random effects
- for several reasons, but if this is true, how does
ranef()
that
the standardized random effects are divided by the corresponding SE.
Maybe he can clarify if he has time.
I hope that helps
Harold
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold
Sent: Sunday, July 30, 2006 3:40 PM
To: Spencer Graves
To sum up, I can't figure out how MLWin calculates the
standardized residuals. But I understand that this is not a
question for the R list.
Nevertheless, it would help if someone could point me to some
arguments why not to use them and stick to the results
obtainable by ranef().
Hi
(out - lmer(p ~ f - 1 + (1|h/t) + (1|j), set))
Doug:
It seems the nesting syntax is handled a bit differently. Is (1|h/t)
equivalent to the old lme nesting syntax?
__
R-help@stat.math.ethz.ch mailing list
Let's maybe back up a bit on this. You said you are interested in
learning about the application of the Gibbs sampler for IRT models. I
don't think opening the C++ code would be the best approach for this.
Let me recommend the following article
Patz, R. J., and Junker, B. W. (1999). A
I don't this is because you are using REML. The BLUPs from a mixed model
experience some shrinkage whereas the OLS estimates would not.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simon Pickett
Sent: Tuesday, August 15, 2006 11:34 AM
To:
Can you provide the summary(m2) results?
-Original Message-
From: Simon Pickett [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 16, 2006 7:14 AM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch
Subject: [SPAM] - RE: [R] REML with random slopes and random
intercepts giving strange
I'm trying to read in some data from a .csv format and have come across
the following issue. Here is a simple example for replication
# A sample .csv format
schid,sch_name
331-802-7081,School One
464-551-7357,School Two
388-517-7627,School Three \ Four
388-517-4394,School Five
Note the third
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 16, 2006 3:10 PM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] read.csv issue
Try 'gsub'
y
schidsch_name
1 331-802-7081
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] read.csv issue
On Wed, 16 Aug 2006, Prof Brian Ripley wrote:
Set allowEscapes = FALSE when reading. See the help page
for more details.
There is perhaps an argument for changing the default for
allowEscapes
under read.csv
Iuri:
The lmer function is optimal for large data with crossed random effects.
How large are your data?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Iuri Gavronski
Sent: Thursday, August 17, 2006 11:08 AM
To: Spencer Graves
Cc:
. This will give you many
examples.
vignette('MlmSoftRev')
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Iuri Gavronski
Sent: Thursday, August 17, 2006 11:16 AM
To: Doran, Harold
Subject: Re: [R] Variance Components
PROTECTED] On Behalf Of Iuri
Gavronski
Sent: Thursday, August 17, 2006 1:26 PM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Variance Components in R
I am trying to replicate Finn and Kayandé (1997) study on G-theory
Why are the results not reliable?
From: ESCHEN Rene [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 23, 2006 3:48 AM
To: Spencer Graves; r-help@stat.math.ethz.ch
Cc: Doran, Harold
Subject: RE: [R] Random structure
This is a very basic question, but I am a bit confused with optim. I
want to get the MLEs using optim which could replace the newton-raphson
code I have below which also gives the MLEs. The function takes as input
a vector x denoting whether a respondent answered an item correctly
(x=1) or not
Dear list
Suppose I have the following vector:
x - c(3,4,2,5,6)
Obviously, this sums to 20. Now, I want to have a second vector, call it
x2, that sums to x where 5 = x = 20, but there are constraints.
1) The new vector must be same length as x
2) No element of the new vector can be 0
3)
Hi Duncan
Here is a bit more detail, this is a bit tough to explain, sorry for not
being clear. Ordering is not important because the vector I am creating
is used as a sufficient statistic in an optimization routine to get some
MLEs. So, any combination of the vector that sums to X is OK. But,
names(data) - c('Apple', 'Orange')
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ethan Johnsons
Sent: Monday, September 11, 2006 12:49 PM
To: r-help@stat.math.ethz.ch
Subject: [R] rename cols
A quick question please!
How do you rename
I don't know, this seems pretty simple and intuitive (to me)
# Create a sample data set with 439 variables
tmp - data.frame(matrix(c(rnorm(4390)), ncol=439))
colnames(tmp)-paste(col, 1:439, sep = )
# rename a certain variable in that dataset
names(tmp)[(which(names(tmp)=='col1'))]-'NewName'
Just add the following to your code
new.fact = fact[1:6, drop=T]
new.fact
[1] A A A B B B
Levels: A B
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Afshartous, David
Sent: Tuesday, September 12, 2006 11:23 AM
To: r-help@stat.math.ethz.ch
Also, it is probably easier to use gl() than coerce your data into a
factor
fact - gl(3, 3, label = c(A, B, C))
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Liaw, Andy
Sent: Tuesday, September 12, 2006 11:32 AM
To: Afshartous, David;
Suppose I have a square matrix P
P - matrix(c(.3,.7, .7, .3), ncol=2)
I know that
P * P
Returns the element by element product, whereas
P%*%P
Returns the matrix product.
Now, P^2 also returns the element by element product. But, is there a
slick way to write
P %*% P %*% P
Obviously,
It depends a bit on what function you are using. For example,
set.seed(1)
xx - c(NA, rnorm(10))
mean(xx)
[1] NA
mean(xx, na.rm=TRUE)
[1] 0.1322028
Is how you would use this to compute a mean.
Harold
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Peter,
There is a much easier way to do this. First, you should consider
organizing your data as follows:
set.seed(1) # for replication only
# Here is a sample dataframe
tmp - data.frame(city = gl(3,10, label = c(London, Rome,Vienna
)), q1 = rnorm(30))
# Compute the means
with(tmp,
Dan:
lmer cannot currently be used for the 2PL. As you note, it is straightforward
to estimate the 1PL, but the a-parameters present a current challenge. Doug
mentioned to me the other day he is doing some work on this, so I have copied
him on this reply.
Harold
-Original Message-
Do you mean something like this:
plot(approx(Day,V), type='l')
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, October 02, 2006 10:32 AM
To: r-help@stat.math.ethz.ch
Subject: [R] line plot through NA
Dear
It's not really possible to help without knowing what errors you received and
maybe some reproducible code. I think I remember this, though. From what I
recall, there was no distinction between box and chick, so you cannot estimate
both variance components.
-Original Message-
From:
Hi David:
In looking at your original post it is a bit difficult to ascertain
exactly what your null hypothesis was. That is, you want to assess
whether there is a treatment effect at time 3, but compared to what. I
think your second post clears this up. You should refer to pages 224-
225 of
?vcov
From: [EMAIL PROTECTED] on behalf of zhijie zhang
Sent: Thu 10/12/2006 9:56 AM
To: R-help@stat.math.ethz.ch
Subject: [R] how to get the variance-covariance matrix/information of alphaand
beta after fitting a GLMs?
Dear friends,
After fitting a
Because rda files are R objects. Use load, not read.table
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rita Gottloiber
Sent: Thursday, October 12, 2006 10:36 AM
To: r-help@stat.math.ethz.ch; r-help@stat.math.ethz.ch
Subject: [R] import rda data
I'm not sure you are correct on this. Other texts on multilevel models
(e.g., Raudenbush and Bryk, Kreft and Deeuw, and Singer Willett) all
use FiML as a synonym for ML. In fact, Kreft and Deleeuw go as far to
even state they are the same thing (see page 131).
When you run a model in HLM
Dear List:
I have a question regarding an MDS procedure that I am accustomed to
using. I have searched around the archives a bit and the help doc and
still need a little assistance. The package isoMDS is what I need to
perform the non-metric scaling, but I am working with similarity
matrices, not
PROTECTED]
Sent: Wednesday, September 08, 2004 9:58 AM
To: Doran, Harold
Cc: [EMAIL PROTECTED]
Subject: Re: [R] isoMDS
On Wed, 8 Sep 2004, Doran, Harold wrote:
1)Can isoMDS work only with dissimilarities? Or, is there a way
that it can perform the analysis on the similarity matrix as I have
Message-
From: Jari Oksanen [mailto:[EMAIL PROTECTED]
Sent: Thu 9/9/2004 4:26 AM
To: Doran, Harold
Cc: Prof Brian Ripley; R-News
Subject: RE: [R] isoMDS
On Wed, 2004-09-08 at 21:31, Doran, Harold wrote:
Thank you. Quick
I recently came across Rslides.sty during a web search and was not aware
of it. However, I can't seem to get it to actually work (I use miktex
and the texniccenter distribution for Windows).
Does anyone have a sample tex file with this style to share? Second, I
looked around the R web site to
Yes. Try something akin to
fm1- lme(y~time, data, random=~time|ID)
fm2-update(fm1, correlation=corAR1(form~time|ID)
You can then use anova(fm1,fm2) to compare.
Harold
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris Solomon
Sent: Tuesday,
Dear List
I have a fixed width file with variables of varying width. The help is
pretty transparent for this feature, but I can't seem to figure out how
I can make effective use of the package with my data.
In my dataset, the first 80 columns are of width 1 followed by other
variables with width
Hello
I routinely use the following without a problem:
fm1-lme(score~time,data,random=~time|ID)
tmp-coef(fm1, augFrame=T)
However, in my current situation, I am running into the following error
when I execute the coef() call
Error in tapply(as.character(object[[nm]]), groups, FUN[[dClass]]) :
Dear List:
I have some coded embedded within a LaTeX document where I subset a
dataframe and use xtable to place it in my appendix. However, one of the
tables is rather large and seems to extend beyond the page length.
Is there a nice way to use Sweave to continue this table onto the next
page?
Is there a currently existing method in an R package for creating a
codebook from a dataframe? Preferably, I would like to be able to export
to a text file all relevant information.
Thanks,
Harold
[[alternative HTML version deleted]]
__
Dear List:
My question is more statistical than R oriented (although it originates
from my work with nlme). I know statistical questions are occasionally
posted, so I hope my question is relevant to the list as I cannot turn
up a solution anywhere else. I will frame it in the context of an R
Dear List:
I have a large dataframe that I need to break down into many smaller
dataframes. Specifically, I have student achievement test scores for all
students across grades 3 through 12. My goal is to create an individual
dataframe for each grade. Rather than subsetting multiple times, the
It would work if you modified as follows:
plot(lm(Girth~Height))
Or alternatively,
fm1-lm(Girth~Height);plot(fm1)
Harold
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dr. John R. Vokey
Sent: Monday, November 08, 2004 10:56 PM
To: [EMAIL PROTECTED]
Dear List:
I have a large dataset of multiple schools. My goal is to produce a
separate tex file for each school that plots some of the student
achievement scores. Essentially, the aim is to develop a custom report
for each school. To accomplish this, I have code for a loop that gets
sourced into
Dear List:
I am working to generate graphs for individual students that will be created
through a series of loops in Sweave. Before doing so, I am still trying to
design the graph. The code for creating the barplot is below with some sample
datapoints just made up for now.
Ultimately, this
In a previous post, I mentioned a loop being used to generate graphs. I have
some sample code partially put together but have found one offending line of
code that I cannot figure out what to do with.
I have one data frame called grade4. If I do something like
hist(grade4$math)
I get the
Yes. See ?abline or ?lines
-Original Message-
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Sun 11/28/2004 8:35 PM
To: [EMAIL PROTECTED]
Cc:
Subject: [R]: Adding a line in the graph of 'plot()'
Hi All:
This may turn out to be very simply, but I can't seem to add the name of
the school to a chart. The loop I created is below that subsets a
dataframe and creates a chart for each school based on certain
variables. As it stands now, they title includes the school's ID number.
Instead, I
Antonio:
If the variable you are subsetting is a factor with multiple levels (and
it appears you have 15), then the levels of the factor remain and will
show up in summary, but your data set will only include the rows of data
that you want. I am pretty sure subset has worked properly in your
Dear Sir:
I posed a similar question a few months back and received many
responses. Check the searchable archives at R Cran for those helpful
email. I did a search for 'similarity matrix' and many results were
returned.
Harold
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
You can use factanal to do the analysis. The polychor() package will
give you polychorics. You can then the do the factor analysis on this
correlation matrix.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Denson
Sent: Friday, December 17, 2004
Dear List:
I am estimating a gls model and am having to make some rather unconventional
modifications to handle a particular problem I have identified. My aim is to
fit a GLS with an AR1 structure, obtain the variance-covariance matrix (V),
modify it as needed given my research problem, and
Dear List:
(This is a re-post as my original message was sent over 24 hours ao and has not
posted)
I am estimating a gls model and am having to make some rather unconventional
modifications to handle a particular problem I have identified. My aim is to
fit a GLS with an AR1 structure,
Dear List:
I am having to build a block-diagonal matrix (vl) and am currently using
the following code.
I-diag(sample.size)
vl-kronecker(I,vl.mat)
This code works fine, but for large N, it is a huge memory hog. Is there
a more efficient method for constructing vl?
Thanks,
Harold
Dear List:
I am generating N datasets using the following
Sigma-matrix(c(400,80,80,80,80,400,80,80,80,80,400,80,80,80,80,400),4,4
)
mu-c(100,150,200,250)
N=100
for(i in 1:N)
{
assign(paste(Data., i, sep=''),
as.data.frame(cbind(seq(1:1000),(mvrnorm(n=1000, mu, Sigma)
}
With these
Thanks to the help I have received from Uwe and Dimitris I have been
able to simulate the data as a list rather than separate objects and
structure in the long format. For the most part, all of my code is
working properly. There is one issue that I can't resolve.
When I do the following all seems
Dear List:
I am running into a memory issue that I haven't noticed before. I am
running a simulation with all of the code used below. I have increased
my memory to 712mb and have a total of 1 gb on my machine.
What appears to be happening is I run a simulation where I create 1,000
datasets with
You need mvrnorm() to do this.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Crabb, David
Sent: Monday, January 10, 2005 1:04 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Query: simple autocorrelation ina time series
I hope you can help with what
Dear List:
A few weeks ago I posted some questions regarding data simulation and
received some very helpful comments, thank you. I have modified my code
accordingly and have made some progress.
However, I now am facing a new challenge along similar lines. I am
attempting to simulate 250
Dear List:
It appears that simulating data where all dataframes are stored as a
list will only work for relatively small analyses. Instead, it appears
that creating N individual dataframes, saving them, and loading them
when needed is the best way to save memory and make this a feasible
task.
As
Dear List:
I am working to construct a matrix of a particular form. For the most
part, developing the matrix is simple and is built as follows:
vl.mat-matrix(c(0,0,0,0,0,64,0,0,0,0,64,0,0,0,0,64),nc=4)
Now to expand this matrix to be block-diagonal, I do the following:
sample.size - 100 #
1 - 100 of 289 matches
Mail list logo