Displaying 20 results from an estimated 700 matches similar to: "Newbie question: plotting regression models"
2006 Jul 04
1
Exporting tables to RTF?
Greetings.
Yesterday I managed to jury-rig a system to get a table out of R and
import it into Nisus Writer Express (a word processor for Mac OS X).
What I came up with is brittle, since it depends on an AppleScript
script which has to be in a specific location and on no one touching
the computer, since the AppleScript remotely controls Nisus Writer
Express rather blindly and will make
2004 Sep 20
2
Getting the real names of variables within functions
Greetings.
These days I find myself writing a lot of functions to handle routine
things. One of these is a function to create a scatterplot of
variables and draw a lowessed line so I can get some idea if there's
any relationship between them.
lowessed.plot <- function(x, y)
{ plot(x, y)
lines(lowess(x, y))
}
However, there's a slight problem: the plot axes come out labeled
2004 Jul 20
5
Precision in R
Greetings.
I'm trying to recreate in R some regression models I've done in SAS,
but I'm not getting the same results. My advisor suspects this may be
due to differences in precision between R and SAS. Does anyone know
where I can find specifications for R's type double? (It doesn't seem
to be in the R Language Definition.) Thanks in advance for any help
anyone can
2002 Dec 13
2
how to get Residual Standard Error
Hi,
I use lm or loess to make smoothing. After smoothing I need "Residual
Standard Error" in my script. Could you please tell me how can I get
this information?
Thanks,
2002 Jun 26
1
Bug? (PR#1710)
Hi,
I tried to do a multiple linear model from the example
dataset Formaldehyde. However, the function lm() did not
estimate the coefficient of the term carb^2. The same
problem occurred with the (nlme)dataset Pixel with both
function lme() and lm(). I am using the windows version of
R 1.5.1
Lauri Mehtatalo
The Formaldehyde example:
> data(Formaldehyde)
>
2005 Apr 02
2
An exercise in the use of 'substitute'
I would like to create a method for the generic function "with" applied
to a class of fitted models. The method should do two things:
1. Substitute the name of the first argument for '.' throughout the
expression
2. Evaluate the modified expression using the data argument to the
fitted model as the first element of the search list.
The second part is relatively easy. The
2007 Dec 06
2
simple problems
Hello R users,
I have been looking through Help files and Nabble list for the answers for
these simple questions, but it seems to be fruitless.
1- in a data frame with two columns, x and y, how do I get the corresponding
value of x to, let's say, the minimum value of the y column (min (data$y)) ?
2- how do I solve a simple equation? Considering the equation y= exp(-x)^12,
I would like to find
2004 May 16
1
Newbie Poisson regression question
Greetings.
I'm getting started learning R, and I'm trying to reproduce some models
I've done previously in SAS. I'm trying to fit simple Poisson
regressions, and I keep getting impossible results: the models predict
negative numbers of cases for many observations. The code for the
models are:
Female.model <- glm(Observed ~ Black + Other, family =
poisson(link=log),
1997 Dec 02
1
R-alpha: NextMethod in 0.50-a4
I am encountering difficulty with NextMethod in 0.50-a4. We created a
class of groupedData objects which are data.frames with additional
attributes. The most important attribute is a formula describing
roles of some of the variables in the experimental design.
The class of such objects ends in "groupedData", "data.frame". The
print method for the groupedData class simply
1998 Feb 24
2
Representation of data in libraries
At present the example data sets in R libraries are to be given as
expressions that can be read directly into R. For example, the acid.R
file in the main library looks like
acid <- data.frame(
carb = c(0.1, 0.3, 0.5, 0.6, 0.7, 0.9),
optden = c(0.086, 0.269, 0.446, 0.538, 0.626, 0.782), row.names = paste(1:6))
This is great when you have only a few observations. I have one
example data
2000 Dec 30
0
editor in Windows doesn't like a data frame with row names (PR#797)
The editor in R version 1.2.0 returns an error after editing a data frame
that has row names. This is on a Windows 2000 system, but I've encountered
the same problem under Windows 95. Here's a simple example:
------------------------------------------------------------------------------------
R : Copyright 2000, The R Development Core Team
Version 1.2.0 (2000-12-15)
R is free
2000 Dec 31
0
editor in Windows doesn't like a data frame with row names (PR#798)
On Sun, 31 Dec 2000 jfox@mcmaster.ca wrote:
> The editor in R version 1.2.0 returns an error after editing a data frame
> that has row names. This is on a Windows 2000 system, but I've encountered
> the same problem under Windows 95. Here's a simple example:
Actually, that's not where the error is. If you use traceback() you
will see it is in edit.data.frame. That tries
2006 Mar 30
1
Laptop freezes when trying to load R packages?
Hello
I am having an R related problem and can't seem to fix it by looking at any of
the online documentation.
I have a laptop (using Windows XP home edition) and loaded R 2.2.1. I then
designated a mirror (USA-NC). But when I try to load a package, it freezes. I
have tried to close R, but it won't close; I end up having to restart the
laptop. I have no problems with any other
2003 Dec 11
1
packaging standards for rda files?
Dear everybody:
We used the fine foreign library to bring in an SPSS dataset that was
about 9 megabytes and I can squeeze it into a much smaller R object
using compression with
save(ndat, file="NatAnnES2000.rda", compress=T).
I can use load() to get the "ndat" dataframe back, that's all good as
far as I can see. If I put that file in the data subdirectory, then the
2008 Mar 06
1
Tcl/Tk not working on Mac OS X
Greetings.
Yesterday I decided to try out Rcmdr, but it refused to load. I
traced the problem to the library tcltk, which when I tried to load it
told me this:
> > library(tcltk)
> Loading Tcl/Tk interface ... Error in fun(...) :
> Can't find a usable init.tcl in the following directories:
> @TCL_IN_FRAMEWORK@ @TCL_IN_FRAMEWORK@
>
>
>
> This probably
2007 Jan 06
2
Bootstrapping Confidence Intervals for Medians
I apologize for this post. I am new to R (two days) and I have tried and tried
to calculated confidence intervals for medians. Can someone help me?
Here is my data:
institution1
0.21
0.16
0.32
0.69
1.15
0.9
0.87
0.87
0.73
The first four observations compose group 1 and observations 5 through 9 compose
group 2. I would like to create a bootstrapped 90% confidence interval on the
difference of
2001 Apr 27
3
nls question
I have a question about passing arguments to the function f that nlm
minimizes.
I have no problems if I do this:
x<-seq(0,1,.1)
y<-1.1*x + (1-1.1) + rnorm(length(x),0,.1)
fn<-function(p)
{
yhat<-p*x+(1-p)
sum((y-yhat)^2)
}
out<-nlm(fn,p=1.5,hessian=TRUE)
But I would like to define
fn<-function(x,y,p)
{
yhat<-p*x+(1-p)
sum((y-yhat)^2)
}
so
2002 Mar 08
1
Matrix multiplication problem
Dear List,
I am having trouble with some R code I have written to perform
Redundancy Analysis (RDA) on a matrix of species abundance data (Y) and
a matrix of environmental data (X).
RDA is a constrained form of PCA and can be thought of as a PCA of the
fitted values of a regression of each variable in Y on all variables in
X.
For info, the first use of RDA is in:
Rao, C.R, 1964. The use and
2010 Jan 16
2
predict.glm
Hi,
See below I reply your message for <https://stat.ethz.ch/pipermail/r-help/2008-April/160966.html>[R] predict.glm & newdata posted on Fri Apr 4 21:02:24 CEST 2008
You say it ##works fine but it does not: if you look at the length of yhat2, you will find 100 and not 200 as expected. In fact predict(reg1, data=x2) gives the same results as predict(reg1).
So I am still looking for
2012 Mar 08
1
sas retain statement in R or fitting differene equations in NLS
I wish to fit a dynamical model in R and I am running in a problem that
requires some of your wisdom to solve. For SAS users I am searching for
the equivalent of the */retain/ *statement.
For people that want to read complicated explanations to help me:
I have a system of two equations written as difference equations here.
To boil it down. I have a dataframe with three variables y, X1, X2