Displaying 20 results from an estimated 30000 matches similar to: "LM intercept"
2011 Feb 18
3
lm without intercept
Hi,
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
2008 Jun 02
1
Ancova: formula with a common intercept
I have some data with two categorises plus/minus (p53) and a particular
time (Time) and the outcome is a continuous vairable (Result). I set up
a maximum model.
ancova <- lm(Result~Time*p53)
> summary(ancova)
..
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.05919 0.55646 0.106 0.916
Time -0.02134 0.01785 -1.195 0.241
p53plus
2006 Mar 23
3
Intercepts in linear models.
A colleague asked me if there is a way to specify with a
***variable*** (say ``cflag'') whether there is an intercept in a
linear model.
She had in mind something like
lm(y ~ x - cflag)
where cflag could be 0 or 1; if it's 0 an intercept should
be fitted, if it's 1 then no intercept.
This doesn't work ``of course''. The cflag just gets treated
as another predictor
2012 Sep 21
1
translating SAS proc mixed into R lme()
Dear R users,
I need help with translating these SAS codes into R with lme()? I have a
longitudinal data with repeated measures (measurements are equally spaced
in time, subjects are measured several times a year). I need to allow slope
and intercept vary.
SAS codes are:
proc mixed data = survey method=reml;
class subject var1 var3 var2 time;
model score = var2 score_base var4 var5 var3
2009 Feb 16
1
incl.non.slopes=FALSE does not work at predict.lm
Dear all,
I am trying to estimate the prediction from a fixed effects model and their
confidence intervals as well. Though I do not want to include in the
prediction and at the confidence intervals the intercept. For that reason I
used the argument incl.non.slopes=FALSE. But either if it is TRUE or FALSE
it does not have any difference and also the system does not provide any
warning. I really
2005 Jan 07
4
glm fit with no intercept
Dear R-help list members,
I am currently trying to fit a generalized linear model using a binomial
with the canonical link. The usual solution is to use the R function glm()
in the package "stats". However, I run into problem when I want to fit a
glm without an intercept. It is indicated that the solution is in changing
the function glm.fit (also in "stats"), by specifying
2007 Oct 03
2
Forcing zero intercept in two predictor case - stat question not R question
When one is doing simple regression and needs to force a zero intercept
( for whatever reason. I realize it's a controversial issue ),
then subtracting the means of the left hand side and the right hand side
from themselves does the trick. Does anyone know if there is a
similar trick when the RHS has two variables ? Thanks.
--------------------------------------------------------
This is
2009 Apr 08
2
Doubt about aov and lm function... bug?
Hi,
The below very strange:
# a) aov function
av <- aov(Sepal.Length ~ Species, data=iris)
# Error in parse(text = x) :
# unexpected symbol in "Sepal(Sepal.Length+Species)Length"
av <- aov(iris[, 1] ~ iris[, 5])
# summary(av)
# Df Sum Sq Mean Sq F value Pr(>F)
# iris[, 5] 2 63.2 31.6 119 <2e-16 ***
# Residuals 147 39.0 0.3
# ---
2008 Apr 07
2
predict.lm() question
Dear R-people ...
I'm a new user. I can't get predict.lm() to produce predictions for
new independent data. There are some messages in archived help about
this problem, but I still don't see my error after reviewing
those. I understand that the new independent data must have the same
name(s) as used when the model was made.
In the example below, predict.lm produces the
2008 Oct 24
4
Mail server problem?
I keep getting repeated copies of ``R-help post acknowledgements'' in
respect
of a couple of postings that I made to the list this morning (my time).
I only posted each posting *once*. I hope that others are not getting
repeated copies of my postings .... I mean I *know* my postings are so
wonderful they merit re-reading, but one does not need another copy
in order
to re-read! :-)
2011 Sep 13
1
stupid lm() question
I feel bad even asking, but:
Rgames> data(OrchardSprays)
Rgames> model<-lm(decrease~.,data=OrchardSprays)
Rgames> model
Call:
lm(formula = decrease ~ ., data = OrchardSprays)
Coefficients:
(Intercept) rowpos colpos treatmentB treatmentC
22.705 -2.784 -1.234 3.000 20.625
treatmentD treatmentE treatmentF treatmentG treatmentH
2007 Nov 26
1
pass lm( ) a char vector as the variables to be included
Dear Everyone in list:
I am writing some codes to automate the process of
fitting linear models where the names of variables of
models are produced and stored in character vectors.
But I have problems to pass the vectors to the lm( )
because I don't know how to strip the quotation marks
automatically.
Here are the codes of the example of lm( ):
## Annette Dobson (1990) "An Introduction
2012 Aug 03
1
SEM standardized path coefficients
Hello,
I have conducted an SEM in which the resultant standardized path coefficients are much higher than would be expected from the raw correlation matrix. To explore further, I stripped the model down to a simple bivariate relationship between two variables (NDVI, and species richness), where it's my understanding that the SEM's standardized path coefficient should equal the correlation
2001 Oct 17
3
Type III sums of squares.
Peter Dalgaard writes (in response to a question about 2-way ANOVA
with imbalance):
> ... There are various
> boneheaded ways in which people try to use to assign some kind of
> SumSq to main effects in the presence of interaction, and they are all
> wrong - although maybe not very wrong if the unbalance is slight.
People keep saying this
2008 Feb 27
2
multi-level hierarchical logistic regression with sampling weight
Hi
I would like to run a multi-level hierarchical logistic regression model with sampling weight? Is this possible with R?
Thanks a lot,
Qian Guo
---------------------------------
[[alternative HTML version deleted]]
2010 Feb 28
6
A slight trap in read.table/read.csv.
I had occasion recently to read in a one-line *.csv file that
looked like:
"CandidateName","NSN","Ethnicity","dob","gender"
"Smith, Mary Jane",111222333,"E","2/25/1989","F"
That "F" (for female) in the last field got transformed to
FALSE. Apparently read.csv (and hence read.table) are inferring
2006 Jun 02
3
lm() variance covariance matrix of coefficients.
Hi,
I am running a simple linear model with (say) 5 independent variables. Is
there a simple way of getting the variance-covariance matrix of the
coeffcient estimates? None of the values of the lm() seem to provide this.
Thanks in advance,
Ritwik Sinha
rsinha@darwin.cwru.edu
Grad Student
Case Western Reserve University
[[alternative HTML version deleted]]
2008 Sep 09
1
Genmod in SAS vs. glm in R
Hello,
I have different results from these two softwares for a simple binomial GLM
problem.
>From Genmod in SAS: LogLikelihood=-4.75, coeff(intercept)=-3.59,
coeff(x)=0.95
>From glm in R: LogLikelihood=-0.94, coeff(intercept)=-3.99, coeff(x)=1.36
Is there anyone tell me what I did wrong?
Here are the code and results,
1) SAS Genmod:
% r: # of failure
% k: size of a risk set
data
2008 Feb 20
2
Data frame with 0 rows.
For reasons best known only to myself ( :-) ) I wish to create a data
frame with 0 rows and 9 columns.
The best I've been able to come up with is:
junk <- as.data.frame(matrix(0,nrow=0,ncol=9))
Is there a sexier way?
cheers,
Rolf
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
2013 Nov 28
2
Find the prediction or the fitted values for an lm model
Hi,
I would like to fit my data with a 4th order polynomial. Now I have only
5 data point, I should have a polynomial that exactly pass the five point
Then I would like to compute the "fitted" or "predict" value with a
relatively large x dataset. How can I do it?
BTW, I thought the model "prodfn" should pass by (0,0), but I just
wonder why the const is