search for: f2

Displaying 20 results from an estimated 2171 matches for "f2".

2006 Aug 16
1
Specifying Path Model in SEM for CFA
...l errors for the observed variables for a CFA model. (Once I get this working I need to add some further constraints.) Here is what I've tried: model.sa <- specify.model() F1 -> X1,l11, NA F1 -> X2,l21, NA F1 -> X3,l31, NA F1 -> X4,l41, NA F1 -> X5, NA, 0.20 F2 -> X1,l12, NA F2 -> X2,l22, NA F2 -> X3,l32, NA F2 -> X4,l42, NA F2 -> X6, NA, 0.25 F1 <-> F2,g12, 1 F1 <-> F1,g11, 1 F2 <-> F2,g22, 1 X1 <-> X1, NA, 1 X2 <-> X2, NA, 1 X3 <-> X3, NA, 1 X4 <-> X4, NA, 1 X5 &...
2008 Apr 18
3
Function redefinition - not urgent, but I am curious
This is just my curiousity working. Suppose I write: f1 <- function(x) x + 1 f2 <- function(x) 2 * f1(x) f2(10) # 22 f1 <- function(x) x - 1 f2(10) # 18 This is quite obvious. But is there any way to define f2 in such a way that we "freeze" the definition of f1? f1 <- function(x) x + 1 f2 <- function(x) # put something here 2 * f1(x) # probably put som...
2018 Jul 05
0
KASAN: stack-out-of-bounds Read in __netif_receive_skb_core
...008100(slab|head) > raw: 02fffc0000008100 ffffea0006c6bd08 ffffea0006c7f688 ffff8801da800c40 > raw: 0000000000000000 ffff8801a852c200 0000000100000003 0000000000000000 > page dumped because: kasan: bad access detected > > Memory state around the buggy address: > ffff8801a852d080: f2 f2 f2 f8 f2 f2 f2 f2 f2 f2 f2 00 f2 f2 f2 00 > ffff8801a852d100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >> >> ffff8801a852d180: 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 f2 f2 f2 f2 > > ^ > ffff8801a852d200: 00 f...
2020 May 27
1
[Bug 1432] New: ebtables ebtables-2.0.11 buffer overflow on getting kernel data ( ebtables compiled with address sanitizer)
...address: 0x100061895930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100061895940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100061895950: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100061895960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 0x100061895970: f1 f1 04 f2 f2 f2 f2 f2 f2 f2 00 00 00 00 00 00 =>0x100061895980: 00 00 00 00 00 00 00 00 00[f2]f3 f3 f3 f3 00 00 0x100061895990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000618959a0: 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 f2 f2 f2 f2 0x1000618959b0: f2 f2 04 f2 f2 f2 f2 f2 f2 f2 00 f2 f2 f2 f2...
2019 Sep 30
5
Is missingness always passed on?
...rue in the examples they've tried: missingness does get passed along. This example shows it (this is slightly different than the SO example): f1 <- function(x, y, z){ if(missing(x)) cat("f1: x is missing\n") if(missing(y)) cat("f1: y is missing\n") } f2 <- function(x, y, z){ if(missing(z)) cat("f2: z is missing\n") f1(x, y) } f2() which produces f2: z is missing f1: x is missing f1: y is missing Is the documentation out of date? That quote appears to have been written in 2002. Duncan Murdoch
2020 Feb 27
2
TBAA for struct fields
[AMD Official Use Only - Internal Distribution Only] Hi, Following issue is observed with Type Based Alias Analysis(TBAA). ####################################################### struct P { float f1; float f2; float f3[3]; float f4; }; void foo(struct P* p1, struct P* p2) { p1->f2 = 1.2; p2->f1 = 3.7; } int callFoo() { struct P p; foo(&p, &(p.f2)); } ###################################################### Printing alias-sets using commands: clang -O1 -S -emit-llvm struct_t...
2010 Oct 21
1
gam plots and seWithMean
...a x1<-runif(500) x2<-rnorm(500) x3<-rpois(500,3) d<-runif(500) t<-runif(500,20,50) linp<--6.5+x1+2*x2-x3+2*exp(-2*d)*sin(2*pi*d) lam<-t*exp(linp) y<-rpois(500,lam) sum(y) table(y) #fit the data without d by glm and with d by gam f1<-glm(y~offset(log(t))+x1+x2+x3,poisson) f2<-gam(update.formula(as.formula(f1),~.+s(d)),poisson) anova(f1,f2) summary(f2) plot(f2) #the solid line s(d) dat<-data.frame(t,d,x1,x2,x3) datn<-transform(dat,d=0) dif<-predict(f2)-predict(f2,datn) cdif<-dif-mean(dif) points(d,cdif,cex=0.5,col=rgb(0,1,0,0.2)) #another approach to th...
2020 Mar 03
2
TBAA for struct fields
[AMD Public Use] Hi Oliver, I get rid of the warnings by explicitly type-casting it to struct*, and still get similar results. ####################################################### struct P { float f1; float f2; float f3[3]; float f4; }; void foo(struct P* p1, struct P* p2) { p1->f2 = 1.2; p2->f1 = 3.7; } int callFoo() { struct P p; foo(&p, (struct P*)(&(p.f2))); return 0; } ####################################################### Shouldn’t any alias analysis...
2003 May 20
1
How to use pakcage SEM
Hi. I have tried to use Package "SEM". As a learning, I try to convert a program running well of EQS which is as follows to SEM: ### EQS ### /SPECIFICATION CAS=100; VAR=5 MAT=COR; ANA=COR; /EQUATIONS V1=*F1+E1; V2=*F1+E2; V3=*F1+*F2+E3; V4=**F1+*F2*E4; V5=*F2+E5; /VAR E1 TO E5=*; F1*1.0; F2=1.0; /COV E1,E2=*; F1,F2=*: /PRINT FIT ALL; /MATRIX ...... /END This is the converted SEM program. ### data.mh<-matrix(c( 1.00,0,0,0, 0, 0.38,1.00,0,0, 0, 0.52,0.28,1.00,0,0, 0.55,0.32,0.38,1.00,0, 0.36,0.40,0.48,0.31,1.00 ),ncol=5,byro...
2011 Apr 09
2
best practice(s) for retrieving a local variable from a closure
Greetings, Say I have defined mp <- function(a) function(x) x^a f2 <- mp(2) and I would like to retrieve the "a" which is local to f2. Two options come to mind; get("a", envir=environment(f2)) eval(substitute(a), environment(f2)) I'm curious if one of these is preferred over the other in terms of efficiency, robustness, aestheti...
2007 Jul 12
1
sub-function default arguments
Hi. I have defined a function, f1, that calls another function, f2. Inside f1 an intermediate variable called nm1 is created; it is a matrix. f2 takes a matrix argument, and I defined f2 (schematically) as follows: f2<-function(nmArg1=nm1,...){nC<-ncol(nmArg1); ... } so that it expects nm1 as the default value of its argument. f1 is defined (schemati...
2006 Feb 23
2
Strange p-level for the fixed effect with lme function
...iffer and, of course, subjects. I am aware that I could done nesting Subjects within Experiments, but it is expected to have much slower RT (reaction time) in the second experiment, since the task is more complex, so it would not make much sense. That is why I kept analyses separated: (A) lme(RT ~ F2 + MI, random =~ 1 | Subject, data = exp1) ANOVA: numDF denDF F-value p-value (Intercept) 1 1379 243012.61 <.0001 F2 1 1379 47.55 <.0001 MI 1 1379 4.69 0.0305 Fixed effects: RT ~ F2 + MI Value Std.Error DF t-valu...
2015 Oct 12
2
identical(..., ignore.environment=TRUE)
...s like a design flaw. It would certainly be convenient to be able to ignore differences in environments when comparing complex objects with lots of deeply nested formula and terms objects with environments ... Can anyone suggest a reason for this design? Example: > f1 <- formula() > f2 <- formula() > environment(f2) <- new.env() > identical(f1,f2) [1] FALSE > identical(f1,f2,ignore.environment=TRUE) [1] FALSE Actually, maybe I don't understand how this is supposed to work since I thought this would be TRUE: > f1 <- function() {} > f2 <- function()...
2011 Aug 18
1
Specifying data point locations on x-axis using boxplot() and points()
...ntended boxplots. This is because I use "at" in boxplot(). Is there any way that I can specify the locations of the data points on x-axis? It would be great if there is something like "at" in points(). Thank you for your help. Cheers, Kota The following is my script. boxplot(F2.E$D.value ~ F2.E$consonant, main = "F2", ylim = c(-4,10), ylab = "Sensitivity (d')", xlab = "Discrimination Type", names = (c("E","E","E")), col = "light grey", border = "grey", boxwex = 0.2, at = 1:3 - 0.2...
2011 Feb 14
4
sem problem - did not converge
...Item63, lam63, NA F1 -> Item65, lam55, NA F1 -> Item67, lam67, NA F1 -> Item69, lam69, NA F1 -> Item73, lam73, NA F1 -> Item75, lam75, NA F1 -> Item76, lam76, NA F1 -> Item78, lam78, NA F1 -> Item79, lam79, NA F1 -> Item80, lam80, NA F1 -> Item83, lam83, NA F2 -> Item12, lam12, NA F2 -> Item32, lam32, NA F2 -> Item42, lam42, NA F2 -> Item47, lam47, NA F2 -> Item64, lam64, NA F2 -> Item66, lam66, NA F2 -> Item68, lam68, NA F2 -> Item74, lam74, NA F3 -> Item3, lam3, NA F3 -> Item8, lam8, NA F3 -> Item18, lam18, N...
2009 Sep 04
3
Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1
Hello, I am using R to analyze a large multilevel data set, using lmer() to model my data, and using anova() to compare the fit of various models. When I run two models, the output of each model is generated correctly as far as I can tell (e.g. summary(f1) and summary(f2) for the multilevel model output look perfectly reasonable), and in this case (see below) predictor.1 explains vastly more variance in outcome than predictor.2 (R2 = 15% vs. 5% in OLS regression, with very large N). What I am utterly puzzled by is that when I run an anova comparing the two multile...
2016 Dec 15
6
distinct DISubprograms hindering sharing inlined subprogram descriptions
...ey weren't marked 'distinct', the CU link would cause them to effectively be so) remain separate - this means that inlined versions in one CU don't refer to an existing subprogram definition in another CU. To demonstrate: inl.h: void f1(); inline __attribute__((always_inline)) void f2() { f1(); } inl1.cpp: #include "inl.h" void c1() { f2(); } inl2.cpp: #include "inl.h" void c2() { f2(); } Compile to IR, llvm-link the result. The DWARF you get is basically the same as the DWARF you'd get without linking: DW_TAG_compile_unit DW_AT_name "inl1....
2011 Jun 01
3
error in model specification for cfa with lavaan-package
...5,5,5,5,5),x14=c(5,3,3,NA,5,4,5,3,NA,5),x15=c(4,4,4,3,4,5,2,4,5,5),x16=c(5,4,3,3,4,4,3,3,4,5)) and I want to carry out a confirmatory factor analysis using the "cfa" function (lavaan). library(lavaan) then I specify my model cfa.model<-'      f1=~x1+x2+x3+x4+x5                 f2=~x6+x7+x8+x9+x10+x11                 f3=~x12+x13+x14+x15+x16 ' and run the cfa routine fit<-cfa(cfa.model,data=df.cfa,missing="ml") The output is an error message (here partly in german) "Error in chol.default(S) : der führende Minor der Ordnung 4 ist nicht positiv definit...
2009 Aug 05
4
A question regarding R scoping
I have a question related to scoping. Suppose we have 2 functions: f1 = function(i){i = 1} f2 = function(n){ i = length(n) f1(i) } In other words, I would like i=1 regardless of n. Is this possible without having f1 in the body of f2? Thanks in advance!
2013 Oct 12
2
Order of factors with facets in ggplot2
...a ggplot where the order of factors within facets is based on the average of another variable. Here's a reproducible example. My problem is that the factors are ordered similarly in both facets. I would like to have, within each facet of `f1', boxplots for 'x' within each factor `f2', where the boxplots are ordered based on the average of x within each facet. So in this case, for facet A: the order should be M4, M1, M3, M2; and for facet B: M4, M2, M1, M3 library(ggplot2) library(plyr) set.seed(1) f1 <- sample(c("A", "B"), 100, replace= T) f...