Re: [R] Tempfile error

2005-07-07 Thread Doran, Harold
: 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

[R] Possible Solution to Tempfile error (for documentation)

2005-07-08 Thread Doran, Harold
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

Re: [R] testing for significance in random-effect factors using lmer

2005-07-12 Thread Doran, Harold
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

Re: [R] Error running lme.

2005-07-14 Thread Doran, Harold
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,

Re: [R] CPU Usage with R 2.1.0 in Windows

2005-07-19 Thread Doran, Harold
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

Re: [R] Non-linear linear models?

2005-07-25 Thread Doran, Harold
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-

[R] Error Downloading Matrix Package

2005-07-29 Thread Doran, Harold
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

Re: [R] Error Downloading Matrix Package

2005-07-29 Thread Doran, Harold
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

Re: [R] How to assess significance of random effect in lme4

2005-08-17 Thread Doran, Harold
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().

Re: [R] How to assess significance of random effect in lme4

2005-08-17 Thread Doran, Harold
, 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

Re: [R] How to assess significance of random effect in lme4

2005-08-18 Thread Doran, Harold
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

Re: [R] [SPAM] - Re: How to assess significance of random effect in lme4 - Bayesian Filter detected spam

2005-08-18 Thread Doran, Harold
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

Re: [R] clustering of disturbances

2005-08-23 Thread Doran, Harold
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

[R] Remove NAs from Barplot

2005-08-24 Thread Doran, Harold
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

Re: [R] Remove NAs from Barplot

2005-08-24 Thread Doran, Harold
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

[R] ylim for graphic

2005-08-29 Thread Doran, Harold
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

Re: [R] Testing if all elements are equal in a vector/matrix

2005-08-29 Thread Doran, Harold
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

Re: [R] extrating BLUP values from linear mixed models

2005-08-31 Thread Doran, Harold
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

[R] VarCorr function for assigning random effects: was Question

2005-09-01 Thread Doran, Harold
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

Re: [R] VarCorr function for assigning random effects: was Question

2005-09-01 Thread Doran, Harold
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

[R] Off-topic: Comparing standard errors from simulation and analytical model

2005-09-09 Thread 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

Re: [R] remedial stats education

2005-09-12 Thread Doran, Harold
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

Re: [R] Translating lme model call to lme4

2005-09-12 Thread Doran, Harold
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:

Re: [R] Possible bug in lmer nested analysis with factors

2005-09-16 Thread Doran, Harold
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

2005-09-16 Thread Doran, Harold
: 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

Re: [R] how to fix the level-1 variances in lme()?

2005-09-29 Thread Doran, Harold
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()?

Re: [R] standard error of variances and covariances of the random effects with LME

2005-09-29 Thread Doran, Harold
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,

Re: [R] Saving Graphics

2005-09-29 Thread Doran, Harold
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

Re: [R] Clear Console

2005-09-30 Thread Doran, Harold
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

Re: [R] R: source

2005-10-14 Thread Doran, Harold
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:

Re: [R] Progress in a loop

2006-07-19 Thread Doran, Harold
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

[R] Wrap a loop inside a function

2006-07-19 Thread Doran, Harold
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,

Re: [R] Wrap a loop inside a function

2006-07-19 Thread Doran, Harold
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

[R] Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function

2006-07-20 Thread Doran, Harold
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

Re: [R] Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function

2006-07-20 Thread Doran, Harold
, 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

Re: [R] nested repeated measures in R

2006-07-22 Thread Doran, Harold
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

Re: [R] Citations relevant to lmer methods

2006-07-25 Thread Doran, Harold
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,

Re: [R] how to fit with lme function

2006-07-25 Thread Doran, Harold
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

Re: [R] Question about data used to fit the mixed model

2006-07-30 Thread Doran, Harold
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

Re: [R] standardized random effects with ranef.lme()

2006-07-30 Thread Doran, Harold
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()

Re: [R] standardized random effects with ranef.lme()

2006-07-31 Thread Doran, Harold
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

Re: [R] standardized residuals (random effects) using nlme and ranef

2006-07-31 Thread Doran, Harold
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

Re: [R] fitting a model with the nlme package

