Perhaps something like this:
X = jitter(1:10)
Y = jitter(3*X-5, factor = 3)
X[3] = NA
m = lm(Y~X)$fitted.values
fits <- rep(NA, length(X)); fits[as.numeric(names(m))] <- m;
cbind(X,Y,fits)
Michael
On Tue, Nov 1, 2011 at 8:52 AM, Johannes Radinger wrote:
> Hi,
>
> I have got a dataset with
> t
Hi,
I have got a dataset with
the variables Y,X1,X2,X3.
Some of these variables contain NAs. Therefore
incomplete datasets aren't recognized when
I am doing a regression like:
model <- lm(Y~X1+X2+X3)
so the resulting vector of resid(model) is
obviousely shorter then the original variables.
How
2 matches
Mail list logo