similar to: Log-transform and specifying Gamma

Displaying 20 results from an estimated 300 matches similar to: "Log-transform and specifying Gamma"

2011 Oct 04
1
Rug plot curve reversal
Dear R-help Can anyone tell me why my curve appears the wrong way round on a rug plot? I am using the same code as on pg 596 of the Crawley R-book. mod<-glm(mort~logBd,binomial) par(mfrow=c(2,2)) xv<-seq(0,8,0.01) yv<-predict(mod,list(logBd=xv),type="response") plot(logBd,mort) lines(xv,yv) I've tried swapping xv and yv around but no luck. Thanks, Pete
2012 Mar 29
3
r-forge build failure bafflement
I am attempting to build a package on r-forge and running into a weird error. I have been in correspondence with the R-forge admins and am turning to r-devel on the remote chance that someone might have a guess as to what is going wrong or a suggestion about further diagnostics/experiments I could try ... The package seems to build fine on my system(s) with R CMD build --compact-vignettes
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
2005 Sep 15
1
Coefficients from LM
Hi everyone, Can anyone tell me if its possibility to extract the coefficients from the lm() command? For instance, imagine that we have the following data set (the number of observations for each company is actually larger than the one showed...): Company Y X1 X2 1 y_1 x1_1 x2_1 1 y_2 x1_2 x2_2 1 y_3 x1_3 x2_3 (...) 2 y_4 x1_4 x2_4 2 y_5 x1_5 x2_5 2 y_6 x1_6 x2_6 (...) n y_n x1_n x2_n n
2005 Jul 11
2
CIs in predict?
Dear All, I am trying to put some Confidence intervals on some regressions from a linear model with no luck. I can extract the fitted values using 'predict', but am having difficulty in getting at the confidence intervals, or the standard errors. Any suggestions would be welcome Cheers Guy Using Version 2.1.0 (2005-04-18) on a PC vol.mod3 <-
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
2005 Aug 29
1
Different sings for correlations in OLS and TSA
Dear list, I am trying to re-analyse something. I do have two time series, one of which (ts.mar) might help explaining the other (ts.anr). In the original analysis, no-one seems to have cared about the data being time-series and they just did OLS. This yielded a strong positive correlation. I want to know if this correlation is still as strong when the autocorrelations are taken into account.
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 <-
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,
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)
2012 Jan 19
3
fitting an exp model
Hello there, I am trying to fit an exponential model using nls to some data. #data t <- c(0,15,30,60,90,120,240,360,480) var <- c(0.36,9.72,15.50,23.50,31.44,40.66,59.81,73.11,81.65) df <- data.frame(t, var) # model # var ~ a+b*(1-exp(-k*t)) # I'm looking for values of a,b and k # formula # mod <- nls(formula = var ~ a+b *(1-exp((-k)*t)), start=list(a=0, b=10,
2003 Apr 28
2
stepAIC/lme problem (1.7.0 only)
I can use stepAIC on an lme object in 1.6.2, but I get the following error if I try to do the same in 1.7.0: Error in lme(fixed = resp ~ cov1 + cov2, data = a, random = structure(list( : unused argument(s) (formula ...) Does anybody know why? Here's an example: library(nlme) library(MASS) a <- data.frame( resp=rnorm(250), cov1=rnorm(250), cov2=rnorm(250),
2012 Jul 30
1
te( ) interactions and AIC model selection with GAM
Hello R users, I'm working with a time-series of several years and to analyze it, I?m using GAM smoothers from the package mgcv. I?m constructing models where zooplankton biomass (bm) is the dependent variable and the continuous explanatory variables are: -time in Julian days (t), to creat a long-term linear trend -Julian days of the year (t_year) to create an annual cycle - Mean temperature
2011 Nov 26
2
simplify source code
Hi I would like to shorten mod1 <- nls(ColName2 ~ ColName1, data = table, ...) mod2 <- nls(ColName3 ~ ColName1, data = table, ...) mod3 <- nls(ColName4 ~ ColName1, data = table, ...) ... is there something like cols = c(ColName2,ColName3,ColName4,...) for i in ... mod[i-1] <- nls(ColName[i] ~ ColName1, data = table, ...) I am looking forward to help Christof
2011 Apr 07
1
Automated Fixed Order Stepwise Regression Function
Greetings, I am interested in creating a stepwise fixed order regression function. There's a function for this already called add1( ). The F statistics are calculated using type 2 anova (the SS and the F changes don't match SPSS's). You can see my use of this at the very end of the email. What I want: a function to make an anova table with f changes and delt R^2. I ran into
2011 Nov 24
3
The contrast and Design libraries
Dear all, I have been using the contrast library in my teaching for the last couple of years and am right in the middle of this year's round. In the last week R has been updated to version 2.14.0 on our computers. This has had the unfortunate effect of meaning the contrasts library no longer works, as the Design library is no longer available. I wonder if anyone has a fix for this...or
2010 Nov 15
1
Executing Command on Multiple R Objects
Hello Everyone - I want to print a number of results from lme function objects out to a txt file. How could I do this more efficiently than what you see here: out2 <- capture.output(summary(mod2a)) out3 <- capture.output(summary(mod3)) out4 <- capture.output(summary(mod5)) out5 <- capture.output(summary(mod6)) out6 <- capture.output(summary(mod7))
2005 Jul 22
2
memory cleaning
Hi R Users, After some research I haven't find what I want. I'm manipulating a dataframe with 70k rows and 30 variables, and I run out of memory when exporting this in a *.txt file after some computing I have used : > memory.size()/1048576.0 [1] 103.7730 and I make my export : > write.table(cox,"d:/tablefinal2.txt",row.names=F,sep=';') >
2010 Sep 08
4
coxph and ordinal variables?
Dear R-help members, Apologies - I am posting on behalf of a colleague, who is a little puzzled as STATA and R seem to be yielding different survival estimates for the same dataset when treating a variable as ordinal. Ordered() is used to represent an ordinal variable) I understand that R's coxph (by default) uses the Efron approximation, whereas STATA uses (by default) the Breslow. but we
2011 Mar 31
1
Sequential multiple regression
Hello, In the past I have tended to reside more in the ANOVA camp but am trying to become more familiar with regression techniques in R. I would like to get the F change from a model as I take away factors: SO... mod1<-lm(y~x1+x2+x3).......mod2<-lm(y~x1,x2).......mod3<-lm(y~x1) I can do this by hand by running several models in R and taking the MSr1/MSe1, MSr2/MSe2... This is