Displaying 20 results from an estimated 10000 matches similar to: "lm output"
2009 Jun 11
2
Optimization Question
Hi All
Apologies if this is not the correct list for this question.
The Rglpk package offers the following example in its documentation
library(Rglpk)
## Simple mixed integer linear program.
## maximize: 3 x_1 + 1 x_2 + 3 x_3
## subject to: -1 x_1 + 2 x_2 + x_3 <= 4
## 4 x_2 - 3 x_3 <= 2
## x_1 - 3 x_2 + 2 x_3 <= 3
## x_1, x_3 are non-negative integers
## x_2 is a non-negative real
2011 May 26
2
zoo column names
I have a zoo object that contains 2 time series named "A-B" and "V1".
When I create a third series "V2", the name of the "A-B" series is changed
to "A.B".
Although I could recreate the names for the 3 series I am wondering if there
is a way of preventing the name change from happening ( ... maybe an
equivalent of the keep.names=TRUE statement
2012 Mar 01
2
Problems downloading file
I am running the following line to download data from the US Energy
Information Administration. This function has worked successfully for me in
the past but yesterday gave the error/warning messages below.
If I simply type "http://ir.eia.gov/wpsr/psw09.xls" (no quotes) into a
browser, the file is available to download.
I am running R 2.13.0 on Windows XP.
# Download File Attempt
2007 Dec 06
2
Segmented regression
Hello all,
I have 3 time series (tt) that I've fitted segmented regression models
to, with 3 breakpoints that are common to all, using code below
(requires segmented package). However I wish to specifiy a zero
coefficient, a priori, for the last segment of the KW series (green)
only. Is this possible to do with segmented? If not, could someone point
in a direction?
The final goal is to
2012 Dec 07
1
how to add a column from another dataset with "merge"
kiotoqq wrote
> I want to add a shorter column to my dataset with the function "merge",
> it
> should be filled with NAs wo be as long as the other colums, like this:
>
> id age
> 9 46
> 8 56
> 6 52
> 5 NA
> 4 NA
> 3 NA
> 1 NA
>
> i did this:
> pa1 <- merge(pa1, an1, by="mergeid")
>
> and it says
2011 Dec 22
2
Renaming Within A Function
I am trying to rename column names in a dataframe within a function. I am
seeing an error (listed below) that I don't understand.
Would be grateful of an explanation of what I am doing wrong and how I
should rewrite the function to allow me to be able to rename my variables.
Thanks.
# Test Function
myfunc <-function(var){
d = c(1,2,3,4,5)
dts =
2011 Jan 15
2
Rounding variables in a data frame
Hi All
I am trying to use the round function on some columns of a dataframe while
leaving others unchanged. I wish to specify those columns to leave
unchanged.
My attempt is below - here, I would like the column d3 to be left but
columns d1, d2 and d4 to be rounded to 0 decimal places. I would welcome any
suggestions for a nicer way of doing this.
d1= rnorm(10,10)
d2= rnorm(10,6)
d3=
2009 Jul 09
0
RExcel/ RCom
Hi All
Apologies if this is not the correct mailing list for this question.
I have installed RExcel and RCom from CRAN. R is indicating that I need
an additional file/package "statconnDCOM" from rcom.univie.ac.at
I have been trying to access this website over the last 2 days be it
appears to be down.
Does anyone know when this site is likely to be back up and/or know of
an
2009 Nov 09
0
ARIMA, xreg and intercepts
David Stoffer describes some challenges with R's output when fitting
ARIMA models for different orders (see Issue 2 at
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm). R doesn't fit an
intercept in the model if there is any differencing. David describes a
workaround using the xreg parameter to force R to calculate an
intercept.
Assume I have a variable y and 3 explanatory variables a,
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] <- ???lmNNDens???
2007 Nov 18
3
Linear Regression with lm Forcing the Slope to Equal 1
Is there a way to do a linear regression with lm (having one predictor
variable) and constrain the slope of the line to equal 1?
Tom
--
View this message in context: http://www.nabble.com/Linear-Regression-with-lm-Forcing-the-Slope-to-Equal-1-tf4828804.html#a13815432
Sent from the R help mailing list archive at Nabble.com.
2008 Jul 17
1
Newbie's question about lm
Hello,
I would like to fit data with the following formula :
y=V*(1+alpha*(x-25))
where y and x are my data, V is a constant and alpha is the slope I'm
looking for.
How to translate this into R-language ?
At the moment, I only know : lm(y ~ x)
Sorry for such a basic question. I thought I could find the solution in a
post but I have to confess that, up to know, I'm not able to understand
2002 Oct 03
2
lm fitting with a specified slope
Is there an easy way to do a linear model with an a priori known slope?
In essence, I want to minimize the residuals around a line of known slope.
-R
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the
2006 May 19
1
Weird LM behaviour
Dear R users,
experimenting with the lm function in R, I've encountered some
behaviour I don't understand with my limited knowledge of regression.
I made a data-'set' of three measurements (see syntax below). Using
lm (linear model) to fit the regression-line, I expected to find an
intercept of 2.0 and a slope of 0, but in fact the slope is slightly
below zero. Amazed by
2007 Aug 07
1
lm( ) for log10-transformed data
Dear help-list,
I would like to perform a linear regression on the log10 of the two
vectors ov.mag.min and res.600nm. The slope and intercept of the
regression I use to plot a wider range of ov.mag.min in a double log plot.
For a linear regression on only tow points, wouldn't I expect the
results for two.points.min to match pretty exactly res.600nm? It does
not seem to be the case here.
2002 Nov 22
3
simple test on slope of lm()
Hello
I want to compare the slope (let's say 'b') of a linear model obtained
with lm() to a theoretical value (let's say 'th').
To do so, I think I should compute a 't value' using
something like :
(b - 'th')/standard.deviation(b)
and then look at the p-value of this computed t.
I don't understand how to do this in a simple way, just using lm()
2010 Apr 15
2
Summarization
Hi All
I have a vector x containing 2 levels
x = c(1,1,1,0,0,0,0,1,1,0,0,0,1,1,0)
I would like to derive the following summarization
Level Count
1 3
0 4
1 2
0 3
1 2
0 1
I have generated an inelegant solution using lags and loops but feel sure
that there must be a better approach. If anyone has any thoughts I would be
very grateful if you would share them.
Thanks and best regards
Pete
--
2000 Oct 09
4
lm question
I have not really used lm before and I was hoping for some help on a
simple problem.
Here is a toy version of the problem I want to solve.
y x grp
-.9 1 a
-.8 2 a
-.7 3 a
-.7 1.5 b
-.5 2.5 b
-.3 3.5 b
-.19 2.7 c
-.11 3.7 c
-.41 4.7 c
I want to fit a model that has one y-intercept and three slopes, one for
2002 May 21
3
how to extrac one coef from lm at a time
Hello R-Users,
I have I simple question that I could not solve:
How to extract the elevation and the slope values from a linear model (lm)
separately?
coef(model.lm) gives both of them.
Thanks,
Antonio Olinto
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2011 Sep 28
2
apply lm function to dataset split by two variables
Dear all,
I am not fluent in R and am struggling to 1) apply a lm to a weight-size
dataset, thus the model has to run separately for each species, each
year; 2) extract coefs, r-squared, n, etc. The data look like this:
year sps cm w
2009 50 16 22
2009 50 17 42
2009 50 18 45
2009 51 15 45
2009 51 16 53
2009 51 17 73
2010 50 15 22
2010 50 16 41
2010 50 16 21
2010