search for: mod2s

Displaying 20 results from an estimated 126 matches for "mod2s".

Did you mean: mod2
2010 Jan 28
2
Data.frame manipulation
Hi All, I'm conducting a meta-analysis and have taken a data.frame with multiple rows per study (for each effect size) and performed a weighted average of effect size for each study. This results in a reduced # of rows. I am particularly interested in simply reducing the additional variables in the data.frame to the first row of the corresponding id variable. For example:
2012 Jun 06
3
Sobel's test for mediation and lme4/nlme
Hello, Any advice or pointers for implementing Sobel's test for mediation in 2-level model setting? For fitting the hierarchical models, I am using "lme4" but could also revert to "nlme" since it is a relatively simple varying intercept model and they yield identical estimates. I apologize for this is an R question with an embedded statistical question. I noticed that a
2010 Sep 26
1
formatting data for predict()
I'm trying to get predicted probabilities out of a regression model, but am having trouble with the "newdata" option in the predict() function. Suppose I have a model with two independent variables, like this: y=rbinom(100, 1, .3) x1=rbinom(100, 1, .5) x2=rnorm(100, 3, 2) mod=glm(y ~ x1 + x2, family=binomial) I can then get the predicted probabilities for the two values of
2013 Feb 12
0
error message from predict.coxph
In one particular situation predict.coxph gives an error message. Namely: stratified data, predict='expected', new data, se=TRUE. I think I found the error but I'll leave that to you to decide. Thanks, Chris ######## CODE library(survival) set.seed(20121221) nn <- 10 # sample size in each group lambda0 <- 0.1 # event rate in group 0 lambda1 <- 0.2 # event rate in group 1
2011 Oct 26
2
Error in summary.mlm: formula not subsettable
When I fit a multivariate linear model, and the formula is defined outside the call to lm(), the method summary.mlm() fails. This works well: > y <- matrix(rnorm(20),nrow=10) > x <- matrix(rnorm(10)) > mod1 <- lm(y~x) > summary(mod1) ... But this does not: > f <- y~x > mod2 <- lm(f) > summary(mod2) Error en object$call$formula[[2L]] <- object$terms[[2L]]
2013 Nov 25
4
lmer specification for random effects: contradictory reults
Hi All, I was wondering if someone could help me to solve this issue with lmer. In order to understand the best mixed effects model to fit my data, I compared the following options according to the procedures specified in many papers (i.e. Baayen <http://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDsQFjAA
2010 Feb 15
2
creating functions question
Hi All, I am interested in creating a function that will take x number of lm objects and automate the comparison of each model (using anova). Here is a simple example (the actual function will involve more than what Im presenting but is irrelevant for the example): # sample data: id<-rep(1:20) n<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20)
2023 Nov 30
1
back tick names with predict function
?s 17:38 de 30/11/2023, Robert Baer escreveu: > I am having trouble using back ticks with the R extractor function > 'predict' and an lm() model.? I'm trying too construct some nice vectors > that can be used for plotting the two types of regression intervals.? I > think it works with normal column heading names but it fails when I have > "special"
2010 Jul 09
1
output without quotes
Hi All, I am interested in printing column names without quotes and am struggling to do it properly. The tough part is that I am interested in using these column names for a function within a function (e.g., lm() within a wrapper function). Therefore, cat() doesnt seem appropriate and print() is not what I need. Ideas? # sample data mod1 <- rnorm(20, 10, 2) mod2 <- rnorm(20, 5, 1) dat
2008 Oct 16
1
lmer for two models followed by anova to compare the two models
Dear Colleagues, I run this model: mod1 <- lmer(x~category+subcomp+category*subcomp+(1|id),data=impchiefsrm) obtain this summary result: Linear mixed-effects model fit by REML Formula: x ~ category + subcomp + category * subcomp + (1 | id) Data: impchiefsrm AIC BIC logLik MLdeviance REMLdeviance 4102 4670 -1954 3665 3908 Random effects: Groups Name Variance
2003 Feb 10
2
problems using lqs()
Dear List-members, I found a strange behaviour in the lqs function. Suppose I have the following data: y <- c(7.6, 7.7, 4.3, 5.9, 5.0, 6.5, 8.3, 8.2, 13.2, 12.6, 10.4, 10.8, 13.1, 12.3, 10.4, 10.5, 7.7, 9.5, 12.0, 12.6, 13.6, 14.1, 13.5, 11.5, 12.0, 13.0, 14.1, 15.1) x1 <- c(8.2, 7.6,, 4.6, 4.3, 5.9, 5.0, 6.5, 8.3, 10.1, 13.2, 12.6, 10.4, 10.8, 13.1, 13.3, 10.4, 10.5, 7.7, 10.0, 12.0,
2007 Jun 11
1
2 iosnoop scripts: different results
I am teaching a DTrace class and a student noticed that 2 iosnoop scripts run in two different windows were producing different results. I was not able to answer why this is. Can anyone explain this. Here are the reults from the two windows: # io.d ... sched 0 <none> 1024 dad1 W 0.156 bash 1998
2023 Nov 30
1
back tick names with predict function
I am having trouble using back ticks with the R extractor function 'predict' and an lm() model.? I'm trying too construct some nice vectors that can be used for plotting the two types of regression intervals.? I think it works with normal column heading names but it fails when I have "special" back-tick names.? Can anyone help with how I would reference these?? Short of
2009 Oct 21
1
How to find the interception point of two linear fitted model in R?
Dear All, Let have 10 pair of observations, as shown below. ###################### x <- 1:10 y <- c(1,3,2,4,5,10,13,15,19,22) plot(x,y) ###################### Two fitted? models, with ranges of [1,5] and [5,10],?can be easily fitted separately by lm function as shown below: ####################### mod1 <- lm(y[1:5] ~ x[1:5]) mod2 <- lm(y[5:10] ~ x[5:10]) #######################
2008 Sep 23
0
OQO mod2 arrival
My OQO mod2s just arrived! All 4 of them; portable testbed here it comes!!! I hope.... The units weigh in at ~.75lbs, and measure aprox. 5 5/8 x 3 3/8 x 1 1/8" A little larger when you push up the 5" screen to reveal the keyboard. WiFi, Bluetooth, HDMI, and a single USB built in; an adapter for...
2006 Dec 09
1
abline for intercept-only simple lm models (with and without offset)
The abline function can be used to draw the regression line when one passes the lm object as an argument. However, if it's an intercept-only model, it appears to use the intercept as the slope of the abline: mod <- lm(dist ~ 1, data = cars) plot(dist ~ speed, data = cars) abline(reg = mod) # nothing appears This behaves as documented, but might catch someone. Would it be an improvement
2011 Aug 23
1
P values for vglm(zibinomial) function in VGAM
Hi , I know this question has been asked twice in the past but to my knowldege, it still hasn't been solved. I am doing a zero inflated binomial model using the VGAM package, I need to obtain p values for my Tvalues in the vglm output. code is as follows > mod2=vglm(dmat~Season+Diel+Tidal.phase+Tidal.cycle,zibinomial, data=mp1) > summary(mod2) Call: vglm(formula = dmat ~ Season +
2011 Mar 19
1
strange PREDICTIONS from a PIECEWISE LINEAR (mixed) MODEL
Hi Dears, When I introduce an interaciton in a piecewise model I obtain some quite unusual results. If that would't take u such a problem I'd really appreciate an advise from you. I've reproduced an example below... Many thanks x<-rnorm(1000) y<-exp(-x)+rnorm(1000) plot(x,y) abline(v=-1,col=2,lty=2) mod<-lm(y~x+x*(x>-1)) summary(mod) yy<-predict(mod)
2013 May 02
1
multivariate, hierarchical model
Sorry for the last email, sent too early. I have a small data set that has a hierarchical structure. It has both temporal (year, months) and spatial (treatment code and zone code). The following explains the data: WSZ_Code the water supply zone code (1 to 8) Treatment_Code the treatment plant which supplies each water supply zone (1 to 4)
2006 Aug 29
2
lattice and several groups
Dear R-list, I would like to use the lattice library to show several groups on the same graph. Here's my example : ## the data f1 <- factor(c("mod1","mod2","mod3"),levels=c("mod1","mod2","mod3")) f1 <- rep(f1,3) f2 <-