similar to: multi dimensional optim problem

Displaying 20 results from an estimated 200 matches similar to: "multi dimensional optim problem"

2011 Jul 30
3
ifelse returns
Greetings R Community, I am working with the ifelse function and it is returning something unexpected. In the code the line with the MODE1 assignment the output is a vector [1] 4 5 6 but when I put the MODE1 object into the ifelse function [R}'s output for MODE1 is the first number from the string (4). Why is this? Given the supplied vector of x I would assume both the MODE1 and ifelse()
2003 Jun 23
2
Summary for mode of a data set
Dear R People: thank you for the many helpful sets of code that I received!!! I combined several of the concepts for the following function: > mode1 function(x) { y <- rle(sort(x)) z <- y$values[y$lengths==max(y$lengths)] return(z) } > xm [1] 22 15 10 30 25 26 2 17 28 2 24 6 26 24 5 22 20 14 > mode1(xm) [1] 2 22 24 26 > This will pick
2006 Oct 21
2
problem with mode of marginal distriubtion of rdirichlet{gtools}
Hi all, I have a problem using rdirichlet{gtools}. For Dir( a1, a2, ..., a_n), its mode can be found at $( a_i -1)/ ( \sum_{i}a_i - n)$; The means are $a_i / (\sum_{i} a_i ) $; I tried to study the above properties using rdirichlet from gtools. The code are: ############## library(gtools) alpha = c(1,3,9) #totoal=13 mean.expect = c(1/13, 3/13, 9/13) mode.expect = c(0, 2/10, 8/10) #
2010 Sep 24
1
Solving equations involving gamma functions
Hi, I want to find a value of n1. I used the following code but I am getting the error - Error in as.vector(x, mode) : cannot coerce type 'closure' to vector of type 'any' n=10 a_g<-(1/(n*(n-1)))*((pi/3)*(n+1)+(2*sqrt(3)*(n-2))-4*n+6) a_s<-function(n1) { t1=(n1-1)/2; (t1*(gamma(t1)/gamma(n1/2))^2)/2-1-a_g } xm<-solve(a_s) Can anyone help me out. Thanks in
2005 Dec 01
1
Simulate Correlated data from complex sample
Dear List: I have created some code to simulate data from a complex sample where 5000 students are nested in 50 schools. My code returns a dataframe with a variable representing student achievement at a single time point. My actual code for creating this is below. What I would like to do is generate a second column of data that is correlated with the first at .8 and has the same means within
2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
Adapt to the API changes in the newer versions of the Zend framework, in particular regarding: - strings handling - resources handling (used for the guestfs_h pointer) - iterating in hash maps - data types for function arguments Introduce helper macros to reduce greatly the amount of #if's all around the generated C code. --- generator/php.ml | 96
2008 Feb 15
2
Softmax in nnet
Hi R help, I run my data in nnet with skip layer, factor response (with 0 & 1 values) and explicitly put softmax=T to compare the result of the default nnet with no softmax specification. I assume this should give me the same result. I got the result the default one, but not the softmax version and I got the error message that I did not quite understand. test6.nn.skipT.softm.Yfac <-
2003 Jun 23
0
A final global mode function
>From spencer.graves at PDF.COM Mon Jun 23 14:36:45 2003 Received: from postal.pdf.com (pdf193.pdf.com [209.128.81.193]) by uhddx01.dt.uh.edu (8.9.2/8.9.2) with ESMTP id OAA09671 for <hodgess at uhddx01.dt.uh.edu>; Mon, 23 Jun 2003 14:36:44 -0500 (CDT) Received: from postage.pdf.com (postage.pdf.com [10.10.8.7]) by postal.pdf.com (Switch-3.0.4/Switch-3.0.0) with ESMTP id
2007 Jul 14
0
ts model challenge (transfer function)
Dear useRs, I am trying to model a time series with a transfer function. I think it can be put into the ARMA framework, and estimated with the 'arima' function (and others have made similar comments on this list). I have tried to do that, but the results have so far been disappointing. Maybe I am trying to make 'arima' do something it can't... The data are time series of
2001 Aug 24
3
statistical mode function
Hello R-users, I am aware that this is a very basic question, but still... Since mode() function is reserved for something else, is there a function to calculate statistical mode for a vector or a matrxi? i.e. mode.function(c(1,2,2,2,3,3))=2 Thanks in advance, Elena Moltchanova Elena MOLTCHANOVA IIASA International Institute for Applied Systems Analysis A-2361 Laxenburg, Austria E-Mail:
2010 Oct 09
1
question related to multiple regression
Hi, I am conducting an association analysis of genotype and a phenotype such as cholesterol level as an outcome and the genotype as a regressor using multiple linear regression. There are 3 possibilities for the genotype AA, AG, GG. There are 5 people with the AA genotype, 100 with the AG genotype and 900 with the GG genotype. I coded GG genotype as 1, AG as 2 and AA as 3 and the p-value for the
2005 Feb 08
1
Toying with neural networks
Hello all, Ive been playing with nnet (package 'nnet') and Ive come across this problem. nnet doesnt seems to like to have more than 1000 weights. If I do: > data(iris) > names(iris)[5] <- "species" > net <- nnet(species ~ ., data=iris, size=124, maxit=10) # weights: 995 initial value 309.342009 iter 10 value 21.668435 final value 21.668435 stopped after 10
2011 Jan 03
1
Greetings. I have a question with mixed beta regression model in nlme.
*Dear R-help: My name is Rodrigo and I have a question with nlme package in R to fit a mixed beta regression model. The details of the model are: Suppose that:* *j in {1, ..., J}* *(level 1)* *i in {1, ..., n_j}* *(level 2)* *y_{ij} ~ Beta(mu_{ij} * phi_{ij}; (1 - mu_{ij}) * phi_{ij}) y_{ij} = mu_{ij} + w_{ij} * *with* *logit(mu_{ij}) = Beta_{0i} + Beta_{1i} * x1_{ij} + b2 * x2_{ij}
2011 Jan 03
0
Greetings. I have a question with mixed beta regression model in nlme (corrected version).
*Dear R-help: My name is Rodrigo and I have a question with nlme package in R to fit a mixed beta regression model. I'm so sorry. In the last email, I forgot to say that W is also a unknown parameter in the mixed beta regression model. In any case, here I send you the correct formulation. ** Suppose that:* *j in {1, ..., J}* *(level 1)* *i in {1, ..., n_j}* *(level 2)* *y_{ij} ~
2012 Jun 28
0
How to calculate Confidence Interval for a prediction using Partial Regression?
Dear all, I have two highly correlated variables (y and x), and both of them depend on a third variable (A, for Area). Multiple regression (y=a+(b*x)+(c*A)) would have collinearity problems, so I decided to do a partial regression to predict y. I did it this way: - I regressed y to A, and calculated the residuals (e_y) (reg1) - I regressed x to A, and calculated the residuals (e_x) (reg2)
2013 Oct 29
3
Ayuda con Mice con polyreg
Saludo gente, antes que nada gracias por la ayuda que puedan aportarme, soy iniciante en R, estoy usando el paquete Mice para realizar imputaciones múltiples sobre variables en su mayoría categóricas. El problema está que cuando expresó este comando imp <- mice(dataset,method="polr",maxit=1) donde el dataset es un data.frame me tirá este error : iter imp variable 1 1 pial1a
2008 Oct 15
4
a really simple question on polynomial multiplication
Dear R people: Is there a way to perform simple polynomial multiplication; that is, something like (x - 3) * (x + 3) = x^2 - 9, please? I looked in poly and polyroot and expression. There used to be a package that had this, maybe? thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at
2012 Jun 26
1
Error in mice
Hi all, I am imputing missingness of  90 columns  in a  data frame using mice. But "mice" gives back :  Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE,  :   too many (1100) weights Any idea to solve this error is welcome, Anera [[alternative HTML version deleted]]
2010 Jul 14
1
Changing model parameters in the mi package
I am trying to use the mi package to impute data, but am running into problems with the functions it calls. For instance, I am trying to impute a categorical variable called "min.func." The mi() function calls the mi.categorical() function to deal with this variable, which in turn calls the nnet.default() function, and passes it a fixed parameter MaxNWts=1500. However, as
2010 Jan 13
2
Bonding modes
I have a bonded interface running in mode 1 which is active/passive and no issue with this. I need to change it to mode 0 for active/active setup. Does mode 0 is dependent on the switches configuration? My setup is: 2 links from bonded interface is connected to different switches. When I change to mode0 from mode1 , bond0 is not coming up. These are the steps I performed 1) changed to options