similar to: Plot a line according to a specified equation

Displaying 20 results from an estimated 7000 matches similar to: "Plot a line according to a specified equation"

2008 Oct 13
2
Subset based on items in a list.
R-help: I have a variable ("ID_list") containing about 1800 unique numbers, and a 143066x29 data frame. One of the columns ("ID") in my data frame contains a list of ids, many of which appear more than once. I'd like to find the subset of my data frame for which "ID" matches one of the numbers in "ID_list." I'm pretty sure I could write a function
2007 Aug 08
1
simulation-binomial
hello, i want to do a binomial simulation, by taking 200 var. from one group (x) and 300 from another (y). the prob. for disease=.6 in both groups. x <- rbinom(200, 1, .6) y <- rbinom(300, 1, .6) if the person is from group x - the probability to find the disease, assuming the person is sick, is .95, if he is from group Y its .80. i want to know the joint probability: p(the person has the
2007 Mar 26
1
data-frame adding/deleting column
Hallo, I have got an existing data frame and want to add a new column. The existing data frame was created like this: > df <- rbind( c("Fred", "Mary", 4), c("Fred", "Mary", 7), + c("Fred", "Mary", 9), c("Barney", "Liz", 3), + c("Barney", "Liz", 5) ) > df
2012 Apr 27
1
Wrap names.arg text in barplot
Hello! Does anyone know of a handy way to wrap the names.arg text in a barplot? I'm creating a bar plot with rather long labels; I can adjust the margins, but I'd also like to have the text wrap to about 4cm. Thanks! Kyle H. Ambert Doctoral Candidate, Bioinformatics Oregon Health & Science University ambertk@gmail.com [[alternative HTML version deleted]]
2007 Aug 03
3
question about logistic models (AIC)
Een ingesloten tekst met niet-gespecificeerde tekenset is van het bericht gescrubt ... Naam: niet beschikbaar Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070803/79b6292b/attachment.pl
2007 Aug 07
3
saving output
I have a question about how to save the output of a logistic regression model in some format (delimited, preferably) so that I can manipulate it to make nice tables in excel. I have tried print, save, write, none seem to do what I want them to. Does anyone have any ideas? Lynn D. Disney, Ph.D., J.D., M.P.H. Research Analyst SEIU 1199 1771 E. 30th Street Cleveland, Ohio 44114 Telephone:
2007 May 18
3
{10,20,30}>={25,30,15}
Hi There, Using t.test to test hypothesis about which one is greater, A or B? where A={10,20,30},B={25,30,15}. My question is which of the following conclusions is right? #################hypothesis testing 1 h0: A greater than or equal to B h1: A less than B below is splus code A=c(10,20,30) B=c(25,30,15) t.test(c(10,20,30),c(25,30,15),alternative="less") output: p-value=0.3359
2007 Jul 31
5
extract columns of a matrix/data frame
Hello all, I have a matrix whose column names look like a1 a2 b1 b2 b3 c1 c2 1 2 3 7 1 3 2 4 6 7 8 1 4 3 Now, I can have any number of a's. not just two as shown above and same goes for b's and c's. I need to extract all the a's columns and put them in another matrix, extract all b's columns and put them in some matrix
2007 Apr 09
1
Repeated Measures design using lme
Hi, I have what I believe is a repeated-measures dataset that I'm trying to analyze using lme(). This is *not* homework, but an exercise in my trying to self-teach myself repeated-measure ANOVA for other *real* datasets that I have and that are extremely similar to the following design. I'm fairly sure the dataset described below would work with lme() -- but it'd be great if anybody
2007 Mar 26
0
Sphericity and post-hoc analysis in a repeated-measure ANOVA
Does anyone have any suggestions for how to test for violation of the sphericity assumption and apply the Huynh-Feldt correction to a repeated-measure model? My model follows the format below: Rep.anova=aov(Y~X1*X2+Error(Subject/(X1*X2),data=DataFile)) I've already looked at the explanations aov() and Error() in Baron's “Notes on the use of R for psychology experiments and
2005 Nov 09
1
strategies to obtain convergence using nlme
Hello. I am working on an analysis involving the nonlinear mixed model function (nlme) in R. The data consist of measures of carbon fixation by leaves as a function of light intensity and the parametric function (standard in this area because it has a biological interpretation) is a non-rectangular hyperbola. I cannot get the nonlinear mixed model (nlme) function to converge cleanly. I am
2007 Jul 31
2
choosing between Poisson regression models: no interactions vs. interactions
R gurus, I'm working on data analysis for a small project. My response variable is total vines per tree (median = 0, mean = 1.65, min = 0, max = 24). My predictors are two categorical variables (four sites and four species) and one continuous (tree diameter at breast height (DBH)). The main question I'm attempting to answer is whether or not the species identity of a tree has
2007 May 21
3
quartz() on MAC OSX
I am (desperately) trying to get used to using a Mac here at my new location. (Why *anyone* would ever use anything other than Linux, except under duress as I am, totally escapes me, but that's another story.) Fortunately much of the Mac OSX is actually Unix, so a civilized person can manage to carry on ... But there are some things. (Like this <expletive deleted> mailer ... But
2011 Jun 15
1
Print the summary of a model to file
Hi there, I am having a strange problem. I am running nls on some data. #data x <- -(1:100)/10 y <- 100 + 10 * (exp(-x / 2) Using nls I fit an exponential model to this data and get a great fit summary(fit) Formula: wcorr ~ (Y0 + a * exp(m1 * -dist/100)) Parameters: Estimate Std. Error t value Pr(>|t|) Y0 -0.0001821 0.0002886 -0.631 0.528 a 0.1669675 0.0015223
2010 Jan 25
2
(no subject)
Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11111111',100000),rep('22222222',200000),rep('33333333',300000),rep('44444444',400000)) orig.unique <- unique(orig) system.time(df <- as.data.frame(sapply(orig.unique, function(x) ifelse(orig==x, 1, 0))))
2013 Apr 08
1
fitting a hyperbola to data points
Hi, I am new to R, and I suspect I am missing something simple. I have a data set that performance data that correlates request rate to response times http://pastebin.com/Xhg0RaUp There is some jitter in the data, but mostly it looks like a hockey puck curve. It does not get converted into a straight line when I tried log conversions, so it does not seem to be a
2008 Sep 20
1
fitting a hyperbole
I have got a data set that is Gross Primary Productivity ~ Total Suspended Solids it is a hyperbola just like: plot(1/c(1:1000)) how do I model this relationship so that I can get all of the neat things that lm gives residuals etc. etc. so that I can see if my eyeball model stands up. Thanks for any help, pointers, or good things to read. -- Stephen Sefick Research Scientist Southeastern
2010 Jan 26
3
Graph color
Hi all I want to apply different colors on a simple plot: If I type par(br="gray") before a plot it puts all the image in gray but (imagine I run a simple plot) want to let the centrall box (where the dots are plotted) in white or image in lightblue. Can anyone guide me to apply this second step (make the box where the series are plotted in different colours). Thanks in advance.
2004 Dec 29
1
Question about setting tick mark limits in Plot
Dear R-list, I am having trouble getting the Plot function to set the tick marks the way I want, and I am not sure what I am doing wrong. Below is the code that I wrote, and I am not sure why it doesn't work. p is a vector of length 2198, containing numbers between 0 and 240. q is a vector of ones, the same length as p. I want the x-axis to have tick marks every 30 min and I want the
2004 Apr 01
1
nls function
Hello. I am trying to fit a non-rectangular hyperbola function to data of photosynthetic rate vs. light intensity. There are 4 parameters that have to be estimated. I find the nls function very difficult to use because it often fails to converge and then gives out cryptic error messages. I have tried playing with the control parameters but this does not always help. Is there another