Displaying 20 results from an estimated 1100 matches similar to: "optimization"
2013 Nov 01
2
computation of hessian matrix
below is a code to compute hessian matrix , which i need to generate 29 number of different matrices for example first element in x1 and x2 is use to generate let say matrix (M1) and second element in x1 and x2 give matrix (M2) upto matrix (M29) corresponding to the total number of observations and b1 and b2 are constant.
can some one guide me or help to implement this please. I did not
2013 Nov 05
2
multi
[[1]]
[,1] [,2]
[1,] 0.003632559 0.2190629
[2,] -2.090772847 0.2190629
[[2]]
[,1] [,2]
[1,] 0.004278991 0.04337005
[2,] 0.190723602 0.04337005
[[3]]
[,1] [,2]
[1,] 0.01237827 -0.01544811
[2,] 0.06452200 -0.01544811
g<-c(1,2,3)
function(g,hessianList){
for(i in 1:3){
ft1<-g[2]*hessianList[[2]]
ft2<-sum(ft1)
2020 Oct 05
1
Simultaneous Equation Model with Dichotomous Dependent Variables
Hello everyone!
I am currently working with a time series panel data set measuring six dependent variables:
4 of which are binary and 2 of which are count data.
I am interested in constructing a model to measure if the dependent variables influence one another.
For example: DV1~ DV2 + IV1+IV2+ Controls and DV2~ DV1 + IV1+ IV2+ Controls
(where IV stands for independent variable, not
2013 Oct 09
1
mixed model MANOVA? does it even exist?
Hi,
Sorry to bother you again.
I would like to estimate the effect of several categorical factors (two
between subjects and one within subjects) on two continuous dependent
variables that probably covary, with subjects as a random effect. *I want
to control for the covariance between those two DVs when estimating the
effects of the categorical predictors** on those two DVs*. The thing is, i
2008 Jun 22
1
two newbie questions
# I've tried to make this easy to paste into R, though it's probably
so simple you won't need to.
# I have some data (there are many more variables, but this is a
reasonable approximation of it)
# here's a fabricated data frame that is similar in form to mine:
my.df <- data.frame(replicate(10, round(rnorm(100, mean=3.5, sd=1))))
var.list <- c("dv1",
2005 Jul 07
1
multivariate regression using R
Does anyone know if there is a way to run multivariate linear regression
in R? I tried using the lm function (e.g., lm(dv1, dv2~iv1+iv2+iv3),
but got error messages. Is my syntax wrong, or do I need a particular
package?
Thanks,
Jeff--
________________________________________________________
Jeffrey J. Lusk, Ph.D.
Postdoctoral Research Associate
Department of Forestry &
2013 Apr 19
2
make issue with syslinux-5.01
Hi,
I am trying to compile the version on rhel 5.x box. Nasm version 0.98.39
I extracted the tar.gz and ran make in the extracted directory.
Here is where it stops.
gcc -Wp,-MT,rawcon.o,-MD,./.rawcon.o.d -m32 -ffreestanding
-fno-stack-protector -fwrapv -freg-struct-return -march=i386 -Os
-fomit-frame-pointer -mregparm=3 -DREGPARM=3 -msoft-float -fno-exceptions
-fno-asynchronous-unwind-tables
2007 Sep 07
2
R first.id last.id function error
Hi R users,
I have a test dataframe ("file1," shown below) for which I am trying
to create a flag for the first and last ID record (equivalent to SAS
first.id and last.id variables.
Dump of file1:
> file1
id rx week dv1
1 1 1 1 1
2 1 1 2 1
3 1 1 3 2
4 2 1 1 3
5 2 1 2 4
6 2 1 3 1
7 3 1 1 2
8 3 1 2 3
9 3 1 3
2010 Oct 29
1
Repeated Measures MANOVA
Hello all,
Is there an r function that exists that will perform repeated measures MANOVAs? For example, let's say I have 3 DVs, one between-subjects IV, and one within-subjects IV. Based on the documentation for the manova command, a function like that below is not appropriate because it cannot take Error arguments.
manova(cbind(DV1,DV2,DV3) ~ BetweenSubjectsIV * WithinSubjectsIV +
2010 Oct 08
1
MANCOVA
Hi,
I have been using R to do multiple analyses of variance with two
covariates, but recently found that the results in SPSS were very
different. I have check several books and web resources and I think
that both methods are correct, but I am less familiar with R, so I was
hoping someone could offer some suggestions. Oddly simple ANOVA is the
same in SPSS and R. Including covariates improves the
2010 Jul 28
1
syslinux-4.02-6-ge841d69 build failure
make[1]: Entering directory `/syslinux-4.02-6-ge841d69/dos'
gcc -Wp,-MT,syslxopt.o,-MD,./.syslxopt.o.d -m32 -ffreestanding -fno-stack-protector -fwrapv -freg-struct-return -march=i386
-Os -fomit-frame-pointer -mregparm=3 -DREGPARM=3 -msoft-float -fno-exceptions -fno-asynchronous-unwind-tables -fno-strict-aliasing
-falign-functions=0 -falign-jumps=0 -falign-labels=0 -falign-loops=0
2007 Mar 01
1
GLM problems.
Dear R users I'm new in R management and maybe It's a silly question. I'm
working with GLM to obtain predictive models. I have some problesm with the
prediction instruction:
> DatosTotal <- read.csv("Var_perdizcsv.csv", sep =";")
> edvariable <- edit(DatosTotal)
> pre <- predict(rlfinal, DatosTotal, type = 'probs')
Erro en
2009 Dec 03
0
Problem with predict() and factors
I am working on a script that takes numeric performance indicators and runs
them against a series of regressors (dummy regressors, yes\no stuff via 0
and 1, e.g. Was is Christmas this week 0=no, 1=yes).
The script is as follows (Written as a function):
-- Begin Script --
doEnv <- function(HOUR,ENVNAME,REPORTNAME) {
library(RODBC)
library(forecast)
library("geneplotter")
2008 Jan 13
1
How to fit a Tobit model with observations censored at different values
Dear everyone:
I am a new user of R. I have a dataset with a dependent variable (DV) censored at different values. The dataset looks like,
conditions .....IDV1 IDV2 DV
1 2 4 89
1 6 6 75
1 4 5 0 ( DV<=70)
......
2 3 5 15
2 5 5 0
2009 Oct 12
3
[LLVMdev] Alloca Requirements
Are there any implicit assumptions about where alloca instructions
can appear. I've got a failing test where the only difference
between a passing test and a failing test is one application of
this code in instcombine:
// Convert: malloc Ty, C - where C is a constant != 1 into: malloc [C x Ty], 1
Seems pretty harmless to me.
Later on the instcombine code does this:
// Scan to the end of
2011 Nov 22
0
Error in gls function in loop structure
Hi, r-users
I got a problem when I try to call a *gls* function in loop structure.
The gls function seems not able to recognize the parameters that I pass
into the loop function!
(But, if I use lm function, it works.)
The code looks like this:
=================================================
gls.lm <- function(Data, iv1, dv1)
{
gls.model <- gls(Data[ , dv1] ~ Data[ , iv1], correlation =
2009 Jul 15
2
storing lm() results and other objects in a list
to clean up some code I would like to make a list of arbitrary length
to store?various objects for use in a loop
sample code:
############ BEGIN SAMPLE ##############
# You can see the need for a loop already
linearModel1=lm(modelSource ~ .,mcReg)
linearModel2=step(linearModel1)
linearModel3=lm(modelSource ~ .-1,mcReg)
linearModel4=step(linearModel3)
#custom
linearModel5=lm(modelSource ~ .
2012 Jul 11
2
help with merging 2 data frames
Dear R-ers,
I feel I am close, but can't get it quite right.
Thanks a lot for your help!
Dimitri
# I have 2 data frames:
x<-data.frame(a=c("aa","aa","ab","ab","ba","ba","bb","bb"),b=c(1:2,1:2,1:2,1:2),d=c(10,20,30,40,50,60,70,80))
2008 Apr 28
0
weighted nonlinear fits: `nls' and `eval'
dear list,
my question concerns the use of `eval' in defining the model formula
for `nls' (version 2.6.2.).
consider the following simple example, where the same model and data
are used to perform unweighted and weighted fits. I intentionally
used very uneven weights to guarantee large differences in the results
#================================CUT===========================
ln
2009 Feb 18
2
understanding how R determines numbers and characters when creating a data frame
Hello R Users and Developers,
I have a basic question about how R works. Over the past few years I have
struggled when I try to generate a new data frame that I believe should
contain numeric data in some columns and character data in others only to
find everything converted to character data. Is there a general method to
create data frames that contain the data in the desired format: numbers