2006-08-03 Thread Doran, Harold
(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

Re: [R] about MCMC pack again...

2006-08-11 Thread Doran, Harold
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

Re: [R] REML with random slopes and random intercepts giving strange results

2006-08-15 Thread Doran, Harold
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:

Re: [R] [SPAM] - RE: REML with random slopes and random intercepts giving strange results - Bayesian Filter detected spam

2006-08-16 Thread Doran, Harold
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

[R] read.csv issue

2006-08-16 Thread Doran, Harold
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

Re: [R] read.csv issue

2006-08-16 Thread Doran, Harold
[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

Re: [R] read.csv issue

2006-08-16 Thread Doran, Harold
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

Re: [R] Variance Components in R

2006-08-17 Thread Doran, Harold
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:

Re: [R] Variance Components in R

2006-08-17 Thread Doran, Harold
. 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

Re: [R] Variance Components in R

2006-08-17 Thread Doran, Harold
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

Re: [R] Random structure of nested design in lme

2006-08-23 Thread Doran, Harold
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

[R] Optim question

2006-08-24 Thread Doran, Harold
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

[R] Create a vector from another vector

2006-08-30 Thread Doran, Harold
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)

Re: [R] Create a vector from another vector

2006-08-30 Thread Doran, Harold
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,

Re: [R] rename cols

2006-09-11 Thread Doran, Harold
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

Re: [R] rename cols

2006-09-12 Thread Doran, Harold
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'

Re: [R] levels of factor when subsetting the factor

2006-09-12 Thread Doran, Harold
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

Re: [R] levels of factor when subsetting the factor

2006-09-12 Thread Doran, Harold
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;

[R] Exponentiate a matrix

2006-09-21 Thread Doran, Harold
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,

Re: [R] how to ignore NA or replace it by another value

2006-09-21 Thread Doran, Harold
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

Re: [R] Beginner question: select cases

2006-09-25 Thread Doran, Harold
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,

Re: [R] multilevel factor model in lmer

2006-10-02 Thread Doran, Harold
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-

Re: [R] line plot through NA

2006-10-02 Thread Doran, Harold
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

Re: [R] glm with nesting

2006-10-05 Thread Doran, Harold
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:

Re: [R] treatment effect at specific time point within mixedeffects model

2006-10-05 Thread Doran, Harold
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

Re: [R] how to get the variance-covariance matrix/information of alphaand beta after fitting a GLMs?

2006-10-12 Thread Doran, Harold
?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

Re: [R] import rda data in R

2006-10-12 Thread Doran, Harold
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

RE: [R] FIML in lme

2004-08-30 Thread Doran, Harold
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

[R] isoMDS

2004-09-08 Thread Doran, Harold
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

RE: [R] isoMDS

2004-09-08 Thread Doran, Harold
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

RE: [R] isoMDS

2004-09-09 Thread Doran, Harold
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

[R] Rslides.sty

2004-09-09 Thread Doran, Harold
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

RE: [R] repeated measures and covariance structures

2004-09-14 Thread Doran, Harold
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,

[R] Read.fwf

2004-09-15 Thread Doran, Harold
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

[R] Lme warning with coef()

2004-09-21 Thread Doran, Harold
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]]) :

[R] Sweave and xtable

2004-10-12 Thread Doran, Harold
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?

[R] Creating a text codebook

2004-09-30 Thread Doran, Harold
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]] __

[R] nlme vs gls

2004-10-08 Thread Doran, Harold
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

[R] Splitting and saving separate dataframes

2004-10-26 Thread Doran, Harold
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

RE: [R] no doubt a dumb question, but..

2004-11-09 Thread Doran, Harold
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]

[R] Impossible to run error message when using Sweave

2004-11-17 Thread Doran, Harold
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

[R] Modifications to an abline

2004-11-28 Thread Doran, Harold
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

[R] paste command

2004-11-28 Thread Doran, Harold
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

[R] RE: Adding a line in the graph of 'plot()'

2004-11-29 Thread Doran, Harold
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()'

[R] Labeling charts within a loop

2004-11-29 Thread Doran, Harold
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

RE: [R] using subset

2004-12-06 Thread Doran, Harold
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

RE: [R] similarity matrix conversion to dissimilarity

2004-12-08 Thread Doran, Harold
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

RE: [R] Factor analysis with dichotomous variables

2004-12-17 Thread Doran, Harold
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

[R] gls model and matrix operations

2004-12-28 Thread Doran, Harold
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

[R] gls model and matrix operations

2004-12-29 Thread Doran, Harold
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,

[R] Memory Efficient Methods for Building Matrix

2005-01-03 Thread Doran, Harold
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

[R] Generating Data mvrnorm and loops

2005-01-06 Thread Doran, 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

[R] lapply and gls

2005-01-07 Thread Doran, Harold
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

[R] Does R accumulate memory

2005-01-08 Thread Doran, Harold
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

RE: [R] Query: simple autocorrelation ina time series

2005-01-10 Thread Doran, Harold
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

[R] Data Simulation in R

2005-01-18 Thread Doran, Harold
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

[R] Referencing objects within a loop

2005-01-19 Thread Doran, Harold
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

[R] Constructing Matrices

2005-01-20 Thread Doran, Harold
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   2   3   >