[R] Scatterplot with row.names

2007-04-13 Thread Brian Perron
Hello R users: I am still new to R and have a question that I hope is pretty simple to solve with some additional help. The following code provides some sample data for a scatterplot I am trying to create. As you can see, I am plotting the values using the row names. x.sample - rnorm(10, 50,

[R] generating clustered data

2006-07-11 Thread Brian Perron
Hello R folks, Does anybody have code to share for generating (via simulation) clustered data? The type of data I am looking to simulate would allow fitting of a multilevel model with random intercepts. I looked at the mvtnorm package but am not quite sure how to create clusters. (Can this

[R] lme4 - higher level

2006-06-28 Thread Brian Perron
Hello all, I just started working with the lme4 package to estimate a multilevel logistic regression and am planning to use this package for a cross-classification / multiple-membership model. I haven't found many worked examples and am trying to figure out how to add variables to the

[R] max / pmax

2006-05-30 Thread Brian Perron
Hello R users, I am relatively new to R and cannot seem to crack a coding problem. I am working with substance abuse data, and I have a variable called primary.drug which is considered the drug of choice for each subject. I have just a few missing values on that variable. Instead of using

[R] mice library / survival analysis

2006-02-28 Thread Brian Perron
Hello folks, I am a relatively new user of R and created multiply imputed data sets with the 'mice' library. This library provides two functions for complete-data analysis on multiply imputed data set objects (lm.mids and glm.mids). I am trying to estimate a series of Cox PH regression

[R] Merging data

2006-02-22 Thread Brian Perron
Hello all, I am fairly new to R and am trying to bring together data from multiple sources. Here is one problem that I cannot seem to crack – I hope somebody can help. Let me simplify the problem: Let’s say I have two datasets: DATA1 and DATA2. I would like to work with all the cases in

[R] ICC for Binary data

2006-01-18 Thread Brian Perron
Hello R users: I am fairly new to R and am trying to figure out how to compute an intraclass correlation (ICC) and/or design effect for binary data? More specifically, I am trying to determine the amount of clustering in a data set - that is, whether certain treatment programs tend to

[R] Package for multiple membership model?

2006-01-03 Thread Brian Perron
Hello all: I am interested in computing what the multilevel modeling literature calls a multiple membership model. More specifically, I am working with a data set involving clients and providers. The clients are the lower-level units who are nested within providers (higher-level).