similar to: options()$warn==2 and try()

Displaying 20 results from an estimated 110 matches similar to: "options()$warn==2 and try()"

2007 Mar 07
1
No fit statistics for some models using sem
Hi, New to both R and SEM, so this may be a very simple question. I am trying to run a very simple path analysis using the sem package. There are 2 exogenous (FARSCH, LOCUS10) and 2 endogenous (T_ATTENT, RMTEST) observed variables in the model. The idea is that T_ATTENT mediates the effect of FARSCH and LOCUS10 on RMTEST. The RAM specification I used is FARSCH -> T_ATTENT, y1x1, NA
2010 Dec 05
0
Help with time varying covariate-unfold function
Hello All, I am trying to use the unfold function in RcmdrPlugin.survival library, which converts the survival data with time varying covariates to the counting process notation. The problem is somehow, the event indicator created is not correct. Below is the data, I am trying to convert: CASE TRT FAILTIME FAILCENS SEX AGE IGG0 IGG28 IGG42 IGG84 IGG364 26003 A 11.2033
2004 Apr 05
0
Selecting Best Regression Equation : leaps() in R and stepwise() in S+
Dear all, First of all - thanks to the R-users who replied my previous mail "Selecting Best Regression Equation". However, seems i've got some other problems now - My data in c:\leafbrn.txt file is- -------------------------------------- i x1 x2 x3 y 1 3.05 1.45 5.67 0.34 2 4.22 1.35 4.86 0.11 3 3.34 0.26 4.19 0.38 4 3.77 0.23 4.42 0.68 5 3.52 1.10 3.17 0.18 6 3.54 0.76 2.76
2011 Nov 17
1
Vectorizing for weighted distance
Hi All, I am trying to convert the following piece of matlab code to R: XX1 = sum(w(:,ones(1,N1)).*X1.*X1,1); #square the elements of X1, weight it and repeat this vector N1 times XX2 = sum(w(:,ones(1,N2)).*X2.*X2,1); #square the elements of X2, weigh and repeat this vector N2 times X1X2 = (w(:,ones(1,N1)).*X1)'*X2; #get the weighted 'covariance'
2010 Mar 26
2
R loop help
Hi, I am tring to write a loop to compute this, ========================== x1=c( rep(-1,4), rep(1,4) ) x2=c( rep(c(-1,-1,1,1),2) ) x3=c( rep(c(-1,1),4) ) x1*x2 x1*x3 x2*x3 ======================== suppose i have x1,x2,x3 i want to compute their ' two factor interactions', x1x2,x1x3 and x2x3, I wrote ======================== for(i in 1:2){ for( j in i+1:3){ xij=c()
2002 May 17
1
Re: [R] options()$warn==2 and try() (PR#1570)
> > I have a function called FitModels(), which simply takes in the > names of a data.frame and two variable names within that data.frame, and > fits and returns a list of objects from 2 coxph() fits, one main effects and > one interaction model. Sometimes the two variables are such that there is a > warning message: convergence has not been reached, or the X matrix is >
2012 Sep 12
3
how to create a substraction matrix (subtract a row of every column from the same row in other columns)
Hello I have data like this x1 x2 x3 x4 x5 I want to create a matrix similar to a correlation matrix, but with the difference between the two values, like this x1 x2 x3 x4 x5 x1 x2-x1 x3-x1 x4-x1 x5-x1 x2 x3-x2 x4-x2 x5-x2 x3 x4-x3 x5-x3 x4 x5-x4 x5 Then I
2010 Jul 23
2
randomness using runif
I'm working on a problem where I'm introducing random error and have been using the built in function runif to provide that random error. However, I realized that I seem to be getting some unexpected behavior out of the function and was hoping someone could share some insight. I don't know the runif algorithm at all, but from the behavior I'm seeing, it seems that whenever I open
2007 Mar 05
4
about find the solution
If I want to find out the soltion of X1,X2 that min(3X1+2X2+X1X2) subject to 20<=X1+3X2<=50 10<=X1 which function or package can I use? Thanks.
2008 Aug 03
0
missing F statistic in anova.gam
Hello, I have encountered results which I am not sure how to interpret when using anova.gam to compare 2 different models. For certain tests the results do not include an F- or associated p-statistic. This happens when comparing certain models and not others, and I do not discern a patten explaining when the test works and when it does not. Here is some output for some of my tests (y#, x1, and
2010 Sep 19
2
working with eval and environments
I'm trying to get the following section of code to work, I think the problem is being caused by the assignment of data to the lm function not evaluating to "train" in the parent environment but I can't seem to figure out how to do this. fitmodel <- function(trial,data) { wrap.lm <- function(formula,data,...) { cat("in wrap lm",NROW(data),"\n");
2006 Apr 23
2
distribution of the product of two correlated normal
Hi, Does anyone know what the distribution for the product of two correlated normal? Say I have X~N(a, \sigma1^2) and Y~N(b, \sigma2^2), and the \rou(X,Y) is not equal to 0, I want to know the pdf or cdf of XY. Thanks a lot in advance. yu [[alternative HTML version deleted]]
2011 Apr 18
1
covariance matrix: a erro and simple mixed model question, but id not know answer sorry
Dear list I need your help: Execuse me for my limited R knowledge. #example data set set.seed (134) lm=c(1:4) block = c(rep(lm,6)) gen <- c(rep(1, 4), rep(2, 4), rep(3, 4), rep(4, 4),rep(5, 4),rep(6, 4)) X1 = c( rnorm (4, 10, 4), rnorm (4, 12, 6), rnorm (4, 10, 7),rnorm (4, 5, 2), rnorm (4, 8, 4), rnorm (4,7, 2)) X2 = X1 + rnorm(length(X1), 0,3) yvar <- c(X1, X2) X <- c(rep( 1,
2012 Feb 01
1
Simulation confidence interval
The follwing is a code snippet from a power simulation program that I'm using: ? estbeta<-fixef(fitmodel) ?sdebeta<-sqrt(diag(vcov(fitmodel))) ? for(l in 1:betasize) ? {? ?? cibeta<-estbeta[l]-sgnbeta[l]*z1score*sdebeta[l] ??? if(beta[l]*cibeta>0)????????????? powaprox[[l]]<-powaprox[[l]]+1 ????? sdepower[l,iter]<-as.numeric(sdebeta[l]) ? } ? Estbeta recovers the fixed
2012 Jan 04
1
Is there a way to update a method on an existing Reference Class object?
Hi Being able to do object oriented programming in R is really good. I now started using the Reference Classes and really like it. Though, I have one problem: I cannot find a way to update a method on an existing object. The flexibility that scripting gives (really needed for interactive data analysis) is lost if everything have to be recalculated all the time. For example I would normally
2011 Dec 16
1
simulation
I'm using an R program (which I did not write) to simulate multilevel data (subjects in locations) used in power calculations. It uses lmer to fit a mixed logistic model to the simulated data based on inputs of means, variances, slopes and proportions: ? (fitmodel <- lmer(modelformula,data,family=binomial(link=logit),nAGQ=1)) where modelformula is set up in another part of the program.?
2010 Oct 24
3
Long model formulae
What is a good way to enter a very long model formula. For example: y ~ Input.2 + Input.3 + ... + Input.1000 (assuming the corresponding dataframe has many other columns). Is there a way to convert a character string to a formula? Are there command line expansions in R besides the simple '.'? Thanks. [[alternative HTML version deleted]]
2009 Jan 12
3
polychoric correlation: issue with coefficient sign
Hello, I am running polychoric correlations on a dataset composed of 12 ordinal and binary variables (N =384), using the polycor package. One of the association (between 2 dichotomous variables) is very high using the 2-step estimate (0.933 when polychoric run only between the two variables; but 0.801 when polychoric run on the 12 variables). The same correlation run with ML estimate returns a
2010 Aug 24
1
Time and space considerations in using predict.glm.
Hello, I am using R to train a logistic regression model and save the resulting model to disk. I am then subsequently reloading these saved objects, and using predict.glm on them in order to make predictions about single-row data frames that are generated in real-time from requests arriving at an HTTP server. The following code demonstrates the sort of R calls that I have in mind: > cases
2011 Nov 15
1
package installtion
I'm getting the following error in a script: "Error: could not find function "lmer."??? I'm wondering of my lme4 package is installed incorrectly.? Can someone tell me the installation procedure?? I looked at the support docs but couldn't translate that into anything that would work.