similar to: R: x-y data

Displaying 20 results from an estimated 30000 matches similar to: "R: x-y data"

2007 Jun 07
2
Nonlinear Regression
Hello I followed the example in page 59, chapter 11 of the 'Introduction to R' manual. I entered my own x,y data. I used the least squares. My function has 5 parameters: p[1], p[2], p[3], p[4], p[5]. I plotted the x-y data. Then I used lines(spline(xfit,yfit)) to overlay best curves on the data while changing the parameters. My question is how do I calculate the residual sum of squares.
2011 Jun 17
2
Non-linear Regression best-fit line
I am trying to fit a curve to a cumulative mortality curve (logistic) where y is the cumulative proportion of mortalities, and t is the time in hours (see below). Asym. at 0 and 1 > y [1] 0.00000000 0.04853859 0.08303777 0.15201970 0.40995074 0.46444992 0.62862069 0.95885057 1.00000000 [10] 1.00000000 1.00000000 > t [1] 0 13 20 24 37 42 48 61 72 86 90 I tried to find starting values for
2008 Aug 24
1
Extracting formula from an lm object
I want to extra the part of the formula not including the response variable from an lm object. For example if the lm object ABx.lm was created by the call ABx.lm <- lm( y ~ A + B + x, ...) Then ACx.lm is saved as part of a workspace. I wish to extract "~ A + B + x". Later in my code I will fit another linear model of the form z ~ A + B + x for some other response variable z. I
2011 Sep 22
3
How make a x,y dataset from a formula based entry
Hello all, So I am using the (formula entry) method for randomForests: randomForest(y~x1+x2+...+x39+x40,data=xxx,...) but the issue is that some of the items in that package dont take a formula entry - you have to explicitly state the y and x vector: randomForest(x=xxx[,c('x1','x2',...,'x40')],y=xxx[,'y'],...) Now my question is whether there is a function/way
2010 Aug 16
1
Changing latitude data to decimal degrees
Hi All, I have location data set up as degrees: minutes: seconds (for example, 122:45:45) I need to get this data into decimal degree form (eg, 122.7625). I know that I need to use the formula: Decimal degrees = Degrees + (Minutes/60) + (Seconds/3600) Does anyone know how I can get R to do this? The original data is all in one column (called 'lat') and the degrees, mins and secs
2007 Aug 28
7
Excel
A common process when data is obtained in an Excel spreadsheet is to save the spreadsheet as a .csv file then read it into R. Experienced users might have learned to be wary of dates (as I have) but possibly have not experienced what just happened to me. I thought I might just share it with r-help as a cautionary tale. I received an Excel file giving patient details. Each patient had an ID
2012 Jan 21
1
Function for multiple t tests
Hi, I want to run t.test() for several variables among two groups, and I would like to skip the tedious process of collecting information to assemble a table, but I am not sure if the function I want already exists. Any suggestion would be appreciated. I have a working example, as required by the posting guide: my_swiss = swiss[-1,] my_swiss$facto = rep(1:2,nrow(my_swiss)/2)
2010 Oct 31
1
biglm: how it handles large data set?
I am trying to figure out why 'biglm' can handle large data set... According to the R document - "biglm creates a linear model object that uses only p^2 memory for p variables. It can be updated with more data using update. This allows linear regression on data sets larger than memory." After reading the source code below? I still could not figure out how 'update'
2018 May 01
4
Re: Create qcow2 v3 volumes via libvirt
I have been using internal snapshots on production qcow2 images for a couple of years, admittedly as infrequently as possible with one exception and that exception has had multiple snapshots taken and removed using virt-manager's GUI. I was unaware of this: > There are some technical downsides to > internal snapshots IIUC, such as inability to free the space used by the > internal
2003 Mar 26
2
predict (PR#2685)
There is a bug in `predict' whereby the order of variables sometimes gets re-arranged compared to the original fit, and then disaster results. Specifically, the 'variables' and 'predvars' attributes of a 'terms' object get out of synch. This only happens when the terms in the original formula get re-ordered during fitting: test> scrunge.data_ data.frame(
2003 Dec 15
1
nls arguments
Hi all, I've got a problem with the nls function. I have an adjustment which works when I fix one of the argument of my function (Xo=150) : *Xo*=150 f<- function (tt*,Xo*,a,b) ifelse(tt<*Xo*,a*exp(-b**Xo*),a*exp(-b*tt)) ajust<-nls(RER~f(tt,*Xo*,a,b),data=data.frame(tt=Ph2[,2*k],RER=Ph2[,2*k+1]),start=list(a=0.5,b=0.014)) But, when I use it as a "normal" parameter (and
2006 Mar 09
1
bugs in simtest (PR#8670)
# R for Windows will not send your bug report automatically. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs at r-project.org # ###################################################### This report is joint from Richard Heiberger <rmh at temple.edu> and Burt Holland <bholland at temple.edu>. Burt Holland is the coauthor
2010 Apr 16
6
bwplot puts the bars in the wrong place
Dear R-Help, With the attached data set, I am still getting incorrect bwplots > xyplot(gdf$tt~gdf$OnHour |gdf$Runway, data=gdf) # Is correct > bwplot(gdf$tt~gdf$OnHour |gdf$Runway, data=gdf, horizontal=FALSE) # Puts the boxes on the wrong x-axis values # look especially at 0 and 3. How do I fix this? What is happening? Thanks, Jim Rome
2011 Oct 19
2
How to call a function defined within another function
Dear R-users, I would need some advices on the proper way to call a particular function. This function is called scope.char and it is embedded in the step.gam function from the gam package. I am trying to call scope.char directly in a script but I did not find the proper way to do so. Is this even possible? If so, what is the proper syntax? Thank you for your time and help. Sebastien
2005 Mar 29
1
improved pairs.formula?
Dear all, I would like to suggest changing the pairs.formula command such that a command like pairs(GNP ~ . - Year - GNP.deflator, longley) would behave in a similar fashion as lm(GNP ~ . - Year - GNP.deflator, longley) i.e., make a pairwise scatterplot of GNP and all other variables in the (longley) dataframe except for Year and GNP.deflator. The above command, with the
2011 Oct 17
3
Extracting results from a function output
Hello, I am having hard time obtaining a value from a function. "fit" is a survival function that produces some results, such as "median", "confidence intervals" etc. But str() function does not list these values. How can I extract these to be able use them? For example, I need "median" value for the group DrugA which is 48. "Print" function does
2009 Mar 07
2
ttest in R
Dear list, i am a biologist who needs to do some ttest between disease and non disease, sex, genotype and the serum levels of proteins on a large number of individuals. i have been using excel for a long time but it is very tedious and time consuming. i am posting the data below and ask your help in generating a code to get this analysis done in R. thanks gender disease genotype data M N CC
2006 Nov 08
10
axis command and excel time format
Hi to all, I have some problems to get the times-scale to the x-axis the times are coming from an excel sheet f. e [1] "0:01:00" "0:02:00" "0:03:00" "0:04:00" "0:05:00" "0:06:00" "0:07:00" [8] "0:08:00" "0:09:00" "0:10:00" "0:11:00" "0:12:00" "0:13:00"
2007 Oct 08
3
tcltk scrollbar
The following code should give me (at least that's what I think) two list boxes with their individual scrollbars. But instead both scrollbars stick to the same listbox even though they work as they should (scroll individual listboxes). When I remove all the widgets on top everything works perfectly. Any help would be highly apprecciated. ps: all subsequent listboxes and scrollbars work
1999 Aug 30
3
model.matrix()
Hi, In R I get the following: > x <- 1:9 > f <- as.factor(1:9) > i <- model.matrix(~x+f) > > attr(i, "assign") [1] 0 1 2 2 2 2 2 2 2 2 whereas in S I get the following: > attr(i, "assign") $"(Intercept)": [1] 1 $x: [1] 2 $f: [1] 3 4 5 6 7 8 9 10 Has anybody written a model.matrix function to get the same result as S?