similar to: about fitting a regression line

Displaying 20 results from an estimated 10000 matches similar to: "about fitting a regression line"

2017 Jun 14
0
about fitting a regression line
Start with the lm() function; i.e., see ?lm -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 6/14/17, 3:40 PM, "R-help on behalf of lily li" <r-help-bounces at r-project.org on behalf of chocold12 at gmail.com> wrote: Hi R users, I have some data points (Xi, Yi), and they may follow such a
2017 Jun 14
3
about fitting a regression line
Thanks. I thought lm() function is for linear model, such as the correlation below: Y= aX + b On Wed, Jun 14, 2017 at 5:25 PM, MacQueen, Don <macqueen1 at llnl.gov> wrote: > Start with the lm() function; i.e., see > > ?lm > > -Don > > -- > Don MacQueen > > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 >
2017 Jun 15
3
about fitting a regression line
Thanks for your replies. I tried the regression, but then got a NA value for the slope. And here is the error message: Coefficients: (1 not defined because of singularities) On Thu, Jun 15, 2017 at 12:20 AM, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hi > > But X can be some function like - sin, cos, log, exp... > > Cheers > Petr > > > -----Original
2017 Jun 15
0
about fitting a regression line
Hi But X can be some function like - sin, cos, log, exp... Cheers Petr > -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of lily li > Sent: Thursday, June 15, 2017 1:28 AM > To: MacQueen, Don <macqueen1 at llnl.gov> > Cc: R mailing list <r-help at r-project.org> > Subject: Re: [R] about fitting a regression line >
2017 Dec 15
2
Errors in reading in txt files
I use the method, df$Time = as.POSIXct(df$Time), but it has the warning message: Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format On Thu, Dec 14, 2017 at 1:31 PM, MacQueen, Don <macqueen1 at llnl.gov> wrote: > In addition to which, I would recommend > > df <- read.table("DATAM", header = TRUE, fill = TRUE, >
2017 Dec 14
3
Errors in reading in txt files
On Thu, Dec 14, 2017 at 1:58 PM, Berend Hasselman <bhh at xs4all.nl> wrote: > >> On 14 Dec 2017, at 19:36, lily li <chocold12 at gmail.com> wrote: >> >> Hi R users, >> >> I have a question about reading from text files. The file has the structure >> below: >> >> Time Column1 Column2 >>
2017 Dec 14
0
Errors in reading in txt files
In addition to which, I would recommend df <- read.table("DATAM", header = TRUE, fill = TRUE, stringsAsFactors=FALSE) and then converting the Time column to POSIXct date-time values using as.POSIXct() specifying the format using formatting codes found in ?strptime because the times are not in the POSIXct default format. This example might indicate the idea: >
2013 May 16
2
R looping help
Hey I'm not really sure what I should put on here, but I am having trouble with my R code. I am trying to get the p-values, R^2s etc for a number of different groups of variables that are all in one dataset. This is the code: #Stand counter st<-1 #Collections stands<-numeric(67) slopes<-numeric(67) intercepts<-numeric(67) mses<-numeric(67) rsquares<-numeric(67)
2014 Sep 08
2
Problem with order() and I()
I have found that order() fails in a rather arcane circumstance, as in this example: > foo <- I( c('x','\265g') ) > order(foo) Error in if (xi > xj) 1L else -1L : missing value where TRUE/FALSE needed > foo <-c('x','\265g') > order(foo) [1] 1 2 > sessionInfo() R version 3.1.1 (2014-07-10) Platform: x86_64-apple-darwin13.1.0 (64-bit)
2010 Jan 13
3
Ask for histogram
Hi, I use a vector of data to draw the histogram, but it is different from the graph by SAS. Can you check it for me please? b is a column vector of 4332 hist(b,probability=T,breaks=30,col='lightblue',ylim=c(0,1)) rug(b) When I used rug, I find the records are smaller than 4332. I don't know where I did wrong. Thanks. -- Yi Du [[alternative HTML version deleted]]
2017 Jun 20
5
fitting cosine curve
Hi R users, I have a question about fitting a cosine curve. I don't know how to set the approximate starting values. Besides, does the method work for sine curve as well? Thanks. Part of the dataset is in the following: y=c(16.82, 16.72, 16.63, 16.47, 16.84, 16.25, 16.15, 16.83, 17.41, 17.67, 17.62, 17.81, 17.91, 17.85, 17.70, 17.67, 17.45, 17.58, 16.99, 17.10) t=c(7, 37, 58, 79, 96,
2017 Jun 20
0
fitting cosine curve
Hi lily, You can get fairly good starting values just by eyeballing the curves: plot(y) lines(supsmu(1:20,y)) lines(0.6*cos((1:20)/3+0.6*pi)+17.2) Jim On Wed, Jun 21, 2017 at 9:17 AM, lily li <chocold12 at gmail.com> wrote: > Hi R users, > > I have a question about fitting a cosine curve. I don't know how to set the > approximate starting values. Besides, does the method
2012 Nov 01
4
Loop over several variables
Hey everybody, I am looking for a way to loop commands over several variables in a dataframe. Basically I want to do something like this: ti1<-aggregate(dataframename$y1, by=data.frame(dataframename$aggregationvar), sum,na.rm=TRUE) This works fine as it is but i want to do it for several variables thereby generating several tix. I tried with a for-loop but the
2018 Jun 01
2
Time-series moving average question
You are right that there are no NAs in the practice data. But there are NAs in the moving average data. To see this, break your work into two separate steps, like this: tnr.ma <- ma(dat3[1:28], order=3) TNR_moving_average <- forecast(tnr.ma, h=8) I think you will find that the warning comes from the second step. Print tnr.ma and you will see some NAs. -Don -- Don MacQueen Lawrence
2017 Aug 06
2
about saving format
In the lower right panel of R-studio interface, there is the "Export" button. I saved as PDF from there directly, rather than using functions On Sat, Aug 5, 2017 at 6:18 PM, Ismail SEZEN <sezenismail at gmail.com> wrote: > > > On 6 Aug 2017, at 03:01, lily li <chocold12 at gmail.com> wrote: > > > > I am using the plot() function, but have a problem.
2018 Mar 08
3
add single points to a level plot
Hi all, I'm trying to add single points with known coordinates to a level plot, but could not find the proper answer. I got to know that layer() function is good for this, but I don't know which package is related to this function. The source is here: https://stackoverflow.com/questions/28597149/add-xy-points-to-raster-map-generated-by-levelplot but my question is a little different as I
2018 Jan 16
2
Steps to create spatial plots
Hi Bert, I think you are correct that I can use levelplot, but I have a question about converting data. For example, the statement: levelplot(Z~X*Y), Z is row-wise from the lower left corner to the upper right corner. My dataset just have gridded Z data as a txt file (or can be called matrix?), how to convert them to the vector in order for levelplot to use? Thanks. On Mon, Jan 15, 2018 at 6:04
2017 Jul 16
2
About doing figures
Hi Jim, For true color, I meant that the points in the figure do not correspond to the values from the dataframe. Also, why to use rainbow(9) here? And the legend is straight in the middle, is it possible to reformat it to the very bottom? Thanks again. On Sun, Jul 16, 2017 at 2:50 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi lily, > As I have no idea of what the "true
2013 Sep 09
1
windowing
Is there a package or a command that does window aggregation like select sum(col1) over (partition by col2, col3 order by col4 rows between unbounded preceding and current row) as sum1 from table1 ; the above is Netezza syntax, but Postgre has same capability. Stephen B [[alternative HTML version deleted]]
2017 Aug 06
2
about saving format
If the OP is using RStudio and not using R (i.e. pdf()) directly, it sounds like this query should be directed to RStudio support, not here. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Aug 5, 2017 at 5:54 PM, Ismail