Displaying 20 results from an estimated 2000 matches similar to: "Search for the minimum of a fitted curve"
2012 Nov 14
1
R wildcards, sapply and as.factor
I want to change the type to factor of all variables in a data frame whose names match a certain pattern.
So here I am trying to change the type to factor of all variables whose name begins with?namestub?in the dataframe?df.
attach(df)sapply(grep(glob2rx("namestub*"),names(df)),as.factor)
But this doesn't work since
>levels(df$namestub1)NULL
2005 Nov 09
8
Element-by-element multiplication operator?
Is there an element-by-element multiplication in R, like the .* operator in Matlab?
eg: A (2x3)
B (2x3)
C=A.*B
C (2x3)
C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]]
I can't find one...
Thanks
-Mike Gates
2009 May 19
4
nlrwr package. Error when fitting the optimal Box-Cox transformation with two variables
Dear all:
I'm trying to fit the optimal Box-Cox
transformation related to nls (see the code
below) for the demand of money data in Green (3th
Edition) but in the last step R gives the next
error message.
Error en
`[.data.frame`(eval(object$data), ,
as.character(formula(object)[[2]])[2]) :
undefined columns selected.
?Any idea to solve the problem?
Thanks in advance,
2007 Mar 10
3
long character string problem
Hi All
I am having 2 very long character strings (550chars) and I want to put them as
expressions together with c(). The problem is that I also get these
double-quotes, as seen below in 'fct'. How can I remove these double-quotes? I
tried as.name() but it did not work (because of size?). These are creating
trouble with subsequent programs, which I tested with strings that for some
2008 Jun 23
3
Simulating Gaussian Mixture Models
Hi,
Is there any package that I can use to simulate the Gaussian
Mixture Model , which is a mixture modeling method that is widely used
in statistical learning theory.
I know there is a mclust, however, I think it is a little bit
different from my problem.
Thanks very much..
regards.
--------------------------
Peng Jiang
??
Ph.D. Candidate
Antai College of Economics &
2010 Jan 07
1
faster GLS code
Dear helpers,
I wrote a code which estimates a multi-equation model with generalized
least squares (GLS). I can use GLS because I know the covariance matrix of
the residuals a priori. However, it is a bit slow and I wonder if anybody
would be able to point out a way to make it faster (it is part of a bigger
code and needs to run several times).
Any suggestion would be greatly appreciated.
Carlo
2008 Nov 29
2
Reading mixed tables
Dear R buddies,
This weekend I became interested in solving Google Code Jam problems
using R. I guess R may work very well in this kind of contests but the
input of file has been a problem for me. Take this case for example
(http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtchALEghjb250ZXN0cxjRzBQM),
the files are usually of the form:
A(number of lines for group 1)
a11 a12 a13
a21
2006 Dec 31
7
zero random effect sizes with binomial lmer
I am fitting models to the responses to a questionnaire that has
seven yes/no questions (Item). For each combination of Subject and
Item, the variable Response is coded as 0 or 1.
I want to include random effects for both Subject and Item. While I
understand that the datasets are fairly small, and there are a lot of
invariant subjects, I do not understand something that is happening
2010 Apr 13
1
Lapack, determinant, multivariate normal density, solution to linear system, C language
r-devel list,
I have recently written an R package that solves a linear least squares
problem, and computes the multivariate normal density function. The bulk
of the code is written in C, with interfacing code to the BLAS and
Lapack libraries. The motivation here is speed. I ran into a problem
computing the determinant of a symmetric matrix in packed storage.
Apparently, there are no explicit
2019 Nov 28
2
Question on TBAA and optimization
TBAA Question.
Please consider the following test case.
---Snip--
struct B {
int b1;
int b2;
};
struct C {
int b1;
};
struct A {
int a1;
struct C SC;
int a2;
};
int foo1(struct A * Aptr, struct B* Bptr)
{
int *a = &Aptr->SC.b1;
*a=10;
Bptr->b1 = 11;
return *a;
}
int foo2(struct A * Aptr, struct B* Bptr)
{
Aptr->SC.b1=10;
Bptr->b1 = 11;
return
2011 Jul 20
3
Grouping columns
*Hi @ all,
I have a question concerning the possibilty of grouping the columns of a
matrix.
R groups the columns alphabetically.
What can I do to group the columns in my specifications?
The script is the following:*
> #R-Skript: Anzahl xyz
>
> #Quelldatei einlesen
> b<-read.csv2("Z:/int/xyz.csv", header=TRUE)
>
> #Teilmengen f?r die Einzeljahre generieren
>
2008 Apr 29
2
how to find the minimum
Dear friends:
I am a new R user, and not very good at statistics and maths
I find it difficult to find the minimum of this item:
((p*(b-1)-1)*(p+1)^(b-1)+1)/p^2
It seems that the method optim can find the minimum. I tried several
times , but R constanly tells that " failure to find b or p"
Would you please give some suggestions?
Thanks in advance.
Best
2011 Jun 22
1
question about read.columns
HI, Dear R community,
I have a large data set names dd.txt, the columns are: there are 2402
variables.
a1, b1, ..z1, a11, b11, ...z11, a111, b111, ..z111..
IF I dont know the relative position of the columns, but I know I need the
following variables:
var<-c(a1, c1,a11,b11,f111)
Can I use read.columns to read the data into R?
I have tried the following codes, but it does not work
2005 Dec 19
1
logrotate. Bug or am I blind?
Hello!
I having a problem with the permissions of some of my logfiles.
It seems that when the files are rotated, the user/group is root root and the permissions are rw for root only.
more info hereunder:
The strange thing is that sometimes it works for one file...
/var/log/cisco_acl.log /var/log/cisco_debug.log {
rotate 1
notifempty
#daily
size 1k
create 0640 root noc
2007 May 24
3
Problem with numerical integration and optimization with BFGS
Hi R users,
I have a couple of questions about some problems that I am facing with
regard to numerical integration and optimization of likelihood
functions. Let me provide a little background information: I am trying
to do maximum likelihood estimation of an econometric model that I have
developed recently. I estimate the parameters of the model using the
monthly US unemployment rate series
2010 Feb 04
1
Bug in as.character? (PR#14206)
A long formula which is converted using as.character, looses its last
part: ``diagonal = 1e-12)''
Shorter formula is ok though.
Best,
H??vard
************
Browse[2]> formula.str
y ~ -1 + b1 + b2 + b3 + b4 + b5 + b6 + b7 + b8 + b9 + b10 + b11 +
b12 + b13 + b14 + b15 + b16 + b17 + b18 + b19 + b20 + b21 +
b22 + b23 + b24 + b25 + b26 + b27 + b28 + b29 + b30 + b31 +
b32 +
2012 Feb 16
2
how to rbind matrices from different loops
Dear R experts,
I am having difficulty using loops productively and would like to please
ask for advice. I have a dataframe of ids and groups. I would like to
break down the dataframe into groups, find the unique sets of ids, then
reassemble. My thought was to use a loop, but I have been unable to finish
this loop in a logical way. I would like to find the unique ids for group
1, group 2,
2017 Jul 26
1
GlusterFS Fuse client hangs when coping large files
Hello,
I?m having some weird problems while coping large files (> 1GB) to a GlusterFS through a Fuse client.
When the copy is done using the cp command everything is fine, but if I use a Java program, the GlusterFS Fuse hangs.
The kern.log shows timeout for the Java program and the Fuse client.
Anyone have experienced this behavior?
Test environment:
Ubuntu 16.04.2 LTS (GNU/Linux
2009 Aug 04
3
res_speech_lumenvox.so: undefined symbol: ast_speech_register
Hi Guys
I am new working with lumenvox products, and unfortunately I had not been
able to install it properly, I follow the steps in lumenvox site and it
looks like it works I mean:
=========================================================
[root at pbx-millenium examples]# ./example 127.0.0.1
Connecting to 127.0.0.1
Interpretation 1:
8587070707
count=0, decode returns 1
Interpretation 1:
2010 Jul 27
2
Introductory statistics and introduction to R
Hi,
I have a bright, diligent second-year graduate student who wants to
learn statistics and R and will, in effect, be taking a tutorial from me
on these subjects. (If you've seen some of my questions on this list,
please don't laugh.) As an undergrad he majored in philosophy, so this
will be his first foray into computer programming and statistics.
I'm thinking of having him use