I am not sure if this is appropriate here, my apologies if not. I have
used R for 20 years now and need help with non-linear regression analysis
over 100's of different frequencies and my data has exceeded by R program
capabilities.
My company would provide the contract.
keith
M. Keith Cox, Ph.
Hi all, I have three columns. Resistance, Time and Frequency, and I need to
find correlations between Resistance and Time by each of 100 Frequencies.
I have set Frequencies to be a factor. Time is in the format "%m/%d/%Y
%H:%M:%S", but correlations dont seem to like Time data.
I can run this code
I am having problems making a correlation/association between two variables
by a factor.
In the case below, I need to know the correlation between R and Day at each
frequency (a1-a5). Each frequency would have a corresponding correlation
between R and day.
I have found a lm function that is simil
Hello all, I did not attach data as this is probably simple answer that I
cannot find.
I am collecting daily data and would like to plot the data by week but now
that we are into the new year, my plots started over with 01 after the last
week of the year. How can I continuously keep adding weeks
Hello all, I have used describeBy to generate the following summary
statistics. I simply need x and y error bars on a plot that has CQN
(xaxis) and Price (yaxis). There should be four total points on the graph
(one for each supplier).
Using "error.crosses(desc$CQN, desc$Price)" does not work.
Hello all, I have used describeBy to generate the following summary
statistics. I simply need x and y error bars on a plot that has CQN
(xaxis) and Price (yaxis). There should be four total points on the graph
(one for each supplier).
Using "error.crosses(desc$CQN, desc$Price)" does not work.
Got it. During a read.csv I used stringsAsFactors=FALSE
M. Keith Cox, Ph.D.
Principal
MKConsulting
17105 Glacier Hwy
Juneau, AK 99801
U.S. 907.957.4606
On Wed, Oct 21, 2015 at 10:31 AM, Marlin Keith Cox
wrote:
> I do not have a dataset to share as I do not believe it needs it and I am
&g
I do not have a dataset to share as I do not believe it needs it and I am
not sure I could reproduce easily.
I have a column of numerical data (Days) and another of a a measurement
(Resistance). After subsetting, I do a linear regression of the two, and
it reorders the day (x axis) into some other
Hi all, this is a reoccurring theme in my programming and I need some help
with it. When I use a built in function and need to use it on a subset of
my data frame, I always end up using the subset function first, but this
seems very clunky. For example, if I have years 2003:2013 with season "a"
a
A simplified ask is: when I use the time series plot function, R treats
each time on 9/19/13 as an individual day, when clearly it isn't.
Thank you ahead of time. Keith
ts(chum)
with(chum,plot.ts(Time,PA))
Chum<-
Time PA 9/18/13 18:29 16 9/19/13 13:29 14 9/19/13 16:29 13.2 9/19/13
17:29
I am using a gam for a model predictor and need to forecast into the future
based off data collected earlier. I would like to predict fish weight on
day 10 from measures taken on a fish from day 2. This seems simple, but
using predict, I have only been able to predict weight for a given day. A
s
Hello all, I have a time series defined by
chum$Time1<-as.POSIXlt(chum$Time, format= "%m/%d/%y %H:%M")
and a measured parameter
pa.s
When I create a linear model
with(chum.skin, lm(Time1~pa.s))
I get the following error.
Error in model.frame.default(formula = Time1 ~ pa.s, drop.unused.levels
Hello all, I frequently use R, but recently have switched to a mac. When
creating a new graphic, I have used X11() for a new graphics window and
have always (when I used my PC) have been able to copy or print from this
graphic window. With my mac, it does not allow me to copy or print.
Having mu
I was unable to find an answer to my problem. I would like to label
the y axis of a plot with a rate and would like to use a dot (•)
rather than a multiplication sign (x).
ylab = quote(Speed~(cmxsec^2))
Thanks in advance.
keith
--
M. Keith Cox, Ph.D.
Alaska NOAA Fisheries, National Marine
:
>
> co <- coef(llm)
> bord <- pmin(y, co[1] + co[2] * x)
> plot(x,y)
> polygon(c(x, x[length(x)]), c(bord, bord[1]), col = 'red')
> abline(co)
>
> HTH,
> Dennis
>
> On Mon, Mar 14, 2011 at 4:02 PM, Marlin Keith Cox
> wrote:
>
>>
Hi,
I would like to add a color under a lm line and not the plotted line. Is
this possible? In the example, I do not want the area under the curve red,
but rather under the llm line.
x=seq(0,5,len=100)
y=-(x-5)^2
llm<-lm(y~x)
plot(x,y)
polygon(c(x,x[length(x)]), c(y, y[1]), col='red')
abline(ll
When using a wireframe, I need to move the colorkey from the "right"
position (default0 towards the plot. I have also needed to adjust the
height and used the code
colorkey=list(T,space='right',height=.5)
I have looked at documents (within levelplot) but cannot find a way to
move the colorkey ot
This data are kilojoules of energy that are consumed in starving fish over a
time period (Days). The KJ reach a lower asymptote and level off and I
would like to use a non-linear plot to show this leveling off. The data are
noisy and the sample sizes not the largest. I have tried selfstarting
we
e-12),trace=TRUE)
> summary(model)
>
> As always, thank you...keith
>
>
>
>
> On Fri, Aug 27, 2010 at 10:59 AM, Peter Ehlers wrote:
>
>> Just a small fix to my solution; inserted below.
>>
>>
>> On 2010-08-27 3:51, Peter Ehlers wrote:
>>
-Peter Ehlers
>
>
>
>> (which will often give the converged values). You can
>> follow up with
>>
>> fm <- nls(Level ~ Asym-Drop*exp(-exp(lrc)*Time^pwr), start = init)
>>
>> -Peter Ehlers
>>
>>
>>> kc
>>> On Thu, Aug 26, 20
know how to do this, seek further statistical help.
>
> --
> Bert Gunter
> Genentech Nonclinical Statistics
>
>
> >
> > The data originally posted was an example of one of the curves
> experienced.
> >
> > kc
> >
> > On Thu, Aug 26, 20
10 at 1:42 PM, David Winsemius wrote:
>
> On Aug 26, 2010, at 5:20 PM, Marlin Keith Cox wrote:
>
> The background you requested are energetic level (joules) in a group of
> starved fish over a time period of 45 days. Weekly, fish (n=5) were removed
> killed and measured for
:48 AM, David Winsemius wrote:
>
> On Aug 26, 2010, at 1:35 PM, Marlin Keith Cox wrote:
>
> I need the parameters estimated for a non-linear equation, an example of
>> the
>> data is below.
>>
>>
>> # rm(list=ls())I really wish people would add
I need the parameters estimated for a non-linear equation, an example of the
data is below.
rm(list=ls())
Time<-c( 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4,
4, 4, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8)
Level<-c( 100, 110, 90, 95, 87, 60, 65, 61, 55, 57, 40, 41, 50,
47,
44, 44, 42,
I need the simple function for the following set of data. This is a toy
version of my data, but the error is persistent in both. To compare with
excel, I would just 1) format trendline, 2) display equation and
R-squared on chart.
I obviously tried to use a nls and wanted to use the self startup
I need to hide scatter points and just leave the linear regression
line. I have tried to color the points "white", but that does not
work.
A working example, I need the green plotted points to be transparent or hidden.
x2 <- seq(1,200,.5)
y2 <- seq(5,204,.5)
plot(x2, y2, pch=16, col="green")
mod
I need grayscale formatting for a wireframe.
The only col.regions that I can find are color palettes are all colored:
rainbow(n, s = 1, v = 1, start = 0, end = max(1,n - 1)/n,
gamma = 1, alpha = 1)
heat.colors(n, alpha = 1)
terrain.colors(n, alpha = 1)
topo.colors(n, alpha = 1)
cm.colors(n, al
I need a two sample t.test between M and F. The data are arranged in one
column, x. Cant seem to figure how to run a two sample t.test. Not really
sure what this output is giving me, but there should be no difference
between M and F in the example, but summary p-value indicates this.
How can I
OK, this is very elementary, but I need help. I have looked in Verzani,
past postings etc.
Problem: I need to subtract the "length" date between "h4" and "a3" #which
would be 4-1
I would rather not convert the two columns into four columns (with headings
being "a3","a4","c4","h4").
DF <- data
otting symbols and ``Tanks'' has *four* distinct
> values, this is somewhat mysterious.
>
> If you would just tell us what you are actually trying to *do* we would
> probably be able to tell you how to do it.
>
>cheers,
>
>
gt;
> c(2,19,21)[Tanks]
> with(daily.sub1,c(2,19,21)[Tanks])
>
> Avoid attach and use with which is a temporary attach that won't be subject
> to that problem.
>
> --jeff
>
> On 2/2/2010 11:51 AM, Marlin Keith Cox wrote:
>
>> Here is a runable program. Wh
Here is a runable program. When I plot Day and Wgt, it graphs all the data
points. All I need is daily.sub1 plotted. I also need each "Tanks" to have
its own col or pch. When I run it with the line with pch, it gives me
nothing.
rm(list=ls())
Trial<-rep(c(1,2),each=12)
Tanks=rep(c("a3","a4","c
OK, I need help plotting. I have column headings of Day, Wgt, Foodin, Rep,
Grp and Tanks. Rep=c(1,2,3) and Tanks=c(a1,a2,a3,a4,a5,a6,
c1,c2,c3,c4,c5,c6, h1,h2,h3,h4,h5,h6).
I created a subset where I only would like Rep=2, and Tanks=c(a4,c4,h4) and
would like to graph (points) of Wgt and Day. I
2
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Marlin Keith Cox
> Sent: Friday, January 22, 2010 4:37 PM
> To: r-help@r-project.org
> Subject: [R] first and second derivative calculation
>
> I wo
I would like to calculate a first and second derivative and am having
problems finding a simple solution. My syntax may be off as I am not a
mathematician, so pardon ahead of time.
data:
t<-seq(0,4, by=.1)
The function is:
H(t) = t^3-6*t^2+5*t + 30
from here I plot the curve:
plot(x,y ,xlab="x-va
I would like to create a point plot with the following two sets of points:
#1 plot(Day,Total) and #2 (Day,cons_hat). Total is the actual value seen
and cons-hat is a predicted value. If possible, I do not want to stack them
as they are quite long. (FYI, I did use the reshape on a previous post,
I have a data set with four columns and need to make boxplots from them.
Data is as follows:
tank TanksTotal cons_hat
1aa4 5.651017 5.59
2aa5 5.017499 5.29
3aa6 4.894238 4.69
4cc4 3.986347 3.40
5cc5 4.099442 3.58
6cc6 4.15052
Hi all and thanks in advance.
I am regressing Time and Weight, and then predicting Weight at
different Time. The format of the Time data is day/month/year. How
can I get R to use time series data such as this?
Keith
--
M. Keith Cox, Ph.D.
Alaska NOAA Fisheries, National Marine Fisheries Servi
I posted this earlier, but am not certain that it was in fact posted, so I
will try again.
Hi, I have an equation Xcp and would like to look at errors affecting it. I
am applying errors of -.58 to .1 to R and -.45 to .47 to Xc. I would like
to look at all combinations. I set up a matrix functio
Hi, I have an equation Xcp and would like to look at errors affecting it. I
am applying errors of -.58 to .1 to R and -.45 to .47 to Xc. I would like
to look at all combinations. I set up a matrix function as follows and it
does not work. On the last line, when it run, it does not seem like the
Hello, hopefully simple question, but I cannot find the answer. I need to
change the color from the standard default. Still want the scaled colors,
but need different colors for different graphs.
Code is:
wireframe(z ~ y*x, mat.df,
drape = TRUE,
zlab = list("Water mass error
Hello, hopefully simple question, but I cannot find the answer. I need to
change the color from the standard default. Still want the scaled colors,
but need different colors for different graphs.
Code is:
wireframe(z ~ y*x, mat.df,
drape = TRUE,
zlab = list("Water mass error
Hello, hopefully simple question, but I cannot find the answer. I need to
change the color from the standard default. Still want the scaled colors,
but need different colors for different graphs.
Code is:
wireframe(z ~ y*x, mat.df,
drape = TRUE,
zlab = list("Water mass error
I have long axis labels (8units) on the x axis and 2 unit number labels on
the y axis. I need to move the x axis title without moving the y axis
title. I have used mgp=c(title, label and line), but mgp moves both the x
and y titles. The following puts the y axis title way way out to the left.
An
I have re-labeled tick marks on the x axis. The problem is that by using
axes=FALSE, the axes disappears and when they are called back using
axis(side=1)..etc. the axis on sides 1 and 2 do not meet at the bottom left
corner of the graph. I would also like to have the 3rd and 4th axes in
there as
R users,
This should be simple, but I cannot figure it out. I import test.csv, then
create a subset for "brook_dis". When I plot (week, R) I get a nice
boxplot, but along the x axis, there are weeks a, b, c along with h and nh.
Thank you ahead of time. keith
rm(list=ls())
cond.exp1<-read.csv("
create a subset for "brook_dis". When I plot (week, R) I get a nice
boxplot, but along the x axis, there are weeks a, b, c along with h and
nh.
Thank you ahead of time. keith
rm(list=ls())
cond.exp1<-read.csv("condition/test.csv",header=TRUE)
sub<-subset(cond.exp1, Species=="brook_d
Thank you ahead of time for help with this.
I have two matrices
X
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 660 693.00 726.0 759.00 792.0 825.00
[2,] 548 575.40 602.8 630.20 657.6 685.00
[3,] 676 709.80 743.6 777.40 811.2 845.00
[4,] 763 801.15 839.3 877.45 915.6 953.75
[5,] 768 80
Matt, I know you are probably busy with work, but I cannot help buy asking
you these R questions. If it is bothersome, please let me know and I will
stick with the R help... but
I have two matrices
X
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 660 693.00 726.0 759.00 792.0 825.00
[2,] 548
3.453*Z+1.994
pred.est1 <- predict.lm(model.lm, data.frame(Rs=Z))
pred.est
pred.est1
detach(z)
detach(sen)
On Sat, Feb 16, 2008 at 2:10 AM, Uwe Ligges <[EMAIL PROTECTED]>
wrote:
>
>
> Marlin Keith Cox wrote:
> > Z is a matrix and when I run the following line, it creates a pred
Dear R Users, close to the end of this I used wireframe to create a 3D plot
from a matrix. The x and y axis tick labels (1-6) for each were created
from the matrix being a 6X6 matrix. I need the axis tick labels to be the
row and column headings which you can see in the output (mat.x). I have
tri
Z is a matrix and when I run the following line, it creates a prediction
estimate using each column, how can I get it an estimate for each individual
number. I have tried changing Z to a data.frame, but this does not do it
either.
model.lm<-lm(w~x)
pred.est <- predict.lm(model.lm, data.frame(x=Z
52 matches
Mail list logo