similar to: Multivariate Multilevel Model: is R the right software for this problem

Displaying 20 results from an estimated 5000 matches similar to: "Multivariate Multilevel Model: is R the right software for this problem"

2008 Jul 27
2
Link functions in SEM
Is it possible to fit a structural equation model with link functions in R? I am trying to build a logistic-regression-like model in sem, because incorporating the dichotomous variables linearly seems inappropriate. Mplus can do something similar by specifying a 'link' parameter, but I would like to be able to do it in R, ofcourse. I have explored the 'sem' package from John Fox,
2012 Apr 12
0
Multivariate multilevel mixed effects model: interaction
Hello. I am running a multivariate multilevel mixed effects model, and am trying to understand what the interaction term tells me. A very simplified version of the model looks like this: model <- lmer (phq ~ -1 + as.factor(index_phq) * Neuro + ( -1 + as.factor(index_phq)|UserID), data=data) The phq variable is a categorical depression score on 9 depression items (classified by the variable
2012 Oct 07
3
Robust regression for ordered data
I have two regressions to perform - one with a metric DV (-3 to 3), the other with an ordered DV (0,1,2,3). Neither normal distribution not homoscedasticity is given. I have a two questions: (1) Some sources say robust regression take care of both lack of normal distribution and heteroscedasticity, while others say only of normal distribution. What is true? (2) Are there ways of using robust
2012 Dec 07
1
Polychor() - why does it take that long?
Hello. Using the polychor function > polychor(data[c(s1,s2)] ) for polychoric correlations of two ordinal variables in R takes a long time for N=7000 (20 minutes+) and significantly slows down my computer. Now, I have a pretty old computer, but it takes about 20 seconds for MPLUS to print out the complete polychoric correlation matrix for all 16 variables, while I am running the R function
2006 Jul 18
3
Test for equality of coefficients in multivariate multiple regression
Hello, suppose I have a multivariate multiple regression model such as the following: > DF<-data.frame(x1=rep(c(0,1),each=50),x2=rep(c(0,1),50)) > tmp<-rnorm(100) > DF$y1<-tmp+DF$x1*.5+DF$x2*.3+rnorm(100,0,.5) > DF$y2<-tmp+DF$x1*.5+DF$x2*.7+rnorm(100,0,.5) > x.mlm<-lm(cbind(y1,y2)~x1+x2,data=DF) > coef(x.mlm) y1 y2 (Intercept)
2012 Jul 05
4
Exclude missing values on only 1 variable
Hello, I have many hundred variables in my longitudinal dataset and lots of missings. In order to plot data I need to remove missings. If I do > data <- na.omit(data) that will reduce my dataset to 2% of its original size ;) So I only need to listwise delete missings on 3 variables (the ones I am plotting). data$variable1 <-na.omit(data$variable1) does not work. Thank you
2002 May 23
1
Multilevel model with dichotomous dependent variable
Greetings- I'm working with data that are multilevel in nature and have a dichotomous outcome variable (presence or absence of an attribute). As far as I can tell from reading archives of the R and S lists, as well as Pinheiro and Bates and Venables and Ripley, - nlme does not have the facility to do what amounts to a mixed-effects logistic regression. - The canonical alternative is
2012 Aug 10
1
Lavaan: Immediate non-positive definite matrix
Hi, I recently tried to estimate a linear unconditional latent growth curve on 7 repeated measures using lavaan (most recent version): modspec=' alpha =~ 1*read_g0 + 1*read_g1 + 1*read_g2 + 1*read_g3 + 1*read_g4 + 1*read_g5 + 1*read_g6 beta =~ 0*read_g0 + 1*read_g1 + 2*read_g2 + 3*read_g3 + 4*read_g4 + 5*read_g5 + 6*read_g6 ' gmod=lavaan(modspec, data=math, meanstructure=T,
2013 Mar 16
3
Running other programs from R
Dear list, I want to run a statistical program (using its .exe file) from R by writing a script. I know there are some packages that call WinBUGS, Mplus etc. form R. I just want to call the .exe extension of this program and run several times writing a code in R. Thus, I want to have the output inside R. I just don't know where to start. Does anyone have any idea about that? Is there a
2002 Feb 21
2
Re: Factor analysis of categorical or mixed categorical/continuousdata in
I am looking to fit one or more latent categorical variables to data that is a mixture of categorical and continuous variables. Factor analysis would work for continuous data, latent class analysis for categorical data. I understand that in a package such as MPlus I could perform a single analysis of both data types. Are there similar routines available in R? Stuart -----Original Message-----
2007 May 23
2
saving datafreame object problem
Do I miss here something? dtaa = read.table("http://www.ats.ucla.edu/stat/mplus/examples/ma_snijders/mlbook1.dat", sep=",") head(dtaa) # shows the data as it should be save(dtaa,"dtaa",file="c:/dtaa") d = load("c:/dtaa") head(d) # all data is lost, it only shows [1] "dtaa" "dtaa" Thanks for your hint on this.
2005 May 04
3
Multivariate multiple regression
I'd like to model the relationship between m responses Y1, ..., Ym and a single set of predictor variables X1, ..., Xr. Each response is assumed to follow its own regression model, and the error terms in each model can be correlated. My understanding is that although lm() handles vector Y's on the left-hand side of the model formula, it really just fits m separate lm models. What should
2003 May 11
1
NLME - multilevel model using binary outcome - logistic regression
Hi! I'm pretty raw when working with the R models (linear or not). I'm wondering has anybody worked with the NLME library and dichotomous outcomes. I have a binary outcome variable that I woul like to model in a nested (multilevel) model. I started to fit a logistic model to a NLS function, but could not suceed. I know there are better ways to do it in R with either the LRM or GLM wih
2012 Nov 01
2
SEM validation: Cross-Validation vs. Bootstrapping
Hello All, Recently, I was asked to help out with an SEM cross-validation analysis. Initially, the project was based on "sample-splitting" where half of cases were randomly assigned to a training sample and half to a testing sample. Attempts to replicate a model developed in the training sample using the testing sample were not entirely successful. A number of parameter estimates were
2007 Sep 13
2
Multivariate, multilevel regression?
Dear WizaRds, This is mostly a statistics question, but I'm figuring that R is the right solution (even before I start!) I have some bio data of heart rate versus time (rats taken from resting to maximal heart rate). I want to regress heart rate on time. The data have been normalized such that resting heart rate is zero at time=0, so that all curves intersect at the origin (and at the origin
2011 Mar 17
2
Incorrect degrees of freedom in SEM model using lavaan
I have been trying to use lavaan (version 0.4-7) for a simple path model, but the program seems to be computing far less degrees of freedom for my model then it should have. I have 7 variables, which should give (7)(8)/2 = 28 covariances, and hence 28 DF. The model seems to only think I have 13 DF. The code to reproduce the problem is below. Have I done something wrong, or is this something I
2010 Jul 13
1
MplusAutomation
R list- i have begun using the "MplusAutomation" while piloting a large-scale simulation (~200,000 replications). since the package takes advantage of the DOS batch mode available in Mplus, each replication starts and activates a new instance of a command prompt window. this effectively locks me out of my computer for the duration of the simulation. my question is this: can anyone
2011 Jul 27
1
Inserting weights in ltm package
Afternoon R help, I want to run Rasch/IRT analyses using the ltm package, however, I am using large scale survey data which requires weighting for accurate results. I attempted to create a weighted object to insert into the formulae of the ltm packages, however, the survey data only includes 30 replicate weights and a sampling weight. The svrepdesign requires additional information such as
2011 Dec 15
2
fundamental guide to use of numerical optimizers?
I was in a presentation of optimizations fitted with both MPlus and SAS yesterday. In a batch of 1000 bootstrap samples, between 300 and 400 of the estimations did not converge. The authors spoke as if this were the ordinary cost of doing business, and pointed to some publications in which the nonconvergence rate was as high or higher. I just don't believe that's right, and if some
2007 May 21
1
can I get same results using lme and gls?
Hi All I was wondering how to get the same results with gls and lme. In my lme, the design matrix for the random effects is (should be) a identity matrix and therefore G should add up with R to produce the R matrix that gls would report (V=ZGZ'+R). Added complexity is that I have 3 levels, so I have R, G and say H (V=WHW'+ZGZ'+R). The lme is giving me the correct results, I am