search for: intercept

Displaying 20 results from an estimated 5118 matches for "intercept".

2009 Jun 04
2
wrong labels and colors of points in graph/plot
...munity... I've got an object coefficient2 which I want to plot in differerent ways, with colors and labels added to the points, but somehow there seems to be a problem if a value is NA within the independent variable, resulting in false labels and false colors for the points. plot(coefficient2$intercept ~ coefficient2$average_height, main="intercepts ::: height", ylab="intercepts", xlab="average height per site [cm]", xlim=c(20,3020), ylim=c(-2,5), col=coefficient2$color) highlight(coefficient2$intercept ~ coefficient2$average_height, lbls=coefficient2$site_no,col=&qu...
2007 May 21
4
How to compare linear models with intercept and those without intercept using minimizing adjs R^2 strategy
Dear R-list, I apologize for my many emails but I think I know how to desctribe my problem differently and more clearly. My question is how to compare linear models with intercept and those without intercept using maximizing adjusted R^2 strategy. Now I do it like the following: > library(leaps) > n=20 > x=matrix(rnorm(n*3),ncol=3) > b=c(1,2,0) > intercept=1 > y=x%*%b+rnorm(n,0,1)+intercept > > var.selection=leaps(cbind(rep(1,n),x),y,int=F,method=&q...
2007 Nov 28
2
fit linear regression with multiple predictor and constrained intercept
Hi group, I have this type of data x(predictor), y(response), factor (grouping x into many groups, with 6-20 obs/group) I want to fit a linear regression with one common intercept. 'factor' should only modify the slopes, not the intercept. The intercept is expected to be >0. If I use y~ x + factor, I get a different intercept for each factor level, but one slope only if I use y~ x * factor, I get the interaction term I want, but the intercept is not kept constan...
2006 Mar 10
4
How to get the intercept from lm?
Hi I am using R 2.2.0 under SuSE 10 I want to use lm() to get the slope and intercept for several daatasets and store them in a database. So far so good - but how do I extract the slope and the intercept from the result from lm()? my code looks like this: lmNNDens <- lm(log(DensNN$MeanNN) ~ log(DensNN$MeanDensity)) anovaLM <- anova(lmNNDens) Results$slope[No] <- ???lmN...
2011 Feb 01
4
Fitting ELISA measurements "unknowns" to 4 parameter logistic model
...a standard curve. To create the standard curve model, I performed a 4-parameter logistic fit using the 'drc' package (ExpectedConc~Absorbance). This gave me the following: > FourP A 'drc' model. Call: drm(formula = Response ~ Expected, data = SC, fct = LL.4()) Coefficients: b:(Intercept) c:(Intercept) d:(Intercept) e:(Intercept) 1.336 6.236 85.521 59.598 > summary(FourP) Model fitted: Log-logistic (ED50 as parameter) (4 parms) Parameter estimates: Estimate Std. Error t-value p-value b:(Intercept) 1.33596 0.15861 8.4230...
2007 Dec 05
2
Interpretation of 'Intercept' in a 2-way factorial lm
Hi all, I hope this question is not too trivial. I can't find an explanation anywhere (Stats and R books, R-archives) so now I have to turn to the R-list. Question: If you have a factorial design with two factors (say A and B with two levels each). What does the intercept coefficient with treatment.contrasts represent?? Here is an example without interaction where A has two levels A1 and A2, and B has two levels B1 and B2. So R takes as a baseline A1 and B1. coef( summary ( lm ( fruit ~ A + B, data = test))) Estimate Std. Error t value Pr...
2011 Feb 18
3
lm without intercept
..., I am not a statistics expert, so I have this question. A linear model gives me the following summary: Call: lm(formula = N ~ N_alt) Residuals: Min 1Q Median 3Q Max -110.30 -35.80 -22.77 38.07 122.76 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13.5177 229.0764 0.059 0.9535 N_alt 0.2832 0.1501 1.886 0.0739 . --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Residual standard error: 56.77 on 20 degrees of freedom (16 observations deleted due to missingness) Multiple R-squared: 0.151, Adjusted...
2013 Apr 16
2
Understanding why a GAM can't have an intercept
Dear List, I've just tried to specify a GAM without an intercept -- I've got one of the (rare) cases where it is appropriate for E(y) -> 0 as X ->0. Naively running a GAM with the "-1" appended to the formula and the calling "predict.gam", I see that the model isn't behaving as expected. I don't understand why this woul...
2012 Sep 23
1
How to Write a Model in R that has the Log taken of the Intercept
Hi, I know that +1 is used to specify an intercept in a R model. An example of this would be: y~x+1 If I want to have a model where the log of the intercept is taken, the equation y~x+log(1) will not take the log of the intercept. Any suggestions on how to take the log of the intercept will be appreciated. Thanks [[alternative HTML version del...
2011 Apr 19
1
How to Extract Information from SIMEX Output
...suggest how to go about doing this? I can extract the upper level results like fit.simex$coefficients but I have had no success getting at the lower levels. Tom > str(fit.simex) List of 24 $ coefficients : Named num [1:2] -17.1 3 ..- attr(*, "names")= chr [1:2] "(Intercept)" "x" $ SIMEX.estimates : num [1:6, 1:3] -1 0 0.5 1 1.5 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:3] "lambda" "(Intercept)" "x" $ lambda : num [1:5] 0 0.5 1 1.5 2 $ model...
2003 Aug 19
3
logistic regression without intercept
I want to do a logistic regression without an intercept term. This option is absent from glm, though present in some of the inner functions glm uses. I gather glm is the standard way to do logistic regression in R. Hoping it would be passed in, I said > r <- glm(brain.cancer~epilepsy+other.cancer, c3, > family=binomial(link="log...
2003 Sep 26
3
Std. errors of intercept and slope
Dear all, I have the following output generated by linear regression. Since there is only one regression intercept and one slope for one set of data, what is the meaning of std. error for intercept and that of slope? Thanks in advance. Sincerely, Minghua > data(thuesen) > attach(thuesen) > lm(short.velocity~blood.glucose) Call: lm(formula = short.velocity ~ blood.glucose) Coefficients: (Interc...
2012 Oct 10
2
GAM without intercept
Hi everybody, I am trying to fit a GAM model without intercept using library mgcv. However, the result has nothing to do with the observed data. In fact the predicted points are far from the predicted points obtained from the model with intercept. For example: #First I generate some simulated data: library(mgcv) x<-seq(0,10,length=100) y<-x^2+rnorm(...
2007 Aug 28
1
FW: How to fit an linear model withou intercept
...t > to do my study correctly. Thanks a lot. > > > > -----Original Message----- > From: Leeds, Mark (IED) > Sent: Thursday, August 23, 2007 1:05 PM > To: 'John Sorkin' > Cc: 'markleeds at verizon.net' > Subject: RE: [R] How to fit an linear model withou intercept > > Hi John : I'm from the R-list obviously and that was a nice example > that I cut and pasted and learned from. I'm Sorry to bother you but I > had a non R question that I didn't want to pose to the R-list because I > think It's been discussed a lot in the past bu...
2007 Mar 07
1
Failure to run mcsamp() in package arm
...**************************************** > M1 <- lmer (y1 ~ x + (1|group)) > (M1.sim <- mcsamp (M1)) fit using lmer, 3 chains, each with 1000 iterations (first 500 discarded) n.sims = 1500 iterations saved mean sd 2.5% 25% 50% 75% 97.5% Rhat n.eff beta.(Intercept) 0.1 0.7 -1.2 -0.3 0.1 0.5 1.4 1.0 1500 beta.x 2.5 0.4 1.7 2.2 2.5 2.7 3.2 1.0 1500 sigma.y 3.8 0.3 3.3 3.6 3.7 3.9 4.3 1.0 61 sigma.grop.(In) 1.5 0.8 0.0 1.0 1.4 1.9 3.3 1.4 12 eta.group.(Intercept)[1]...
2010 Aug 23
3
extracting p-values from Anova objects (from the car library)
Dear all, is there anyone who can help me extracting p-values from an Anova object from the car library? I can't seem to locate the p-values using str(result) or str(summary(result)) in the example below > A <- factor( rep(1:2,each=3) ) > B <- factor( rep(1:3,times=2) ) > idata <- data.frame(A,B) > fit <- lm( cbind(a1_b1,a1_b2,a1_b3,a2_b1,a2_b2,a2_b3) ? sex,
2012 Jul 27
1
Understanding the intercept value in a multiple linear regression with categorical values
Hi! I'm failing to understand the value of the intercept value in a multiple linear regression with categorical values. Taking the "warpbreaks" data set as an example, when I do: > lm(breaks ~ wool, data=warpbreaks) Call: lm(formula = breaks ~ wool, data = warpbreaks) Coefficients: (Intercept) woolB 31.037 -5.778 I'...
2004 Oct 22
3
Convert a list in a dataframe
Hi, I've a list containing parameters (intercepts & coefficients) of 12 regressions fitted > coeff [[1]] (Intercept) anno -427017.1740 217.0588 [[2]] (Intercept) anno -39625.82146 21.78025 ..... [[12]] (Intercept) anno 257605.0343 -129.7646 I want create a data frame with two columns (intercept...
2006 Oct 25
3
simplification of code using stamp?
...the following code which I would like to simplify. Id does linear regressions and returns the r-squares, and the coefficients. It runs slow, as it is doing the regressions for each - is it possible to get the values in a dataframe which looks as follow: expert | xx | seeds | r.squared | slope | intercept Thanks in advance, Rainer library(reshape) rsqs <- as.data.frame( stamp( tc.long, expert * xx * seeds ~ ., function(df) try( summary( lm(distance ~ generation, data=df))$r.squared,...
2011 Mar 31
2
ANCOVA for linear regressions without intercept
...od correlation between body length (response variable) and head length (explanatory variable). I know it is not recommended, but for a good practical reason (the purpose of study is to find a single conversion factor from head length to body length), the regressions need to go through the origin (0 intercept). Is it possible to do ANCOVA for these regressions without intercepts? When I do summary(lm(body length ~ sex*head length)) this will include the intercepts as below Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -6.49697 1.68497 -...