similar to: Linear Contrasts in GLM - Query

Displaying 20 results from an estimated 10000 matches similar to: "Linear Contrasts in GLM - Query"

2010 Feb 23
1
Longitudinal analysis: contrasting time points
Hi everyone I have the following situation: In a longitudinal study, subjects fill out a questionnaire every year (repeated measurements over time). Also, the subjects are nested within departments. There is an intervention going on over time. The outcome variable is continuous. Now I'd like to analyse two things: 1. Is there a significant change over time? I think this is done by a
2009 Dec 18
1
linear contrasts for trends in an anova
Hi everybody, I'm trying to construct contrasts for an ANOVA to determine if there is a significant trend in the means of my groups. In the following example, based on the type of 2x3 ANOVA I'm trying to perform, does the linear polynomial contrast generated by contr.poly allow me to test for a linear trend across groups? doi=data.frame( Group=c( rep(1, 5), rep(2, 5), rep(3, 5),
2010 Apr 14
2
GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?
Hi, I was reading the book on "Mixed Effects Models and Extensions in Ecology with R" by Zuur et al. In Section 6.2, an example is discussed where a gamm-model is fitted, with a smoother for time, which differs for each value of ID (4 different bird species). In earlier versions of R, the following code was used BM2<-gamm(Birds~Rain+ID+
2009 Sep 25
3
Problem on plotting TS using GGPLOT
Hi, I have following codes : library(zoo); library(ggplot2); library(plyr) dat <- rnorm(306); vv <- letters[1:6]; dat1 <- data.frame(dat, vv) dat2 = zooreg(rnorm(51), as.yearmon(as.Date("2000-01-01")), frequency=12) ggplot(dat1) + geom_line(aes(y=dat, x=index(dat2), colour=vv), group=vv, size = 1.3) However I got error while plotting them :
2009 Dec 22
2
Nested For loops
Dear R experts, Might be very simple question to ask but would be insightful. As the same story of nested "for loops". following is the code that I am using to get the autocorrelation function of the sample data. I have tried to get rid of for loops but since I am touching R after such a long time that I need to practice more but I need help to revive my skills. I know that apply() or
2010 Apr 19
2
ecdf
Hello, I'd like to plot an empirical cumulative distribution function, except instead of the fraction of values < x, I'd like the fraction of values > x. I think this can be done using the ecdf function in {Hmisc}. I installed the package and loaded it. However, when following the example given in the documentation, I get an error: x <- rnorm(100) ecdf(x,what='1-F')
2009 Dec 23
2
COnfidence intervals for estimates of linear model
Hello, I would like to calculate the 95% confidence intervals for the estimates of a linear model and I just wanted to check that I am doing it correct. Is it just: Estimate + 1.95996*Std.Error to Estimate - 1.95996*Std.Error or is there another approach that doesn't assume a normal distrbution? Thanks. Apologies for my naiivity Dan --
2009 Sep 08
4
barplot with lines instead of bars
Dear useRs, I want to plot the following barplot with lines instead of bars. Is there a way? data <- data.frame(cbind(k = 0:3, fk = c(11, 20,7,2), f0k = c(13.72, 17.64, 7.56, 1.08), fkest = c(11.85, 17.78, 8.89, 1.48))) d <- t(data[,2:4]) barplot(d, beside=TRUE) Regards, Rafael. ____________________________________________________________________________________ [[elided Yahoo
2010 Apr 29
5
reduce size of pdf
is there a way to reduce the size of pdf files in R: ? compression? lower dpi ? or some other option?
2009 Nov 08
2
linear trend line and a quadratic trend line.
Dear list users How is it possible to visualise both a linear trend line and a quadratic trend line on a plot of two variables? Here my almost working exsample. data(Duncan) attach(Duncan) plot(prestige ~ income) abline(lm(prestige ~ income), col=2, lwd=2) Now I would like to add yet another trend line, but this time a quadratic one. So I have two trend lines. One linear trend line
2010 Aug 30
1
compare three values
Hi, I've three values. What is the best method to choice the lowest values with an if function? example: a = 3 b = 1 c = 5 if (lowest(a,b,c) is a) {........} if (lowest(a,b,c) is b) {........} if (lowest(a,b,c) is c) {........} Thanks, Alfredo
2010 Jul 20
1
define subgroups based on position in table
Dear list, I have a data frame with one column (group) and want to add a second column (sub) with a serial number that says to which subgroup a cell belongs. A subgroup contains the consecutive rows of the same group. The number of a subgroup is based on its position in the table. The first subgroup of A's and B's should have nr A1 and B1, the second nr A2 and B2, etc.. I hope the
2010 Feb 09
2
step and glmer
Is it possible to use the step() function with a glmer() as an object? I obtain the following error message when I try to do it: "Error in x$terms : $ operator not defined for this S4 class". I perform the glmer correctly but I can't do the step. Thank you so much. -- View this message in context: http://n4.nabble.com/step-and-glmer-tp1474390p1474390.html Sent from the R help
2009 Oct 12
1
package nlme
Hi R Users, When I use package nlme for linear model with random effects, there exists errors and I don't know the data structure of lme. Here is my data: Rice<-data.frame(Yield=c(8,7,4,9,7,6,9,8,8,8,7,5,9,9,5,7,7,8,8,8,4,8,6,4,8,8,9), Variety=rep(rep(c("A1","A2","A3"),each=3),3),
2010 Sep 22
1
Ordinal mixed model
Hello, I am trying to build a generalised linear mixed model.? My dependent variable is ordinal.? I have a random factor (7 individuals), and a repeated measure where the dependent variable was measured three times for each of four attempts (so the repeats are nested).? I also have a few covariates.? I am a complete novice in R, being used to using SPSS.? SPSS lets me build an ordinal model
2009 Sep 29
2
ggplot2 box plot notches
Dear List, I just googled to find out if notched box plots are possible with ggplot2, but couldn't find a answer to it. boxplot() has the option: notch = TRUE, e.g.: boxplot(mpg$hwy, notch=TRUE) My example code (taken from the net) is: require(ggplot2) qplot(class, hwy, fill=factor(year), data=mpg, geom="boxplot", position="dodge")+theme_bw() Thank you for you help!
2010 May 27
1
adding column to data frame conditionally
Dear all and thanks in advance for helping me with a rather stupid question: I imported a data set ("freqg") into R consisting of 14 variables. Now a want to compute a variable and add it in an additional column to my data frame. The value of this new variable ("condition") depends on the values of two other variables ("mat" and "flank") already
2010 Jun 09
1
specifying plot symbol sizes in qplot or ggplot2
Hi. first things first ... thanks for ggplot2. Now my question. I'm using qplot to generate a plot as follows where X,Y,Z, A are columns in a dataframe. qplot(X, Y, data=XYDATA, color=Z, geom=c("point"), size=A) This works as expected. Factor A has three levels so there are three sizes of the point plot symbol. I understand that the factor levels are mapped to symbol sizes.
2010 Jan 15
1
Best method
Hi, I would like to ask for advice about best statistics method for my problem. I was done questionnaire about headache. My data are: Y - frequency of symptoms occur - times per month in range <0..30> (where 30 is daily and zero for never) and independent variables: X1 - sex - category {M,F} X2 - age - linear value X3 - type of work {administrative, manual, ...} ... Which model is
2010 Jul 29
1
precision of minus operation and if statments
Hi Everyone, as part of a larger script, I need to insert the result of a simple minus operation into an if statement. I have noticed that the precision that appear on the screen is not the precision in which R stores the result of the minus operation, and that this change alters the result of the if statement. For example, when running this simple script:   > a=0.90 > b=0.95 >