Hello,
at the Rgui command line I can easily remove a term from a fitted lm
object, like
fit - lm(y~x1+x2+x3, data=myData)
update(fit, .~.-x1)
However, I would like to do this in a function with term given as string, like
removeTerm - function(linModel, termName) { ??? }
removeTerm(fit, x1)
)
removeTerm4(fit, x1)
removeTerm5(fit, x1)
Any help appreciated,
kind regards,
Karsten Weinert
2009/11/15 David Winsemius dwinsem...@comcast.net:
You need to review:
?update
?update.formula
?as.formula
The way should be clear at that point. If not, then include a reproducible
data example
Thanks Duncan and David
for opening my eyes :-). It took quite a while but I think I learned a
lot about lm today. I used your advice to produce added variable
plots as mentioned here [1], [2]. I would bet someone did it in R
already (may leverage.plot in car) but it was worth doing it myself.
Hello,
recently I read about the SweaveListingUtils package and now I want to try
it out. However, I can not make it work...
Below a minimal example. The problem seems to be the following line
(generated by SweaveListingPreparations()?):
Hello group,
recently I read about the SweaveListingUtils package and now I would like to
try it out. However I can not make it run...
Below is a minimal example. The problem seems the following line, generated
by the package:
Hello group,
recently I read about the SweaveListingUtils package and now I would
like to try it out. However I can not make it run...
Below is a minimal example. The problem seems the following line,
generated by the package:
Hello,
my dataset is already aggregated: I have two categorical variables, say
continent and country and one non-negative metric variable population.
Now I would like to produce a mosaic plot which uses population to
determine how large each area of the plot is.
In other words, I fail to find out
show the console?
Any hint appreciated,
Karsten Weinert.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
show the console?
Any hint appreciated,
Karsten Weinert.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
9 matches
Mail list logo