search for: malmro

Displaying 11 results from an estimated 11 matches for "malmro".

Did you mean: malmros
2008 Jan 07
3
Polynomial fitting
...der how one in R can fit a 3rd degree polynomial to some data? Say the data is: y <- c(15.51, 12.44, 31.5, 21.5, 17.89, 27.09, 15.02, 13.43, 18.18, 11.32) x <- seq(3.75, 6, 0.25) And resulting degrees of polynomial are: 5.8007 -91.6339 472.1726 -774.2584 THanks in advance! -- Jonas Malmros Stockholm University Stockholm, Sweden
2009 Nov 08
3
MCMC gradually slows down
...s that it gradually slows down. It is very fast in the beginning, but slows down and gets very slow as you reach about 50000 iterations and I need do to plenty more. I know there are more fancy MCMC routines available, but I am really just interested in this to work. Thank you for your help, Jens Malmros
2008 Mar 19
3
How to remove double for loop?
...ask. Could someone show me, given the following example of a double for loop, how this could be done? It is much easier to learn by examples. Val <- matrix(0, nrow=n+1, ncol=n+1) for( i in 0:n){ for(j in 0:i){ Val[j+1, i+1] <- u^j*d^(i-j) } } Thank you in advance! -- Jonas Malmros
2007 Dec 17
3
Cannot grasp how to apply "by" here...
...- dn : length of 'dimnames' [1] not equal to array extent" I used browser() and I see that the Name is not assigned to the row name of vector and then dim(x)[1] does not work. What am I doing wrong? Do not understand. :-( Thank you in advance for your help. Regards, JM -- Jonas Malmros Stockholm University Stockholm, Sweden
2008 Mar 19
3
How to remove double loop?
...r loop as it is, is there a more efficient way to program the double loop part now that OVal is used within the function itself? It is pretty easy to write for loops, but it is very hard to write computationally optimal code. :-( Could you please help me with the above one, if possible? -- Jonas Malmros Stockholm University Stockholm, Sweden
2007 Nov 13
1
Cleaning database: grep()? apply()?
...involve grep(), and 2 and 3 would involve apply family of functions, but I cannot get my mind around the actual code to perform this adjustments. I am new to R, I do write code but usually it consists of for-functions and plotting. I would much appreciate your help. Thank you in advance! -- Jonas Malmros Stockholm University Stockholm, Sweden
2007 Oct 27
3
How to make own function load automatically on startup
....xls", this is because another package I load masks read.xls function and :: help me to select correct read.xls. I guessed this use of :: but I would really like to know what :: is and where can I read more about this function? Thank you very much in advance for your time and help! -- Jonas Malmros Stockholm University Stockholm, Sweden
2007 Dec 17
1
How to create a mixed col.names?
...tor 1" "Factor 2" "Sign Factor 2" "Factor 3" "Sign Factor 3" How can I automate the creation of such a mixed vector? I tried with rep but did not succeed. Could someone please suggest a solution to this problem? Thanks in advance! Regards, JM -- Jonas Malmros Stockholm University Stockholm, Sweden
2007 Oct 31
1
textplot() in gplots causes problems (0x9)
...labels = object, adj = c(0, : font width unknown for character 0x9 8: In text.default(x = xpos, y = ypos, labels = object, adj = c(0, : font width unknown for character 0x9 This is a tab character that causes problems, I guess. Is there any way to solve this? Thank you in advance -- Jonas Malmros Stockholm University Stockholm, Sweden
2007 Oct 26
1
glm with Student t for error distribution
...uld I proceed to fit glm with Student t? I know that Student t is the Inverse Gamma with shape parameter equal to degrees of freedom (=4). Would it be correct then to specify Gamma family and inverse link in the glm function? Thank you for your help. Jonas M. University of Stockholm -- Jonas Malmros Stockholm University Stockholm, Sweden
2007 Dec 20
1
Computing normal conf.intervals
...ne knows? Also, I wonder if there is a function similar to Matlab's "flipud". Obviously there is package "matlab" which has this function, but I wonder if I can turn a matrix upside-down without loading matlab package. Thanks for your help in advance! Best, JM -- Jonas Malmros Stockholm University Stockholm, Sweden