Displaying 20 results from an estimated 25 matches for "mymod".
2008 Sep 16
2
odesolve dynload example
...m not doubling up.
I have tried to use R cmd to create an object file from the odesolve
dynload example.
I am using windows and have just installed rtools, and have the latest
version of stable R (2..7.2).
This is what happened:
C:\Program Files\R\R-2.7.2\library\odesolve\dynload\c>Rcmd SHLIB mymod.c
making mymod.d from mymod.c
windres --preprocessor="gcc -E -xc -DRC_INVOKED" -I
C:/PROGRA~1/R/R-27~1.2/include -i mymod_res.rc -o mymod_res.o
gcc -std=gnu99 -shared -s -o mymod.dll mymod.def mymod.o mymod_res.o
-LC:/PROGRA~1/R/R-27~1.2/bin -lR
Cannot export myderivs: symbol not f...
2005 Nov 06
1
Problem defining a system of odes as a C library with lsoda
...make use of the odesolve library on my
university's Linux grid - currently R version 2.0.1 is installed and
the system runs 64-bit Scientific Linux based on Redhat. I cannot seem
to get lsoda working when I define the model as a shared C library. For
example, the following snippet uses the mymod.c example bundled with
the package:
### START
rm(list=ls())
setwd("~/projects/test_odesolve")
invisible(file.remove("mymod.o","mymod.so"))
system("R CMD SHLIB mymod.c")
dyn.load("mymod.so")
require(odesolve)
parms <- c(k1 = 0.04, k2 = 1e4, k3=...
2007 May 24
1
lme with corAR1 errors - can't find AR coefficient in output
...estimation on a random effects model with
first-order autocorrelation to make a further conditional test. My model
is much like this (which reproduces the method on the famous Grunfeld
data, for the econometricians out there it is Table 5.2 in Baltagi):
library(Ecdat)
library(nlme)
data(Grunfeld)
mymod<-lme(inv~value+capital,data=Grunfeld,random=~1|firm,correlation=co
rAR1(0,~year|firm))
Embarrassing as it may be, I can find the autoregressive parameter
('Phi', if I get it right) in the printout of summary(mymod) but I am
utterly unable to locate the corresponding element in the lme o...
2012 Mar 19
2
[LLVMdev] Python bindings in tree
...I'm not sure this is better. I might have done with separate pointer
as you have if I started from scratch today.
* Use of constructor vs "new" static methods.
When using the bindings one never initializes the class manually.
Instead a "factory" method is used:
mymod = Module.from_file(...)
mymod = Module.from_data(...)
mymod = Module.new("foo")
ity = Type.int(32)
instead of
mymod = Module(file=...)
mymod = Module(data=...)
mymod = Module(name="foo")
ity = IntType(32)
I prefer this in, especially in the cases where t...
2011 Jun 20
3
[LLVMdev] C struct as function argument
...issue with passing arguments to a function that takes a struct argument.
typedef struct _test_struct {
int x;
int y;
} test_struct;
id testLLVMStructFuncCall(test_struct x) {
NSLog(@"%d %d",x.x,x.y);
return N(x.x + x.y);
}
-(void) testLLVMStructFuncCall {
CGKModule* myMod = [CGKModule moduleWithName:@"llvm_structfunccall_test"];
CGKType* testStructType = [CGKType structTypeWithElementTypes:[NSArray arrayWithObjects:[CGKType intTypeWith32Bits],[CGKType intTypeWith32Bits],nil]];
CGKFunction* lfunc = [CGKFunction functionWithName:@"testLLVMStruct...
1997 May 06
1
R-beta: formula() and model formulae
Several bugs (no solutions, yet). These might be well known.
1) If one does, e.g., mymod <- lm(y ~ x); formula(mymod)
then one does not get back the formula (one gets, Error: invalid formula)
2) if x is of mode numeric, then the model formula
mymod <- lm(y ~ x + x^2)
is not processed as S would do it. The model is fit ignoring the x^2 term,
however mymod$call includes the...
1997 May 06
1
R-beta: formula() and model formulae
Several bugs (no solutions, yet). These might be well known.
1) If one does, e.g., mymod <- lm(y ~ x); formula(mymod)
then one does not get back the formula (one gets, Error: invalid formula)
2) if x is of mode numeric, then the model formula
mymod <- lm(y ~ x + x^2)
is not processed as S would do it. The model is fit ignoring the x^2 term,
however mymod$call includes the...
2012 Mar 21
0
[LLVMdev] Python bindings in tree
...ay to go (just as long as the automatically generated
code is easy to diff when they are regenerated).
* Use of constructor vs "new" static methods.
>
> When using the bindings one never initializes the class manually.
> Instead a "factory" method is used:
>
> mymod = Module.from_file(...)
> mymod = Module.from_data(...)
> mymod = Module.new("foo")
> ity = Type.int(32)
>
> instead of
>
> mymod = Module(file=...)
> mymod = Module(data=...)
> mymod = Module(name="foo")
> ity = IntType(32)
>
Yeah, Modu...
2012 Mar 19
0
[LLVMdev] Python bindings in tree
On 3/17/2012 4:14 PM, Anders Waldenborg wrote:
> FYI:
>
> I've also been working on new python bindings.
>
> My bindings are written using ctypes (just like the in-tree
> clang/cindex bindings). Most of Core.h is bound, and stuff from
> ExecutionEngine.h, Analysis, BitReader, BitWriter. The have fairly
> good test coverage (using nosetests). The ctypes definitions are
2012 Mar 17
3
[LLVMdev] Python bindings in tree
At Fri, 16 Mar 2012 14:12:08 +0100,
Christoph Grenz wrote:
>
> Hello,
>
> Am Donnerstag, 15. März 2012, 21:15:02 schrieb Gregory Szorc:
> > There was some talk on IRC last week about desire for Python bindings to
> > LLVM's Object.h C interface. So, I coded up some and you can now find
> > some Python bindings in trunk at bindings/python. Currently, the
>
2023 Aug 20
1
Determining Starting Values for Model Parameters in Nonlinear Regression
..., 2)
> y <- c(1.4287, 1.4426, 1.4677, 1.4774, 1.4565,
> ? ? ? ? 1.4807, 1.4279, 1.4684, 1.4301, 1.4188, 1.4157, 1.4686, 1.4414,
> ? ? ? ? 1.4172, 1.4829, 1.4291, 1.4438, 1.4068, 1.4524, 1.4183)
> mydata<-data.frame(Mixture, x1, x2, x3, y)
> mydata
> mymod <- y ~ 1/(Beta1*x1 + Beta2*x2 + Beta3*x3)
> library(nlsr)
> strt<-c(Beta1=1, Beta2=2, Beta3=3)
> trysol<-nlxb(formula=mymod, data=mydata, start=strt, trace=TRUE)
> trysol
> # or pshort(trysol)
>
>
> Output is
>
> residual sumsqua...
2005 Nov 14
0
How to exclude multiple probe patterns ?
...this case, it becomes
impractical trying to list all probe patterns except those
few you want to exclude. One way to deal with this is to
use [! to exclude certain characters. For example, if we
construct the clause below, we can exclude function
patterns with leading "xyz":
pid$target:mymod:[!x]*:entry,
pid$target:mymod:[x][!y]*:entry,
pid$target:mymod:[x][y][!z]*:entry
{
}
>From this example, we know it is possible to exclude single
pattern. But, to me, it becomes a puzzle if we want to
exclude multiple patterns such as excluding additional
pattern with leading "abc"....
2004 Aug 19
3
List dimention labels to plots of components
...ale",16)
Sex[sex==0]<-"Female"
Dose<-rep("High",16)
Dose[dose==0]<-"Low"
Treatment<-rep("A",16)
Treatment[treatment==0]<-"B"
dat<-data.frame(Sex,Dose,Treatment,fix,Response)
# Redundant Transfer and Execution of Dimension ID?
mymod<-function(x){
model<-lm(Response~Sex,data=x)
list(model,Dose=x$Dose[1],Treatment=x$Treatment[1])}
myplt<-function(x){
plot(x[[1]],main=paste(x$Dose,"/",x$Treatment,sep=""))}
# Generate list of Model Estimates
dat.lm<-by(dat,list(Dose=dat$Dose,Treatment=dat$Tr...
2023 Aug 19
1
Determining Starting Values for Model Parameters in Nonlinear Regression
..., 2,
> 3, 3, 0, 2)
> y <- c(1.4287, 1.4426, 1.4677, 1.4774, 1.4565,
> 1.4807, 1.4279, 1.4684, 1.4301, 1.4188, 1.4157, 1.4686, 1.4414,
> 1.4172, 1.4829, 1.4291, 1.4438, 1.4068, 1.4524, 1.4183)
> mydata<-data.frame(Mixture, x1, x2, x3, y)
> mydata
> mymod <- y ~ 1/(Beta1*x1 + Beta2*x2 + Beta3*x3)
> library(nlsr)
> strt<-c(Beta1=1, Beta2=2, Beta3=3)
> trysol<-nlxb(formula=mymod, data=mydata, start=strt, trace=TRUE)
> trysol
> # or pshort(trysol)
>
>
> Output is
>
> residual sumsquares = 1.5412e-05 on 20 obser...
2011 Oct 25
1
regression using GMM for mulltiple groups
Inthe code below I was trying to to obtain the GMM estimates for CAPM
(REGRESSION) for 36 stocks each have 180 observations,however it only gives
me one output rather than 36.
In SAS i would just put in a *By statement*. I have a variable TICKER that
categorize them into 36 groups.
*How can I obtain all 36 output instead of just one.*
**
1998 Jun 03
1
R-beta: anova.glm is broken with offsets
...anova code will jump in.
If one fits a glm model with an offset, the NULL deviance is incorrectly
calculated (it is calculated without the offset). The means one can get
examples where the model deviance is greater than the NULL deviance.
Here is some example output, (without the data).
> mymod <-glm(cens ~ group, family=poisson,offset=log(time))
> anova(mymod)
Analysis of Deviance Table
Model: poisson, link: log
Response: cens
Terms added sequentially (first to last)
Df Deviance Resid. Df Resid. Dev
NULL 41 20.19
group 1 -17.83...
1998 Jun 03
1
R-beta: anova.glm is broken with offsets
...anova code will jump in.
If one fits a glm model with an offset, the NULL deviance is incorrectly
calculated (it is calculated without the offset). The means one can get
examples where the model deviance is greater than the NULL deviance.
Here is some example output, (without the data).
> mymod <-glm(cens ~ group, family=poisson,offset=log(time))
> anova(mymod)
Analysis of Deviance Table
Model: poisson, link: log
Response: cens
Terms added sequentially (first to last)
Df Deviance Resid. Df Resid. Dev
NULL 41 20.19
group 1 -17.83...
2023 Aug 19
1
Determining Starting Values for Model Parameters in Nonlinear Regression
Dear friends,
Hope you are all doing well and having a great weekend. I have data that
was collected on specific gravity and spectrophotometer analysis for 26
mixtures of NG (nitroglycerine), TA (triacetin), and 2 NDPA (2 -
nitrodiphenylamine).
In the dataset, x1 = %NG, x2 = %TA, and x3 = %2 NDPA.
The response variable is the specific gravity, and the rest of the
variables are the predictors.
2011 Jun 07
2
Setting up a State Space Model in dlm
This question pertains to setting up a model in the package "dlm"
(dynamic linear models,
http://cran.r-project.org/web/packages/dlm/index.html
I have read both the vignette and?"An R Package for Dynamic Linear
Models" (http://www.jstatsoft.org/v36/i12/paper), both of which are
very helpful. There is also some discussion at
2008 Sep 10
4
re flecting a line
Suppose x and y are numeric vectors of the same length.
plot(x,y) #scatterplot
lmObj1 <- lm(y~x) # best fit line
abline(lmObj1) # good
lmObj2 <- lm(x~y) #get best fit but with axes interchanged
abline(lmObj2) # not what I want. I want the correct line, drawn on the same
graph, but with
# response and predictor variables interchanged
One way to proceed would be to