search for: togersen

Displaying 19 results from an estimated 19 matches for "togersen".

2007 Sep 07
1
contourplot lines, text, and mtext
If I have a contourplot (in the lattice package) and I want to add straight lines to it, how do I do this? I see that there are llines() and lsegement() functions for lattice plots, but they don't seem to do anything in this case: library(lattice) library(KernSmooth) x=rnorm(10000) y=x+rnorm(x,0,.5) a=bkde2D(cbind(x,y),.7) z=as.vector(a$fhat) grid=expand.grid(x=a$x1,y=a$x2) grid$z=z
2007 Feb 23
2
Extracting a subset from a dataframe
Good day everyone, Can anyone suggest an effective method to solve the following problem: I have 2 dataframes D1 and D2 as follows: D1: dates ws wc pwc 2005-10-19:12:00 10.8 80 81 2005-10-20:12:00 12.3 5 15 2005-10-21:15:00 12.3 3 15 2005-10-22:15:00 11.3 13 95 2005-10-23:12:00 12.3 13 2 2005-10-24:15:00 10.3 2 95 2005-10-25:15:00 10.3 2 2 D2:
2007 Oct 24
2
analytical solution to Sum of binominal distributed random numbers?
...; Frede Aakmann T?gersen > Scientist > > > UNIVERSITY OF AARHUS > Faculty of Agricultural Sciences > Dept. of Genetics and Biotechnology > Blichers All? 20, P.O. BOX 50 > DK-8830 Tjele > > Phone: +45 8999 1900 > Direct: +45 8999 1878 > > E-mail: FredeA.Togersen at agrsci.dk > Web: http://www.agrsci.org > > This email may contain information that is confidential. > Any use or publication of this email without written permission from Faculty of Agricultural Sciences is not allowed. > If you are not the intended recipient, please notif...
2007 Jul 05
1
getting values from arrays using which()
Dear R-Help, I have an array 1260x1260, upper triangle consisting of numbers between 0 and 100, and lower triangle all NA. I can extract the index of those values say above 99 using the following code: which(myArray>=99 , ind.arr=T) which returns: row col 5475 252 253 45423 764 765 46902 777 778 34146 611 962 50681 1220 1221 Now I would like to if poss print the actual value
2007 Aug 04
2
Problems using "lm" in combination with "predict"
Hello everybody, I'm trying to predict a linear regression model but it does not work. My Model: y = Worktime + Vacation + Illnes + Bankholidays My modelmatrix is of dimension 28x4 Then I want to make use of the function predict because there confidence.intervals are include. My idea was: mod <- lm(y~Worktime+Vacation+Illnes+Bankholidays) newdate=data.frame(x=c(324,123,0.9,0.1))
2008 Feb 15
1
How to estimate the parameters of differential equations from data
Hello list I have a theoretical differential equation model (two coupled differential equations) describing the acidification of dairy cultures in milk: dX/dt = f(H, param)*X dH/dt = g(param)*dX/dt pH = -log10(H) I also have actual data of the same. I would like to estimate the parameters of the theoretical model from real data, but don't know how to go about it in R (I'm fairly new
2006 Jan 31
0
lattice: combining panel.xyplot with panel.abline - is thispossible?
...ata' is I have used 'dat'. Best regards Frede Aakmann T??gersen Scientist Danish Institute of Agricultural Sciences Research Centre Foulum Dept. of Genetics and Biotechnology Blichers All?? 20, P.O. BOX 50 DK-8830 Tjele Phone: +45 8999 1900 Direct: +45 8999 1878 E-mail: FredeA.Togersen at agrsci.dk Web: http://www.agrsci.org This email may contain information that is confidential. Any use or publication of this email without written permission from DIAS is not allowed. If you are not the intended recipient, please notify DIAS immediately and delete this email. >...
2007 Nov 12
2
how to randomize a vector
I have a vector whose length is nearly 70 thousand. I need randomize it for 1000 times . for randomizing , I mean ,the elements of the vector remain intact while their order in the vector get changed randomly. I have written a function which seems to be able to solve short vectors , but waste a lot of time when dealing with the the long vector mentioned above. -- View this message in context:
2007 Aug 07
2
R and excell differences in calculation F distributionfunction
R-help, I'm trying to work out the density function by doing: > df(5.22245, 3, 22) [1] 0.005896862 > df(15.20675, 6, 4) [1] 0.001223825 In excell the result is : 0.0071060464 <*> FDIST(5.22245,3,22) 0.0100001406 <--> FDIST(15.20675,6,4) >From my point of view the differences in the second case are substantial. Can anyone give me a hint on this? Thanks in
2007 Sep 28
0
transparency of one layer in multiple wireframe plot
...you get a two color pic of these layers - and what I'm actually looking for is making just the UPPER (toplayer) transparent. Thanks for further help marc -------- Original-Nachricht -------- > Datum: Thu, 27 Sep 2007 11:29:19 +0200 > Von: "Frede Aakmann T?gersen" <FredeA.Togersen at agrsci.dk> > An: "marcg" <mdgi at gmx.ch>, r-help at stat.math.ethz.ch > Betreff: SV: [R] different colors for two wireframes in same plot > You can obtain some transparency setting the alpha transparency. This is > device dependent though. Using the pdf device yo...
2007 Sep 10
1
lattice panel.lmline problem
I am wanting to generate panels showing scatterplots with the linear fitted line for two groups within each panel superimposed. I have two conditioning factors, "variable" and "Group" and I want separate panels for each level of "variable" with different symbols and "lmline"s for each level of "Group". However all observations for a group are
2007 Nov 11
4
Largest N Values Efficiently?
What is the most efficient alternative to x[order(x)][1:n] where length(x)>>n? I also need the positions of the mins/maxs perhaps by preserving names. Thanks for any suggestions. -- View this message in context: http://www.nabble.com/Largest-N-Values-Efficiently--tf4788033.html#a13697535 Sent from the R help mailing list archive at Nabble.com.
2007 Aug 23
1
nls() and numerical integration (e.g. integrate()) working together?
Dear List-Members, since 3 weeks I have been heavily working on reproducing the results of an economic paper. The method there uses the numerical solution of an integral within nonlinear least squares. Within the integrand there is also some parameter to estimate. Is that in the end possible to implement in R [Originally it was done in GAUSS]? I'm nearly into giving up. I constucted an
2006 Feb 21
2
indexing within panels in xyplot
Dear R-helpers, I need to show a linear fit through a subset of the data within each combination of levels of two factors. So I prepared an xyplot with different panels for each level of one of the factors, and different symbols within each panel for the levels of the second factor. My problem is selecting the subset of each combination through which the line should be fit for subsequent
2007 Oct 29
1
meaning of lenwrk value in adapt function
R-listers, In using the adapt function, I am getting the following warning: Ifail=2, lenwrk was too small. -- fix adapt() ! Check the returned relerr! in: adapt(ndim = 2, lower = lower.limit, upper = upper.limit, functn = pr.set, Would someone explain what the 'lenwrk' value indicates in order to help diagnose this issue. Also, what are the possible codes for Ifail, so I can set
2007 Nov 27
4
if condition and for cycles
I have two questions about R: 1) Does anyone knows why I get the plots but not the summary results of the linear fitting when I run this code? When I run it outside the if condition it works fine. if (op==4) { t=1:length(time(SeaIce)) fitlinear=lm(SeaIce~t) windows() plot.ts(SeaIce) lines(ts(fitlinear$fitted.values,start=1979,frequency=12)) summary(fitlinear)
2007 Sep 27
3
different colors for two wireframes in same plot
Hello R, According to: g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- log((g$x^g$g + g$y^2) * g$gr) wireframe(z ~ x * y, data = g, groups = gr, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE, screen = list(z = 30, x = -60)) i have two wireframes in one plot. How could i change the color of the top - one to transparent (or only the grid).
2006 Aug 26
5
Type II and III sum of square in Anova (R, car package)
Hello everybody, I have some questions on ANOVA in general and on ANOVA in R particularly. I am not Statistician, therefore I would be very appreciated if you answer it in a simple way. 1. First of all, more general question. Standard anova() function for lm() or aov() models in R implements Type I sum of squares (sequential), which is not well suited for unbalanced ANOVA. Therefore it is better
2006 Mar 09
0
When calling external C-function repeatedly I get differentresults; can't figure out why..
Not an expert in programming either, but to me it seems like you've forgotten to initialize the variable "tr". It just picks up garbage from allocated memory previously initialized by other processes. Med venlig hilsen Frede Aakmann T?gersen > -----Oprindelig meddelelse----- > Fra: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] P?